本文整理匯總了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;
}