當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。