当前位置: 首页>>代码示例>>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;未经允许,请勿转载。