本文整理汇总了Java中org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper类的典型用法代码示例。如果您正苦于以下问题:Java ViewIdMapper类的具体用法?Java ViewIdMapper怎么用?Java ViewIdMapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ViewIdMapper类属于org.waveprotocol.wave.client.wavepanel.view包,在下文中一共展示了ViewIdMapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: saveInlineReplies
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
/**
* Moves all the inline replies of a blip to their default-anchor locations.
*/
private void saveInlineReplies(BlipMetaDomImpl metaDom) {
// Iteration is done via ids, in order to identify the thread to get the
// inline -> default location mapping.
StringSequence inlineLocators = metaDom.getInlineLocators();
String inlineId = inlineLocators.getFirst();
while (inlineId != null) {
AnchorView inlineUi = domAsViewProvider.asAnchor(Document.get().getElementById(inlineId));
InlineThreadView threadUi = inlineUi.getThread();
if (threadUi != null) {
// Move to default location.
String defaultId = ViewIdMapper.defaultOfInlineAnchor(inlineId);
AnchorView defaultUi = domAsViewProvider.asAnchor(Document.get().getElementById(defaultId));
inlineUi.detach(threadUi);
defaultUi.attach(threadUi);
}
inlineId = inlineLocators.getNext(inlineId);
}
}
示例2: render
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
/**
* Renders the block structure of a collection of conversations as javascript.
*/
public static String render(ViewIdMapper viewIdMapper, ConversationView model) {
BlockStructure v = PojoRenderer.render(viewIdMapper, model);
final IdentityMap<Node, String> nodes = CollectionUtils.createIdentityMap();
final StringBuffer decl = new StringBuffer();
final StringBuffer hookup = new StringBuffer();
decl.append("var ");
buildNames(nodes, 0, v.getRoot());
nodes.each(new IdentityMap.ProcV<Node, String>() {
@Override
public void apply(Node node, String name) {
render(decl, hookup, nodes, node);
}
});
decl.append("n;");
decl.append(hookup);
return decl.toString();
}
示例3: saveInlineReplies
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
/**
* Moves all the inline replies of a blip to their default-anchor locations.
*/
private void saveInlineReplies(BlipMetaDomImpl metaDom) {
// Iteration is done via ids, in order to identify the thread to get the
// inline -> default location mapping.
StringSequence inlineLocators = metaDom.getInlineLocators();
String inlineId = inlineLocators.getFirst();
while (inlineId != null) {
AnchorView inlineUi = views.asAnchor(Document.get().getElementById(inlineId));
InlineThreadView threadUi = inlineUi.getThread();
if (threadUi != null) {
// Move to default location.
String defaultId = ViewIdMapper.defaultOfInlineAnchor(inlineId);
AnchorView defaultUi = views.asAnchor(Document.get().getElementById(defaultId));
inlineUi.detach(threadUi);
defaultUi.attach(threadUi);
}
inlineId = inlineLocators.getNext(inlineId);
}
}
示例4: MyFullDomRenderer
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
public MyFullDomRenderer(ShallowBlipRenderer blipPopulator, DocRefRenderer docRenderer,
ProfileManager profileManager, ViewIdMapper viewIdMapper, ViewFactory viewFactory,
ThreadReadStateMonitor readMonitor) {
this.blipPopulator = blipPopulator;
this.docRenderer = docRenderer;
this.profileManager = profileManager;
this.viewIdMapper = viewIdMapper;
this.viewFactory = viewFactory;
this.readMonitor = readMonitor;
}
示例5: FullDomRenderer
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
public FullDomRenderer(
ProfileManager profileManager,
ViewIdMapper viewIdMapper,
ViewFactory viewFactory) {
this.profileManager = profileManager;
this.viewIdMapper = viewIdMapper;
this.viewFactory = viewFactory;
}
示例6: installer
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
public static BlipInstaller installer(final ViewIdMapper viewIdMapper,
final AnchorHandler manager, final DomAsViewProvider views) {
return new BlipInstaller() {
@Override
public void install(Wavelet w, Conversation c, ConversationBlip b, Registries r) {
InlineAnchorLiveRenderer renderer =
new InlineAnchorLiveRenderer(viewIdMapper, b, manager, views);
r.getElementHandlerRegistry().registerRenderingMutationHandler(
Blips.THREAD_INLINE_ANCHOR_TAGNAME, renderer);
r.getElementHandlerRegistry().registerEventHandler(
Blips.THREAD_INLINE_ANCHOR_TAGNAME, ANCHOR_HANDLER);
}
};
}
示例7: InlineAnchorLiveRenderer
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
private InlineAnchorLiveRenderer(ViewIdMapper viewIdMapper, ConversationBlip blip,
AnchorHandler h, DomAsViewProvider views) {
this.viewIdMapper = viewIdMapper;
this.blip = blip;
this.handler = h;
this.views = views;
}
示例8: createXml
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
/**
* Creates an xml block structure from a model, and injects it into the page.
*/
private XmlStructure createXml(ConversationView model) {
String xml =
XmlRenderer.render(new ViewIdMapper(ModelIdMapperImpl.create(model, "empty")), model);
Element dom = Document.get().createElement("xml");
dom.setInnerHTML(xml);
Document.get().getBody().appendChild(dom);
return XmlStructure.create(XmlRenderer.ROOT_ID);
}
示例9: FullDomRenderer
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
public FullDomRenderer(ShallowBlipRenderer blipPopulator, DocRefRenderer docRenderer,
ProfileManager profileManager, ViewIdMapper viewIdMapper, ViewFactory viewFactory,
ThreadReadStateMonitor readMonitor) {
this.blipPopulator = blipPopulator;
this.docRenderer = docRenderer;
this.profileManager = profileManager;
this.viewIdMapper = viewIdMapper;
this.viewFactory = viewFactory;
this.readMonitor = readMonitor;
}
示例10: getViewIdMapper
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
private ViewIdMapper getViewIdMapper() {
if (viewIdMapper == null) {
viewIdMapper = createViewIdMapper();
}
return viewIdMapper;
}
示例11: createViewIdMapper
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
/** @return the id mangler for view objects. Subclasses may override. */
private ViewIdMapper createViewIdMapper() {
return new ViewIdMapper(createModelIdMapper());
}
示例12: ModelAsViewProviderImpl
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
/**
*/
public ModelAsViewProviderImpl(ViewIdMapper viewIdMapper, DomAsViewProvider viewProvider) {
this.viewProvider = viewProvider;
this.viewIdMapper = viewIdMapper;
}
示例13: PojoRenderer
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
private PojoRenderer(PojoStructure structure, ViewIdMapper viewIdMapper) {
this.structure = structure;
this.viewIdMapper = viewIdMapper;
}
示例14: XmlRenderer
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
private XmlRenderer(ViewIdMapper viewIdMapper) {
this.viewIdMapper = viewIdMapper;
}
示例15: setUp
import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
@Override
public void setUp() {
model = createSample();
viewIdMapper = new ViewIdMapper(ModelIdMapperImpl.create(model, "empty"));
bs = create(model);
}