当前位置: 首页>>代码示例>>Java>>正文


Java HorizontalPanel.setWidth方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.HorizontalPanel.setWidth方法的典型用法代码示例。如果您正苦于以下问题:Java HorizontalPanel.setWidth方法的具体用法?Java HorizontalPanel.setWidth怎么用?Java HorizontalPanel.setWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.HorizontalPanel的用法示例。


在下文中一共展示了HorizontalPanel.setWidth方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initializew3wPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void initializew3wPanel() {
	w3wPanel = new HorizontalPanel();
	w3wPanel.setSpacing(5);
	w3wPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
	StyleInjector.inject(".w3wPanel { " + "background: #E0ECF8;"
			+ "border-radius: 5px 10px;" + "opacity: 0.8}");
	w3wPanel.setStyleName("w3wPanel");
	w3wPanel.setWidth("415px");

	wordsLabel = new Label();
	w3wAnchor = new AnchorBuilder().setHref("https://what3words.com/")
			.setText(UIMessages.INSTANCE.what3Words())
			.setTitle("https://what3words.com/").build();
	w3wAnchor.getElement().getStyle().setColor("#FF0000");
	w3wAnchor.setVisible(false);
	w3wPanel.add(w3wAnchor);
	w3wPanel.add(wordsLabel);
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:19,代码来源:BasicToolBar.java

示例2: createSeparatorPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void createSeparatorPanel() {
	separatorPanel = new HorizontalPanel();
	separatorPanel.setSpacing(1);
	separatorPanel.setWidth("100%");
	separatorPanel.addStyleName(ThemeStyles.get().style().borderTop());
	separatorPanel.addStyleName(ThemeStyles.get().style().borderBottom());
	separatorPanel
			.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	separatorPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
	separatorPanel.add(new Label(UIMessages.INSTANCE
			.separator(DEFAULT_CSV_SEPARATOR)));
	separatorTextField = new TextField();
	separatorTextField.setText(DEFAULT_CSV_SEPARATOR);
	separatorTextField.setWidth(30);

	separatorPanel.add(separatorTextField);
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:18,代码来源:JoinDataDialog.java

示例3: 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

示例4: GalleryAppBox

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * Creates new Gallery app box.
 */
private GalleryAppBox() {
  gContainer = new FlowPanel();
  final HorizontalPanel container = new HorizontalPanel();
  container.setWidth("100%");
  container.setSpacing(0);
  container.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER);
  HorizontalPanel panel = new HorizontalPanel();
  Image image = new Image();
  image.setResource(Ode.getImageBundle().waitingIcon());
  panel.add(image);
  Label label = new Label();
  label.setText(Ode.getMessages().defaultRpcMessage());
  panel.add(label);
  gContainer.add(panel);
  this.add(gContainer);
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:20,代码来源:GalleryAppBox.java

示例5: StatusPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
   * Initializes and assembles all UI elements shown in the status panel.
   */
  public StatusPanel() {
    HorizontalPanel hpanel = new HorizontalPanel();
    hpanel.setWidth("100%");
    hpanel.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER);
    String tosUrl = Ode.getInstance().getSystemConfig().getTosUrl();
    if (!Strings.isNullOrEmpty(tosUrl)) {
      String appInventorFooter =
          "<a href=\"" + tosUrl + "\" target=\"_blank\">" + MESSAGES.privacyTermsLink() + "</a>";
      hpanel.add(new HTML(appInventorFooter));
    }

    // This shows the git version and the date of the build
//    String version = GitBuildId.getVersion();
//    String date = GitBuildId.getDate();
//    if (version != null && date != null) {
//      Label buildId = new Label(MESSAGES.gitBuildId(date, version));
//      hpanel.add(buildId);
//      hpanel.setCellHorizontalAlignment(buildId, HorizontalPanel.ALIGN_RIGHT);
//    }

    initWidget(hpanel);
    setStyleName("ode-StatusPanel");
  }
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:27,代码来源:StatusPanel.java

示例6: makeHoriPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public static HorizontalPanel makeHoriPanel(HasHorizontalAlignment.HorizontalAlignmentConstant halign,
                                            HasVerticalAlignment.VerticalAlignmentConstant valign,
                                            Widget... widgets) {
    HorizontalPanel hp = new HorizontalPanel();
    for (Widget w : widgets) {
        hp.add(w);
    }
    if (halign != null) {
        hp.setHorizontalAlignment(halign);
        hp.setWidth("100%");
    }
    if (valign != null) {
        hp.setVerticalAlignment(valign);
    }
    return hp;
}
 
开发者ID:lsst,项目名称:firefly,代码行数:17,代码来源:GwtUtil.java

示例7: addCreateFilterButton

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void addCreateFilterButton(final Command addfilterCommand) {
    HorizontalPanel buttonPanel = new HorizontalPanel();
    buttonPanel.setWidth("100%");
    buttonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);

    Button createFilterButton = new Button();
    createFilterButton.setText(CommonConstants.INSTANCE.Add_New_Filter());

    createFilterButton.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            getFormValues(filterControlGroups);
            if (validateForm()) {
                addfilterCommand.execute();
                refreshGrid();
                cleanFormValues(filterControlGroups);
                tabAdd.showTab();
            }
        }
    });
    buttonPanel.add(createFilterButton);
    horizontalForm.add(buttonPanel);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:24,代码来源:NewFilterPopup.java

示例8: getItemPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private HorizontalPanel getItemPanel(final String labelText,
                                     final IsWidget constraintMatchWidget) {
    HorizontalPanel horizontalPanel = new HorizontalPanel();
    horizontalPanel.setWidth("100%");

    HorizontalPanel labelPanel = new HorizontalPanel();
    Label label = new Label(labelText);
    labelPanel.add(label);
    horizontalPanel.add(labelPanel);

    horizontalPanel.add(constraintMatchWidget);

    horizontalPanel.setCellWidth(labelPanel,
                                 "150px");

    return horizontalPanel;
}
 
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:18,代码来源:MultiConstraintHardMediumSoftMatchRuleModellerWidget.java

示例9: load

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public void load() {
	if (this.currentTemplate == null) {
		setErrorText("No Template to show!");
		return;
	}
	setErrorText("");
	setTitleText("Attributes for ");
	setTitleWidget(new CIIconDisplayNameWidget(this.currentTemplate));
	vPanel.clear();
	
	HTML add = new HTML("[<a href='javascript:;'>new</a>]");
	add.setTitle("Add a new attribute to this template");
	add.addClickListener(new ClickListener() {
		public void onClick(Widget sender) {
			OneCMDBModelCreator.get().showScreen(OneCMDBModelCreator.ADD_ATTRIBUTE_SCREEN, currentTemplate.getAlias(), new Long(0));
		}
		
	});
	HorizontalPanel hPanel = new HorizontalPanel();
	hPanel.add(add);
	hPanel.setCellHorizontalAlignment(add, HorizontalPanel.ALIGN_RIGHT);
	hPanel.setWidth("100%");
	vPanel.add(hPanel);
	vPanel.add(getAttributeTable());
	
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:27,代码来源:ListAttributeScreen.java

示例10: ButtonBar

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public ButtonBar() {
    HorizontalPanel hp = new HorizontalPanel();
    hp.setWidth("100%");
    hp.setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
    left = new HorizontalPanel();
    left.setSpacing(3);
    left.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT);
    left.setWidth("100%");

    right = new HorizontalPanel();
    right.setSpacing(3);
    right.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
    right.setWidth("100%");
    Label spacerRight = new Label();
    right.add(spacerRight);
    right.setCellWidth(spacerRight, "100%");

    hic.setPixelSize(16,16);
    hp.add(left);
    hp.add(right);
    hp.setCellWidth(right, "100%");
    hp.add(GwtUtil.getFiller(10,1));
    hp.add(hic);

    initWidget(hp);
}
 
开发者ID:lsst,项目名称:firefly,代码行数:27,代码来源:Form.java

示例11: insert

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
@Override
public ColumnListEditor.View insert(final int index,
                                    final DataColumnDefEditor.View columnEditorView,
                                    final boolean selected, final boolean enabled,
                                    final String altText) {
    final CheckBox selectedInput = new CheckBox();
    selectedInput.getElement().getStyle().setCursor(Style.Cursor.POINTER);
    selectedInput.getElement().getStyle().setTop(-7, Style.Unit.PX);
    selectedInput.setEnabled(enabled);
    selectedInput.setValue(selected);
    selectedInput.setTitle(altText != null ? altText : "");
    selectedInput.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
        @Override
        public void onValueChange(final ValueChangeEvent<Boolean> event) {
            presenter.onColumnSelect(index, event.getValue());
        }
    });

    final HorizontalPanel panel = new HorizontalPanel();
    panel.setWidth("100%");
    panel.add(selectedInput);
    panel.add(columnEditorView.asWidget());
    container.insert(panel, index);
    return this;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:26,代码来源:ColumnListEditorView.java

示例12: appendChilds

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void appendChilds(TreeWidget rootEnt, JSONArray children) {
	for (int i = 0; i < children.size(); ++i) {
		nextEntityName = children.get(i).isString().stringValue();
		Anchor a = new Anchor(nextEntityName + " (" + entities.get(nextEntityName).getLeft() + ")");
		a.setWidth("100%");
		a.setStyleName("font");
		a.addClickHandler(new ClickHandler() {
			String name = nextEntityName;
			@Override
			public void onClick(ClickEvent event) {
				module.setSelectedEntity(name);
			}
		});
		HorizontalPanel cPanel = new HorizontalPanel();
		cPanel.setStyleName("tree");
		cPanel.setWidth("100%");
		cPanel.add(a);
		TreeWidget c = new TreeWidget(cPanel);
		rootEnt.addChild(c);
		if (children.size() > 0) appendChilds(c, entities.get(nextEntityName).getRight());
	}
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:23,代码来源:EntitiesListBox.java

示例13: generateTree

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void generateTree(TreeWidget c, JSONValue entity) {
	nextEntityName = entity.isObject().get("entity").isString().stringValue();
	Anchor a = new Anchor(nextEntityName);
	a.setWidth("100%");
	a.setStyleName("font");
	a.addClickHandler(new ClickHandler() {
		String name = nextEntityName;
		@Override
		public void onClick(ClickEvent event) {
			setSelectedEntity(name);
		}
	});
	HorizontalPanel cPanel = new HorizontalPanel();
	cPanel.setStyleName("tree");
	cPanel.setWidth("100%");
	cPanel.add(a);
	TreeWidget cc = new TreeWidget(cPanel);
	c.addChild(cc);
	results.put(nextEntityName, entity.isObject().get("results").isArray());
	entities.add(nextEntityName);
	for (int i = 0; i < entity.isObject().get("children").isArray().size(); ++i) {
		generateTree(cc, entity.isObject().get("children").isArray().get(i));
	}
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:25,代码来源:RiskAnalysisResults.java

示例14: appendChilds

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void appendChilds(TreeWidget rootEnt, JSONArray children) {
	for (int i = 0; i < children.size(); ++i) {
		nextEntityName = children.get(i).isString().stringValue();
		Anchor a = new Anchor(nextEntityName + " (" + entities.get(nextEntityName).getLeft() + ")");
		a.setWidth("100%");
		a.setStyleName("font");
		a.addClickHandler(new ClickHandler() {
			String name = nextEntityName;
			@Override
			public void onClick(ClickEvent event) {
				setSelectedEntity(name);
			}
		});
		HorizontalPanel cPanel = new HorizontalPanel();
		cPanel.setStyleName("tree");
		cPanel.setWidth("100%");
		cPanel.add(a);
		TreeWidget c = new TreeWidget(cPanel);
		rootEnt.addChild(c);
		if (children.size() > 0) appendChilds(c, entities.get(nextEntityName).getRight());
	}
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:23,代码来源:RiskAnalysisWizard.java

示例15: getCSVComboPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void getCSVComboPanel() {
	comboPanel = new HorizontalPanel();
	comboPanel.setWidth("100%");
	comboPanel.addStyleName(ThemeStyles.get().style().borderTop());
	comboPanel.setSpacing(5);
	comboPanel.setVisible(false);
	comboPanel.add(new Label(UIMessages.INSTANCE.bindableAttribute()));
	comboPanel.add(csvAttributeCombo);
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:10,代码来源:JoinDataDialog.java


注:本文中的com.google.gwt.user.client.ui.HorizontalPanel.setWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。