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


Java HorizontalPanel.add方法代码示例

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


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

示例1: createGridPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private HorizontalPanel createGridPanel() {
	HorizontalPanel hPanel = new HorizontalPanel();
	hPanel.setSize("510px", "320px");
	
	vehicleStore = new ListStore<VehicleJSO>(vehicleProps.key());
	vehiculeGrid = createGrid(vehicleStore, vehicleProps);
	
	vehiculeGrid.getSelectionModel().addSelectionChangedHandler(
			new SelectionChangedHandler<VehicleJSO>() {
				@Override
				public void onSelectionChanged(
						SelectionChangedEvent<VehicleJSO> event) {
					List<VehicleJSO> selected = event.getSelection();						
					vehicleToolBar.setVehicles(selected);						
				}
			});

	VerticalLayoutContainer gridContainer = new VerticalLayoutContainer();
	gridContainer.setWidth(500);
	gridContainer.setHeight(320);
	gridContainer.add(vehiculeGrid, new VerticalLayoutData(1, 1));				
	hPanel.add(gridContainer);
	hPanel.add(vehicleToolBar);
	return hPanel;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:26,代码来源:VehicleDialog.java

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

示例3: AlertButton

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * @param title The text that will appear on the button face.
 * @param alertStyle the dependent style suffix that will be appended to the default GWT style when the user is to be alerted.
 */
public AlertButton(String title, String alertStyle) {
    button = new PushButton(title);
    button.addStyleDependentName("SMALLER");
    panel = new HorizontalPanel();
    panel.setBorderWidth(1);
    checkBox = new CheckBox();
    panel.add(button);
    button.setSize("66", "21");
    panel.add(checkBox);
    checkBox.setSize("20", "20");
    ClientFactory cf = GWT.create(ClientFactory.class);
    eventBus = cf.getEventBus();
    this.alertStyle = alertStyle;
    eventBus.addHandler(WidgetSelectionChangeEvent.TYPE, updateNeededEventHandler);
    eventBus.addHandler(VariableSelectionChangeEvent.TYPE, variableChangedEventHandler);
    eventBus.addHandler(UpdateFinishedEvent.TYPE, updateFinishedHandler);
    eventBus.addHandler(MapChangeEvent.TYPE, mapChangeHandler);
    initWidget(panel);
    panel.setSize("90", "23");
    this.ensureDebugId("AlertButton");
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:26,代码来源:AlertButton.java

示例4: MailDashboard

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * GeneralDashboard
 */
public MailDashboard() {
	vPanelLeft = new VerticalPanel();
	vPanelRight = new VerticalPanel();
	hPanel = new HorizontalPanel();

	userLastImportedMails = new DashboardWidget("UserLastImportedMails",
			"dashboard.mail.last.imported.mails", "img/email.gif", true, "userLastImportedMails");
	userLastImportedAttachments = new DashboardWidget("UserLastImportedMailAttachments",
			"dashboard.mail.last.imported.attached.documents", "img/email_attach.gif", true,
			"userLastImportedMailAttachments");

	vPanelLeft.add(userLastImportedMails);
	vPanelRight.add(userLastImportedAttachments);

	hPanel.add(vPanelLeft);
	hPanel.add(vPanelRight);

	initWidget(hPanel);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:23,代码来源:MailDashboard.java

示例5: WorkflowDashboard

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * UserDashboard
 */
public WorkflowDashboard() {
	vPanelLeft = new VerticalPanel();
	vPanelRight = new VerticalPanel();
	hPanel = new HorizontalPanel();

	hPanel.add(vPanelLeft);
	hPanel.add(vPanelRight);

	pendingTasks = new WorkflowWidget("dashboard.workflow.pending.tasks", "img/icon/workflow.gif", true);
	pendingPooledTasks = new WorkflowWidget("dashboard.workflow.pending.tasks.unassigned", "img/icon/workflow.gif", true);
	pendingTasks.setIsWidgetPendingTask();
	pendingPooledTasks.setIsWidgetPooledTask();
	workflowFormPanel = new WorkflowFormPanel();

	vPanelLeft.add(pendingTasks);
	vPanelLeft.add(pendingPooledTasks);
	vPanelRight.add(workflowFormPanel);

	hPanel.setHeight("100%");
	vPanelRight.setHeight("100%");

	initWidget(hPanel);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:27,代码来源:WorkflowDashboard.java

示例6: Status

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * The status
 */
public Status() {
	super(false, true);
	hPanel = new HorizontalPanel();
	image = new Image(OKMBundleResources.INSTANCE.indicator());
	msg = new HTML("");
	space = new HTML("");

	hPanel.add(image);
	hPanel.add(msg);
	hPanel.add(space);

	hPanel.setCellVerticalAlignment(image, HasAlignment.ALIGN_MIDDLE);
	hPanel.setCellVerticalAlignment(msg, HasAlignment.ALIGN_MIDDLE);
	hPanel.setCellHorizontalAlignment(image, HasAlignment.ALIGN_CENTER);
	hPanel.setCellWidth(image, "30px");
	hPanel.setCellWidth(space, "7px");

	hPanel.setHeight("25px");

	msg.setStyleName("okm-NoWrap");

	super.hide();
	setWidget(hPanel);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:28,代码来源:Status.java

示例7: Status

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * Status
 */
public Status() {
	super(false, true);
	hPanel = new HorizontalPanel();
	image = new Image(OKMBundleResources.INSTANCE.indicator());
	msg = new HTML("");
	space = new HTML("");

	hPanel.add(image);
	hPanel.add(msg);
	hPanel.add(space);

	hPanel.setCellVerticalAlignment(image, HasAlignment.ALIGN_MIDDLE);
	hPanel.setCellVerticalAlignment(msg, HasAlignment.ALIGN_MIDDLE);
	hPanel.setCellHorizontalAlignment(image, HasAlignment.ALIGN_CENTER);
	hPanel.setCellWidth(image, "30px");
	hPanel.setCellWidth(space, "7px");

	hPanel.setHeight("25px");

	msg.setStyleName("okm-NoWrap");

	super.hide();
	setWidget(hPanel);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:28,代码来源:Status.java

示例8: create

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * Creates dialog box.
 *
 * @param popup - UniversalPopup on which the dialog is based
 * @param title - title placed in the title bar
 * @param innerWidget - the inner widget of the dialog
 * @param dialogButtons - buttons
 */
public static void create(UniversalPopup popup, String title, Widget innerWidget,
    DialogButton[] dialogButtons) {
  // Title
  popup.getTitleBar().setTitleText(title);

  VerticalPanel contents = new VerticalPanel();
  popup.add(contents);

  // Message
  contents.add(innerWidget);

  // Buttons
  HorizontalPanel buttonPanel = new HorizontalPanel();
  for (DialogButton dialogButton : dialogButtons) {
    Button button = new Button(dialogButton.getTitle());
    button.setStyleName(Dialog.getCss().dialogButton());
    buttonPanel.add(button);
    dialogButton.link(button);
  }
  contents.add(buttonPanel);
  buttonPanel.setStyleName(Dialog.getCss().dialogButtonPanel());
  contents.setCellHorizontalAlignment(buttonPanel, HasHorizontalAlignment.ALIGN_RIGHT);
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:32,代码来源:DialogBox.java

示例9: createWaitingDialog

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private static DialogBox createWaitingDialog( final String message ) {
	final DialogBox dialogBox = new DialogBox();
	dialogBox.setText( "Info" );
	
	final HorizontalPanel hp = new HorizontalPanel();
	DOM.setStyleAttribute( hp.getElement(), "padding", "20px" );
	hp.setHeight( "20px" );
	hp.add( new Image( "/images/loading.gif" ) );
	hp.add( ClientUtils.createHorizontalEmptyWidget( 5 ) );
	hp.add( new Label( message ) );
	dialogBox.setWidget( hp );
	
	dialogBox.center();
	
	return dialogBox;
}
 
开发者ID:icza,项目名称:sc2gears,代码行数:17,代码来源:User.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: load

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public void load(String objectType, Long objectId) {
	setErrorText("");
	setLoadingText("");
	this.objectType = objectType;
	
	vPanel.clear();
	vPanel.add(new HTML("Problem <i>" + objectType + "</i> successfully created."));
	
	HorizontalPanel bPanel = new HorizontalPanel();
	bPanel.add(newProblem);
	bPanel.add(listProblem);
	bPanel.add(editProblem);
	newProblem.addClickListener(this);
	listProblem.addClickListener(this);
	editProblem.addClickListener(this);
	
	vPanel.add(bPanel);
	
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:20,代码来源:ConfirmNewProblemtScreen.java

示例12: renderTextBox

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private TextBox renderTextBox(LabeledWidgetsGrid g, ConfigParameterInfo param) {
  NpTextBox textBox = param.type().equals("STRING") ? new NpTextBox() : new NpIntTextBox();
  if (param.inheritable()) {
    textBox.setValue(param.configuredValue());
    Label inheritedLabel =
        new Label(AdminMessages.I.pluginProjectInheritedValue(param.inheritedValue()));
    inheritedLabel.setStyleName(Gerrit.RESOURCES.css().pluginProjectConfigInheritedValue());
    HorizontalPanel p = new HorizontalPanel();
    p.add(textBox);
    p.add(inheritedLabel);
    addWidget(g, p, param);
  } else {
    textBox.setValue(param.value());
    addWidget(g, textBox, param);
  }
  saveEnabler.listenTo(textBox);
  return textBox;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:19,代码来源:ProjectInfoScreen.java

示例13: addDialogWidgets

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void addDialogWidgets() {
	VerticalPanel dialogVPanel = new VerticalPanel();
	HorizontalPanel buttonsHPanel = new HorizontalPanel();
	Button cancelButton = new Button("Cancel");
			
	cancelButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			typeError.setText(null);
			dialogBox.hide();
		}
	});
	
	buttonsHPanel.add(updateButton);
	buttonsHPanel.add(cancelButton);
	buttonsHPanel.addStyleName("dialog-buttons");	
	
	dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_LEFT);
	dialogVPanel.add(grid);		
	dialogVPanel.add(typeError);
	dialogVPanel.add(buttonsHPanel);
	dialogVPanel.setCellHorizontalAlignment(buttonsHPanel, VerticalPanel.ALIGN_CENTER);
	
			
	dialogBox.setWidget(dialogVPanel);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:26,代码来源:EditSynonymPopup.java

示例14: createView

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public void createView() {
	leftButton = new Button( getLeftButtonName() );
	rightButton = new Button( getRightButtonName() );

	Grid grid = new Grid( 2, 2 );
	grid.setText( 0, 0, "Name :" );
	grid.setWidget( 0, 1, createAndGetNameWidget() );

	HorizontalPanel buttons = new HorizontalPanel();
	buttons.add( leftButton );
	buttons.add( rightButton );

	grid.setWidget( 1, 1, buttons );

	setWidget( grid );
}
 
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:17,代码来源:AbstractProductView.java

示例15: getZoomToolGroup2Tools

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private HorizontalPanel getZoomToolGroup2Tools() {
	HorizontalPanel horizontalGroup = new HorizontalPanel();
	horizontalGroup.getElement().getStyle()
			.setVerticalAlign(VerticalAlign.MIDDLE);
	horizontalGroup.setSpacing(5);

	horizontalGroup.add(zoomIn);
	horizontalGroup.add(zoomOut);
	horizontalGroup.add(zoomToSeletionTool);

	return horizontalGroup;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:13,代码来源:MenuPanelWidget.java


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