當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。