當前位置: 首頁>>代碼示例>>Java>>正文


Java HorizontalPanel.setStylePrimaryName方法代碼示例

本文整理匯總了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);
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:24,代碼來源:Toolbar.java

示例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;
}
 
開發者ID:sanderberents,項目名稱:gwtlib,代碼行數:10,代碼來源:PagingBar.java

示例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();
    }
 
開發者ID:lsst,項目名稱:firefly,代碼行數:14,代碼來源:ValidationInputField.java

示例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();
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:12,代碼來源:CheckBoxGroupInputField.java

示例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();
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:51,代碼來源:SimplePaletteItem.java

示例6: createBrowserWidget

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
protected Widget createBrowserWidget() {
  HorizontalPanel panel = new HorizontalPanel();
  panel.setStylePrimaryName(STYLE_BROWSER);
  return panel;
}
 
開發者ID:sanderberents,項目名稱:gwtlib,代碼行數:6,代碼來源:PagingBar.java


注:本文中的com.google.gwt.user.client.ui.HorizontalPanel.setStylePrimaryName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。