本文整理匯總了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);
}