本文整理汇总了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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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());
}
示例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));
}
示例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());
}