当前位置: 首页>>代码示例>>Java>>正文


Java ViewIdMapper类代码示例

本文整理汇总了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);
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:22,代码来源:BlipDocumentRendererImpl.java

示例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();
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:21,代码来源:JsRenderer.java

示例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);
  }
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:24,代码来源:BlipPager.java

示例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;
}
 
开发者ID:ArloJamesBarnes,项目名称:walkaround,代码行数:11,代码来源:MyFullDomRenderer.java

示例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;
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:9,代码来源:FullDomRenderer.java

示例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);
    }
  };
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:16,代码来源:InlineAnchorLiveRenderer.java

示例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;
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:8,代码来源:InlineAnchorLiveRenderer.java

示例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);
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:12,代码来源:XmlStructureGwtTest.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:11,代码来源:FullDomRenderer.java

示例10: getViewIdMapper

import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
private ViewIdMapper getViewIdMapper() {
  if (viewIdMapper == null) {
    viewIdMapper = createViewIdMapper();
  }
  return viewIdMapper;
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:7,代码来源:StageOneProvider.java

示例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());
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:5,代码来源:StageOneProvider.java

示例12: ModelAsViewProviderImpl

import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
/**
 */
public ModelAsViewProviderImpl(ViewIdMapper viewIdMapper, DomAsViewProvider viewProvider) {
  this.viewProvider = viewProvider;
  this.viewIdMapper = viewIdMapper;
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:7,代码来源:ModelAsViewProviderImpl.java

示例13: PojoRenderer

import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
private PojoRenderer(PojoStructure structure, ViewIdMapper viewIdMapper) {
  this.structure = structure;
  this.viewIdMapper = viewIdMapper;
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:5,代码来源:PojoRenderer.java

示例14: XmlRenderer

import org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper; //导入依赖的package包/类
private XmlRenderer(ViewIdMapper viewIdMapper) {
  this.viewIdMapper = viewIdMapper;
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:4,代码来源:XmlRenderer.java

示例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);
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:7,代码来源:BlockStructureTestBase.java


注:本文中的org.waveprotocol.wave.client.wavepanel.view.ViewIdMapper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。