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


Java BlipMetaViewBuilder类代码示例

本文整理汇总了Java中org.waveprotocol.wave.client.wavepanel.view.dom.full.BlipMetaViewBuilder的典型用法代码示例。如果您正苦于以下问题:Java BlipMetaViewBuilder类的具体用法?Java BlipMetaViewBuilder怎么用?Java BlipMetaViewBuilder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BlipMetaViewBuilder类属于org.waveprotocol.wave.client.wavepanel.view.dom.full包,在下文中一共展示了BlipMetaViewBuilder类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: render

import org.waveprotocol.wave.client.wavepanel.view.dom.full.BlipMetaViewBuilder; //导入依赖的package包/类
@Override
public UiBuilder render(final ConversationBlip blip, UiBuilder document,
    final IdentityMap<ConversationThread, UiBuilder> anchorUis) {
  UiBuilder threadsUi = new UiBuilder() {

    @Override
    public void outputHtml(SafeHtmlBuilder out) {
      for (ConversationThread thread : blip.getReplyThreads()) {
        if (thread.isInline()) {
          anchorUis.get(thread).outputHtml(out);
        }  
      }
    }
  };

  BlipMetaViewBuilder metaUi = BlipMetaViewBuilder.create(viewIdMapper.metaOf(blip), document);
  return BlipViewBuilder.create(viewIdMapper.blipOf(blip), metaUi, threadsUi);
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:19,代码来源:FullDomRenderer.java

示例2: endSession

import org.waveprotocol.wave.client.wavepanel.view.dom.full.BlipMetaViewBuilder; //导入依赖的package包/类
/**
 * Stops editing if there is currently an edit session.
 */
private void endSession() {
  if (isEditing()) {
    selectionExtractor.stop(editor);
    container.doOrphan(editor.getWidget());
    editor.blur();
    editor.setEditing(false);
    blipEditStatusListener.setEditing(false);
    // "removeContent" just means detach the editor from the document.
    editor.removeContent();
    editor.reset();
    // TODO(user): this does not work if the view has been deleted and
    // detached.
    editing.getMeta().deselect(MenuOption.EDIT_DONE);
    editing.getMeta().enable(BlipMetaViewBuilder.DISABLED_WHILE_EDITING_MENU_OPTIONS_SET);
    editing.getMeta().disable(BlipMetaViewBuilder.ENABLED_WHILE_EDITING_MENU_OPTIONS_SET);
    Editor oldEditor = editor;
    BlipView oldEditing = editing;
    editor = null;
    editing = null;
    fireOnSessionEnd(oldEditor, oldEditing);
  }
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:26,代码来源:EditSession.java

示例3: setQuasiDeleted

import org.waveprotocol.wave.client.wavepanel.view.dom.full.BlipMetaViewBuilder; //导入依赖的package包/类
@Override
public void setQuasiDeleted(String title, boolean isRowOwnerDeleted) {
  self.addClassName(css.deleted());
  
  // white margins are shown only if blip doesn't have a deleted row owner blip
  int marginWidthPct = isRowOwnerDeleted ? 0 : 100;
  getTopMargin().getStyle().setWidth(marginWidthPct, Style.Unit.PCT);
  getBottomMargin().getStyle().setWidth(marginWidthPct, Style.Unit.PCT);    
  
  Style metaFrameStyle = DomViewHelper.load(getMeta().getId(),
      BlipMetaViewBuilder.Components.FRAME).getStyle();
  metaFrameStyle.setBackgroundColor(DELETED_COLOR);
  metaFrameStyle.setBorderColor(DELETED_COLOR);
  DomUtil.findFirstChildElement(meta, Type.BLIP_INDICATOR).getStyle().setBorderColor(DELETED_COLOR);    

  self.setTitle(title);
  
  // Unset cursor shape for children
  setAutoCursor(DomUtil.findFirstChildElement(getMeta(), Type.BLIP_CONTINUATION_BAR));
  Element timeAndMenu = DomUtil.findFirstChildElement(getMeta(), Type.META_BAR, Type.TIME_AND_MENU);
  setAutoCursor(timeAndMenu);
  setAutoCursor(DomUtil.findFirstChildElement(timeAndMenu, Type.BLIP_TIME));
  Element menuButton = DomUtil.findFirstChildElement(timeAndMenu, Type.BLIP_MENU_BUTTON);
  setAutoCursor(menuButton);

  // Remove arrow from menu button
  menuButton.getStyle().setColor(DELETED_COLOR);

  DomUtil.setQuasiDeleted(self);
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:31,代码来源:BlipViewDomImpl.java

示例4: setUp

import org.waveprotocol.wave.client.wavepanel.view.dom.full.BlipMetaViewBuilder; //导入依赖的package包/类
@Override
protected void setUp() {
  blipCss = UiBuilderTestHelper.mockCss(BlipViewBuilder.Css.class);
  String blipId = "askljfalikwh4rlkhs";
  String metaDomId = blipId + "M";
  blipDomId = blipId + "B";

  UiBuilder fakeContent = UiBuilder.Constant.of(
      EscapeUtils.fromSafeConstant(content));
  metaUi = new BlipMetaViewBuilder(metaDomId, fakeContent, blipCss);
  blipUi = new BlipViewBuilder(blipDomId, metaUi, UiBuilder.EMPTY, blipCss);
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:13,代码来源:BlipViewBuilderTest.java

示例5: setMenuState

import org.waveprotocol.wave.client.wavepanel.view.dom.full.BlipMetaViewBuilder; //导入依赖的package包/类
/**
 * Replaces the current menu DOM with a new menu.
 *
 * @param options options to include in the menu
 * @param selected which options, if any, are to be selected.
 */
private void setMenuState(Set<MenuOption> options, Set<MenuOption> selected) {
  UiBuilder builder = BlipMetaViewBuilder.menuBuilder(options, selected, css);
  SafeHtmlBuilder  out = new SafeHtmlBuilder();
  builder.outputHtml(out);
  getMenu().setInnerHTML(out.toSafeHtml().asString());
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:13,代码来源:BlipMetaDomImpl.java

示例6: getOption

import org.waveprotocol.wave.client.wavepanel.view.dom.full.BlipMetaViewBuilder; //导入依赖的package包/类
@Override
public MenuOption getOption() {
  return BlipMetaViewBuilder.getMenuOption(self.getAttribute(OPTION_ID_ATTRIBUTE));
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:5,代码来源:BlipMenuItemDomImpl.java

示例7: setOption

import org.waveprotocol.wave.client.wavepanel.view.dom.full.BlipMetaViewBuilder; //导入依赖的package包/类
@Override
public void setOption(MenuOption option) {
  self.setAttribute(OPTION_ID_ATTRIBUTE, BlipMetaViewBuilder.getMenuOptionId(option).asString());
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:5,代码来源:BlipMenuItemDomImpl.java


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