本文整理汇总了Java中com.google.gwt.user.client.ui.InlineLabel.addStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java InlineLabel.addStyleName方法的具体用法?Java InlineLabel.addStyleName怎么用?Java InlineLabel.addStyleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.InlineLabel
的用法示例。
在下文中一共展示了InlineLabel.addStyleName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DropDownImageListEditorView
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
@UiConstructor
public DropDownImageListEditorView() {
initWidget(Binder.BINDER.createAndBindUi(this));
currentTypeImage = new Image();
caret = new InlineLabel();
caret.addStyleName( "caret" );
caret.setVisible( true);
dropDownAnchor.add( currentTypeImage );
dropDownAnchor.add( caret );
dropDownAnchor.setEnabled( true );
currentTypeImageTooltip = new Tooltip(dropDown);
currentTypeImageTooltip.setContainer("body");
currentTypeImageTooltip.setShowDelayMs(100);
currentTypeImage.addClickHandler(e -> currentTypeImageTooltip.hide());
caret.addClickHandler(e -> currentTypeImageTooltip.hide());
helpPanel.add(currentTypeImageTooltip);
}
示例2: inlineWidget
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
private static Widget inlineWidget(
String title, List<Widget> inlineWidgets, int depth, boolean hasSeparator) {
FlowPanel inlinePanel = new FlowPanel();
StringBuilder keyText = new StringBuilder(indentation(depth)).append(title);
InlineLabel keyLabel = new InlineLabel(keyText.toString());
keyLabel.addStyleName(style.jsonKey());
inlinePanel.add(keyLabel);
for (Widget child : inlineWidgets) {
inlinePanel.add(child);
}
if (hasSeparator) {
inlinePanel.add(new InlineLabel(SEPARATOR_TEXT));
}
return inlinePanel;
}
示例3: setNotificationMessage
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
/**
* Sets the notification message.
* @param message
* @param notificationType
*/
public void setNotificationMessage(String message, NotificationType notificationType) {
this.body.clear();
InlineLabel msg = new InlineLabel(message);
if (notificationType == NotificationType.notification) {
this.body.add(msg);
} else if (notificationType == NotificationType.error) {
this.body.add(msg);
} else if (notificationType == NotificationType.progress) {
msg.addStyleName("spinner"); //$NON-NLS-1$
this.body.add(msg);
}
}
示例4: setRef
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
/**
* Denotes that this is an object whose definition is in another Schema, and
* that it should be filled in with the correct fields when expanded.
*/
void setRef(final String ref) {
final InlineLabel expando = new InlineLabel("+");
add(expando);
expando.addStyleName(Resources.INSTANCE.style().clickable());
expando.setTitle("Click to show more fields");
expando.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Schema sch = service.getSchemas().get(ref);
setProperties(sch.getProperties());
remove(expando);
}
});
}
示例5: AlertPanel
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
public AlertPanel(Type type) {
setStylePrimaryName(avroUiStyle.uiMessage());
addStyleName(type.labelStyleName);
InlineLabel icon = new InlineLabel();
icon.setStylePrimaryName(avroUiStyle.uiIcon());
icon.addStyleName(type.iconStyleName);
getElement().appendChild(icon.getElement());
textNode = Document.get().createDivElement();
textNode.getStyle().setWidth(100, Unit.PCT);
getElement().appendChild(textNode);
}