com.google.gwt.user.client.ui.HorizontalPanel Java Examples
The following examples show how to use
com.google.gwt.user.client.ui.HorizontalPanel.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ColumnListEditorView.java From dashbuilder with Apache License 2.0 | 6 votes |
@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; }
Example #2
Source File: TableDisplayerView.java From dashbuilder with Apache License 2.0 | 6 votes |
@Override public void createTable(int pageSize, FilterLabelSet filterLabelSet) { table = new PagedTable<>(pageSize); table.pageSizesSelector.setVisible(false); table.setEmptyTableCaption(TableConstants.INSTANCE.tableDisplayer_noDataAvailable()); tableProvider.addDataDisplay(table); HTMLElement element = filterLabelSet.getElement(); element.getStyle().setProperty("margin-bottom", "5px"); table.getLeftToolbar().add(ElementWrapperWidget.getWidget(filterLabelSet.getElement())); exportToCsvButton = new Button("", IconType.FILE_TEXT, e -> getPresenter().export(ExportFormat.CSV)); exportToXlsButton = new Button("", IconType.FILE_EXCEL_O, e -> getPresenter().export(ExportFormat.XLS)); exportToCsvButton.setTitle(TableConstants.INSTANCE.tableDisplayer_export_to_csv()); exportToXlsButton.setTitle(TableConstants.INSTANCE.tableDisplayer_export_to_xls()); HorizontalPanel rightToolbar = (HorizontalPanel) table.getRightToolbar(); rightToolbar.insert(exportToCsvButton, 0); rightToolbar.insert(exportToXlsButton, 1); rootPanel.add(table); }
Example #3
Source File: User.java From sc2gears with Apache License 2.0 | 6 votes |
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; }
Example #4
Source File: BasicToolBar.java From geowe-core with GNU General Public License v3.0 | 6 votes |
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); }
Example #5
Source File: ApiUser.java From sc2gears with Apache License 2.0 | 6 votes |
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; }
Example #6
Source File: ZoomStatusWidget.java From geowe-core with GNU General Public License v3.0 | 6 votes |
@Override public Widget asWidget() { if (widget == null) { final String width = "60px"; final String height = "10px"; widget = new HorizontalLayoutContainer(); widget.getElement().getStyle().setPosition(Position.ABSOLUTE); widget.getElement().getStyle().setLeft(10, Unit.PX); widget.getElement().getStyle().setBottom(90, Unit.PX); widget.setSize(width, height); hp = new HorizontalPanel(); hp.setSpacing(2); hp.getElement().getStyle().setBackgroundColor("#FFFFFF"); hp.setSize(width, height); hp.add(getZoomLabel()); widget.add(hp); } return widget; }
Example #7
Source File: LabeledTextBox.java From appinventor-extensions with Apache License 2.0 | 6 votes |
/** * Creates a new TextBox with the given leading caption. * * @param caption caption for leading label */ public LabeledTextBox(String caption) { HorizontalPanel panel = new HorizontalPanel(); Label label = new Label(caption); panel.add(label); panel.setCellVerticalAlignment(label, HasVerticalAlignment.ALIGN_MIDDLE); textbox = new TextBox(); textbox.setStylePrimaryName("ode-LabeledTextBox"); textbox.setWidth("100%"); panel.add(textbox); panel.setCellWidth(label, "40%"); panel.setCellVerticalAlignment(textbox, HasVerticalAlignment.ALIGN_MIDDLE); initWidget(panel); setWidth("100%"); }
Example #8
Source File: Status.java From document-management-system with GNU General Public License v2.0 | 6 votes |
/** * 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); }
Example #9
Source File: WorkflowWidget.java From document-management-system with GNU General Public License v2.0 | 6 votes |
/** * WorkflowWidget */ public WorkflowWidget(String name, String uuid, WorkflowWidgetToFire workflowWidgetToFire, Map<String, Object> workflowVariables) { this.name = name; this.uuid = uuid; this.workflowWidgetToFire = workflowWidgetToFire; this.workflowVariables = workflowVariables; drawed = false; vPanel = new VerticalPanel(); hPanel = new HorizontalPanel(); manager = new FormManager(this); vPanel.setWidth("300px"); vPanel.setHeight("50px"); vPanel.add(new HTML("<br>")); vPanel.add(manager.getTable()); vPanel.add(new HTML("<br>")); vPanel.setCellHorizontalAlignment(hPanel, VerticalPanel.ALIGN_CENTER); initWidget(vPanel); }
Example #10
Source File: JoinDataDialog.java From geowe-core with GNU General Public License v3.0 | 6 votes |
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); }
Example #11
Source File: DebugPanelFilterWidget.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public DebugPanelFilterWidget(DebugPanelFilterModel model) { HorizontalPanel panel = new HorizontalPanel(); panel.add(button = Utils.createMenuButton("Add/Edit Filter", null)); panel.add(new DebugPanelFilterTrail(model)); panel.setStyleName(Utils.style() + "-filters"); initWidget(panel); popup = new FilterPopup(model); button.addClickHandler(new ClickHandler() { //@Override public void onClick(ClickEvent event) { popup.setPopupPositionAndShow(new PopupPanel.PositionCallback() { //@Override public void setPosition(int offsetWidth, int offsetHeight) { popup.setPopupPosition( button.getAbsoluteLeft(), button.getAbsoluteTop() + button.getOffsetHeight()) ; } }); } }); }
Example #12
Source File: MailDashboard.java From document-management-system with GNU General Public License v2.0 | 6 votes |
/** * 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); }
Example #13
Source File: GalleryAppBox.java From appinventor-extensions with Apache License 2.0 | 6 votes |
/** * 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); }
Example #14
Source File: WebTable.java From unitime with Apache License 2.0 | 6 votes |
public IconCell(ImageResource resource, final String title, String text) { super(null); iIcon = new Image(resource); iIcon.setTitle(title); iIcon.setAltText(title); if (text != null && !text.isEmpty()) { iLabel = new HTML(text, false); iPanel = new HorizontalPanel(); iPanel.setStyleName("icon"); iPanel.add(iIcon); iPanel.add(iLabel); iIcon.getElement().getStyle().setPaddingRight(3, Unit.PX); iPanel.setCellVerticalAlignment(iIcon, HasVerticalAlignment.ALIGN_MIDDLE); } if (title != null && !title.isEmpty()) { iIcon.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { event.stopPropagation(); UniTimeConfirmationDialog.info(title); } }); } }
Example #15
Source File: MenuPanelWidget.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private HorizontalPanel getLayerGroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.add(addLayerTool); horizontalGroup.add(layerInfoTool); horizontalGroup.add(changeStyleTool); return horizontalGroup; }
Example #16
Source File: AttributeSearchDialog.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private HorizontalPanel createSearchButtonPanel() { HorizontalPanel hPanel = new HorizontalPanel(); hPanel.setSpacing(10); searchButton = getSearchMenuButton(); hPanel.add(searchButton); isCaseSensitive = new CheckBox(); isCaseSensitive.setBoxLabel(UIMessages.INSTANCE.caseSensitive()); isCaseSensitive.setValue(true); hPanel.add(isCaseSensitive); return hPanel; }
Example #17
Source File: JoinDataDialog.java From geowe-core with GNU General Public License v3.0 | 5 votes |
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); }
Example #18
Source File: MenuPanelWidget.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private HorizontalPanel getMapGroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.add(layerManagerTool); horizontalGroup.add(layerCatalogTool); horizontalGroup.add(basicToolBarTool); return horizontalGroup; }
Example #19
Source File: MenuPanelWidget.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private HorizontalPanel getMeasureToolGroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(measureAreaTool); horizontalGroup.add(measureTool); horizontalGroup.add(measureElementTool); return horizontalGroup; }
Example #20
Source File: GeoprocessDialog.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private void createGeoprocessAndDistanceField(final Geoprocesses spatialOperation) { spatialOperationComboBox = new GeoprocessComboBox( spatialOperation.getAll()); spatialOperationComboBox.setWidth(WIDTH_SPATIAL_OPERATION_COMBO); clearSpatialOperationComboBox(); spatialOperationComboBox .addSelectionHandler(new SelectionHandler<Geoprocess>() { @Override public void onSelection(SelectionEvent<Geoprocess> event) { spatialOperationComboBox.setValue( event.getSelectedItem(), true); if (event.getSelectedItem() instanceof BufferGeoprocess) { LAYER_COMBO_2.setValue(null); LAYER_COMBO_2.setEnabled(false); distanceTextField.setText("0"); distanceTextField.setEnabled(true); distanceTextField.setVisible(true); } else { LAYER_COMBO_2.setEnabled(true); distanceTextField.setText(""); distanceTextField.setEnabled(false); distanceTextField.setVisible(false); } } }); initDistanceTextField(); final HorizontalPanel horizontalGroup = getHorizontalPanel(); horizontalGroup.add(spatialOperationComboBox); horizontalGroup.add(distanceTextField); panel.add(horizontalGroup); }
Example #21
Source File: GeoprocessDialog.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private void createComboLayer(final ComboBox<VectorLayerInfo> combo, final String numCombo, final TextButton validateButton) { clearLayerComboBox(combo); combo.setTypeAhead(true); combo.setTriggerAction(TriggerAction.ALL); combo.setForceSelection(true); combo.setEditable(false); combo.enableEvents(); combo.setWidth(WIDTH_COMBO_LAYER); combo.setId(numCombo); combo.addSelectionHandler(new SelectionHandler<VectorLayerInfo>() { @Override public void onSelection(SelectionEvent<VectorLayerInfo> event) { combo.setValue(event.getSelectedItem(), true); List<VectorLayerInfo> updatedLayers = removeLayer(event .getSelectedItem()); if (COMBO1_ID.equals(combo.getId())) { updateCombo(LAYER_COMBO_2, LAYER_STORE_2, updatedLayers); } else { updateCombo(LAYER_COMBO_1, LAYER_STORE_1, updatedLayers); } } }); validateButton.setToolTip(UIMessages.INSTANCE .descriptionValidationToolText()); final HorizontalPanel horizontalGroup = getHorizontalPanel(); horizontalGroup.add(combo); horizontalGroup.add(validateButton); panel.add(new Label(UIMessages.INSTANCE.layerLabelText(numCombo))); panel.add(horizontalGroup); }
Example #22
Source File: GeoprocessDialog.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private HorizontalPanel getHorizontalPanel() { final HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); return horizontalGroup; }
Example #23
Source File: JoinDataDialog.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private void createLayerAttributeComboPanel() { layerAttributeComboPanel = new HorizontalPanel(); layerAttributeComboPanel.setWidth("100%"); layerAttributeComboPanel.addStyleName(ThemeStyles.get().style() .borderBottom()); layerAttributeComboPanel.setSpacing(5); layerAttributeComboPanel.setVisible(false); layerAttributeComboPanel.add(new Label(UIMessages.INSTANCE .layerSchemaToolText())); layerAttributeComboPanel.add(layerAttributeCombo); }
Example #24
Source File: AttributeSearchDialog.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private HorizontalPanel createAttrPanel(){ HorizontalPanel hPanel = new HorizontalPanel(); hPanel.setSpacing(10); hPanel.addStyleName(ThemeStyles.get().style().borderBottom()); hPanel.addStyleName(ThemeStyles.get().style().borderTop()); hPanel.add(getAttrCombo()); hPanel.add(getAttrValuePanel()); return hPanel; }
Example #25
Source File: GuestSignaturePanel.java From appengine-gwtguestbook-namespaces-java with Apache License 2.0 | 5 votes |
/** * Creates a guest signature panel, with components fully instantiated and * attached. * */ public GuestSignaturePanel() { entryUpdateHandlers = new ArrayList<EntryUpdateHandler>(); guestSignaturePanel = new HorizontalPanel(); // Create guest signature panel widgets guestNameBox = new TextBox(); guestMessageBox = new TextBox(); guestNameLabel = new Label("Your Name:"); guestMessageLabel = new Label("Message:"); signButton = new Button("Sign!"); // Set up the widget guest signature panel widget styles (additional to // standard styles) guestNameLabel.addStyleName("gb-Label"); guestMessageLabel.addStyleName("gb-Label"); guestNameBox.addStyleName("gb-NameBox"); guestMessageBox.addStyleName("gb-MessageBox"); // Attach components together guestSignaturePanel.add(guestNameLabel); guestSignaturePanel.add(guestNameBox); guestSignaturePanel.add(guestMessageLabel); guestSignaturePanel.add(guestMessageBox); guestSignaturePanel.add(signButton); signButton.addClickHandler(this); /* The initWidget(Widget) method inherited from the Composite class must be * called exactly once in the constructor to declare the widget that this * composite class is wrapping. */ initWidget(guestSignaturePanel); }
Example #26
Source File: MenuPanelWidget.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private HorizontalPanel getLayer2GroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.add(searchAttributeTool); horizontalGroup.add(snappingTool); horizontalGroup.add(geometricAnalysisTool); return horizontalGroup; }
Example #27
Source File: MenuPanelWidget.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private HorizontalPanel getDrawToolGroup2Tools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(lineStringTool); horizontalGroup.add(pointTool); horizontalGroup.add(circleTool); return horizontalGroup; }
Example #28
Source File: ServerSwitch.java From core with GNU Lesser General Public License v2.1 | 5 votes |
public Widget asWidget() { HorizontalPanel layout = new HorizontalPanel(); layout.setStyleName("fill-layout-width"); layout.add(new ContentHeaderLabel("Transaction Metrics")); serverSelection= new ComboBox(); serverSelection.addValueChangeHandler(new ValueChangeHandler<String>() { @Override public void onValueChange(ValueChangeEvent<String> event) { } }); HorizontalPanel inner = new HorizontalPanel(); inner.setStyleName("fill-layout-width"); Label label = new Label("Server: "); label.setStyleName("header-label"); inner.add(label); label.getElement().getParentElement().setAttribute("align", "right"); Widget widget = serverSelection.asWidget(); inner.add(widget); widget.getElement().getParentElement().setAttribute("with", "100%"); layout.add(inner); return layout; }
Example #29
Source File: UserDashboard.java From document-management-system with GNU General Public License v2.0 | 5 votes |
/** * UserDashboard */ public UserDashboard() { vPanelLeft = new VerticalPanel(); vPanelRight = new VerticalPanel(); hPanel = new HorizontalPanel(); hPanel.add(vPanelLeft); hPanel.add(vPanelRight); lockedDocuments = new DashboardWidget("UserLockedDocuments", "dashboard.user.locked.documents", "img/icon/lock.gif", true, "userLockedDocuments"); chechoutDocuments = new DashboardWidget("UserCheckedOutDocuments", "dashboard.user.checkout.documents", "img/icon/actions/checkout.gif", true, "userCheckedOutDocuments"); lastModifiedDocuments = new DashboardWidget("UserLastModifiedDocuments", "dashboard.user.last.modified.documents", "img/icon/actions/checkin.gif", true, "userLastModifiedDocuments"); lastDownloadedDocuments = new DashboardWidget("UserLastDownloadedDocuments", "dashboard.user.last.downloaded.documents", "img/icon/actions/download.gif", false, "userLastDownloadedDocuments"); subscribedDocuments = new DashboardWidget("UserSubscribedDocuments", "dashboard.user.subscribed.documents", "img/icon/subscribed.gif", false, "userSubscribedDocuments"); subscribedFolder = new DashboardWidget("UserSubscribedFolders", "dashboard.user.subscribed.folders", "img/icon/subscribed.gif", false, "userSubscribedFolders"); lastUploadedDocuments = new DashboardWidget("UserLastUploadedDocuments", "dashboard.user.last.uploaded.documents", "img/icon/actions/add_document.gif", true, "userLastUploadedDocuments"); vPanelLeft.add(lockedDocuments); vPanelLeft.add(chechoutDocuments); vPanelLeft.add(lastDownloadedDocuments); vPanelRight.add(lastModifiedDocuments); vPanelRight.add(lastUploadedDocuments); vPanelLeft.add(subscribedDocuments); vPanelLeft.add(subscribedFolder); initWidget(hPanel); }
Example #30
Source File: MenuPanelWidget.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private HorizontalPanel getProjectGroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.add(openProjectTool); horizontalGroup.add(saveProjectTool); horizontalGroup.add(infoProjectTool); return horizontalGroup; }