本文整理汇总了Java中com.google.gwt.user.client.ui.HorizontalPanel.setStylePrimaryName方法的典型用法代码示例。如果您正苦于以下问题:Java HorizontalPanel.setStylePrimaryName方法的具体用法?Java HorizontalPanel.setStylePrimaryName怎么用?Java HorizontalPanel.setStylePrimaryName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.HorizontalPanel
的用法示例。
在下文中一共展示了HorizontalPanel.setStylePrimaryName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Toolbar
import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
* Initializes and assembles all commands into buttons in the toolbar.
*/
public Toolbar() {
buttonMap = new HashMap<String, TextButton>();
dropDownButtonMap = new HashMap<String, DropDownButton>();
leftButtons = new HorizontalPanel();
leftButtons.setSpacing(4);
rightButtons = new HorizontalPanel();
rightButtons.setSpacing(4);
rightButtons.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
HorizontalPanel toolbar = new HorizontalPanel();
toolbar.add(leftButtons); // this nesting keeps buttons left aligned
toolbar.add(rightButtons);
toolbar.setCellHorizontalAlignment(rightButtons, HorizontalPanel.ALIGN_RIGHT);
toolbar.setWidth("100%");
toolbar.setStylePrimaryName("ya-Toolbar");
initWidget(toolbar);
}
示例2: createPageSizeWidget
import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
protected Widget createPageSizeWidget() {
HorizontalPanel panel = new HorizontalPanel();
panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
panel.add(new HTML(_messages.pagesize1()));
panel.add(new ListBox());
panel.add(new HTML(_messages.pagesize2()));
panel.setStylePrimaryName(STYLE_PAGESIZE);
return panel;
}
示例3: createErrorPop
import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void createErrorPop() {
Image exclaim= new Image(GwtUtil.EXCLAMATION);
HorizontalPanel hp= new HorizontalPanel();
hp.add(exclaim);
hp.add(_errorText);
hp.setStylePrimaryName("firefly-inputfield-error-msg");
_errorText.setWidth("150px");
DOM.setStyleAttribute(_errorText.getElement(), "paddingLeft", "5px");
_errorPop= new PopupPane(null,hp, PopupType.STANDARD,true, false,false, PopupPane.HeaderType.NONE);
_errorPop.useHighestZIndexLevel();
}
示例4: createErrorPopNEWER
import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void createErrorPopNEWER() {
Image exclaim= new Image(GwtUtil.EXCLAMATION);
HorizontalPanel hp= new HorizontalPanel();
hp.add(exclaim);
hp.add(_errorText);
hp.setStylePrimaryName("firefly-inputfield-error-msg");
_errorText.setWidth("150px");
DOM.setStyleAttribute(_errorText.getElement(), "padding", "5px");
_errorPop= new PopupPane(null,hp, PopupType.STANDARD,true, false,false, PopupPane.HeaderType.NONE);
_errorPop.useHighestZIndexLevel();
}
示例5: SimplePaletteItem
import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
* Creates a new palette item.
*
* @param scd component descriptor for palette item
* @param dropTargetProvider provider of targets that palette items can be dropped on
*/
public SimplePaletteItem(SimpleComponentDescriptor scd, DropTargetProvider dropTargetProvider) {
this.dropTargetProvider = dropTargetProvider;
this.scd = scd;
componentPrototype = null;
// Initialize palette item UI
HorizontalPanel panel = new HorizontalPanel();
panel.setStylePrimaryName("ode-SimplePaletteItem");
Image image = scd.getImage();
image.setStylePrimaryName("ode-SimplePaletteItem-icon");
panel.add(image);
panel.setCellHorizontalAlignment(image, HorizontalPanel.ALIGN_LEFT);
panel.setCellWidth(image, "30px");
Label label = new Label(ComponentsTranslation.getComponentName(scd.getName()));
label.setHorizontalAlignment(Label.ALIGN_LEFT);
label.addStyleName("ode-SimplePaletteItem-caption");
panel.add(label);
HorizontalPanel optPanel = new HorizontalPanel();
ComponentHelpWidget helpImage = new ComponentHelpWidget(scd);
helpImage.addStyleName("ode-SimplePalleteItem-button");
optPanel.add(helpImage);
optPanel.setCellHorizontalAlignment(helpImage, HorizontalPanel.ALIGN_LEFT);
if (scd.getExternal()) {
ComponentRemoveWidget deleteImage = new ComponentRemoveWidget(scd);
deleteImage.addStyleName("ode-SimplePalleteItem-button");
optPanel.add(deleteImage);
optPanel.setCellHorizontalAlignment(deleteImage, HorizontalPanel.ALIGN_RIGHT);
}
panel.add(optPanel);
panel.setCellHorizontalAlignment(optPanel, HorizontalPanel.ALIGN_RIGHT);
panel.setWidth("100%");
add(panel);
setWidth("100%");
addHandlers();
}
示例6: createBrowserWidget
import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
protected Widget createBrowserWidget() {
HorizontalPanel panel = new HorizontalPanel();
panel.setStylePrimaryName(STYLE_BROWSER);
return panel;
}