com.google.gwt.user.client.ui.VerticalPanel Java Examples
The following examples show how to use
com.google.gwt.user.client.ui.VerticalPanel.
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: PIDTable.java From core with GNU Lesser General Public License v2.1 | 6 votes |
Widget asWidget() { VerticalPanel layout = new VerticalPanel(); layout.setStyleName("fill-layout-width"); table = new DefaultCellTable<ConfigAdminData>(10); dataProvider = new ListDataProvider<ConfigAdminData>(); dataProvider.addDataDisplay(table); TextColumn<ConfigAdminData> pidColumn = new TextColumn<ConfigAdminData>() { @Override public String getValue(ConfigAdminData pidEntry) { return pidEntry.getPid(); } }; table.addColumn(pidColumn, Console.CONSTANTS.subsys_configadmin_PIDShort()); layout.add(table); DefaultPager pager = new DefaultPager(); pager.setDisplay(table); layout.add(pager); return layout; }
Example #2
Source File: GenericListComplexAttribute.java From core with GNU Lesser General Public License v2.1 | 6 votes |
@SuppressWarnings("unchecked") public Widget asWidget() { VerticalPanel panel = new VerticalPanel(); panel.addStyleName("fill-layout-width"); setupTable(); dataProvider = new ListDataProvider<>(); dataProvider.addDataDisplay(table); panel.add(setupTableButtons()); panel.add(table); DefaultPager pager = new DefaultPager(); pager.setDisplay(table); panel.add(pager); return panel; }
Example #3
Source File: UploadStep.java From core with GNU Lesser General Public License v2.1 | 6 votes |
@Override protected Widget asWidget(final Context context) { final FlowPanel panel = new FlowPanel(); HTML description = new HTML(Console.CONSTANTS.common_label_chooseFile()); description.getElement().setAttribute("style", "padding-bottom:15px;"); panel.add(description); form = new FormPanel(); // create a panel to hold all of the form widgets. VerticalPanel formPanel = new VerticalPanel(); form.setWidget(formPanel); // create a FileUpload widgets. fileUpload = new FileUpload(); fileUpload.setName("uploadFormElement"); IdHelper.setId(fileUpload, id(), "file"); formPanel.add(fileUpload); panel.add(form); return panel; }
Example #4
Source File: ServerPicker.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public Widget asWidget() { VerticalPanel layout = new VerticalPanel(); layout.getElement().setAttribute("title", "Select Server Instance"); layout.setStyleName("fill-layout-width"); //layout.addStyleName("lhs-selector"); hostServerTable = new HostServerTable(); hostServerTable.setPopupWidth(400); hostServerTable.setDescription(Console.CONSTANTS.server_instance_pleaseSelect()); Widget widget = hostServerTable.asWidget(); layout.add(widget); return layout; }
Example #5
Source File: FormEditor.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public Widget asWidget() { VerticalPanel panel = new VerticalPanel(); panel.setStyleName("fill-layout-width"); form.setNumColumns(2); form.setEnabled(false); tools = new FormToolStrip<T>(form, callback); tools.providesDeleteOp(false); final FormHelpPanel helpPanel = new FormHelpPanel( new FormHelpPanel.AddressCallback() { @Override public ModelNode getAddress() { return helpAddress; } }, form ); panel.add(tools.asWidget()); panel.add(helpPanel.asWidget()); panel.add(form.asWidget()); return panel; }
Example #6
Source File: ProjectEditor.java From appinventor-extensions with Apache License 2.0 | 6 votes |
/** * Creates a {@code ProjectEditor} instance. * * @param projectRootNode the project root node */ public ProjectEditor(ProjectRootNode projectRootNode) { this.projectRootNode = projectRootNode; projectId = projectRootNode.getProjectId(); project = Ode.getInstance().getProjectManager().getProject(projectId); openFileEditors = Maps.newHashMap(); fileIds = new ArrayList<String>(); deckPanel = new DeckPanel(); VerticalPanel panel = new VerticalPanel(); panel.add(deckPanel); deckPanel.setSize("100%", "100%"); panel.setSize("100%", "100%"); initWidget(panel); // Note: I'm not sure that the setSize call below does anything useful. setSize("100%", "100%"); }
Example #7
Source File: SimpleNonVisibleComponentsPanel.java From appinventor-extensions with Apache License 2.0 | 6 votes |
/** * Creates new component design panel for non-visible components. */ public SimpleNonVisibleComponentsPanel() { // Initialize UI VerticalPanel panel = new VerticalPanel(); panel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER); heading = new Label(""); heading.setStyleName("ya-NonVisibleComponentsHeader"); panel.add(heading); componentsPanel = new FlowPanel(); componentsPanel.setStyleName("ode-SimpleUiDesignerNonVisibleComponents"); panel.add(componentsPanel); initWidget(panel); }
Example #8
Source File: DialogBox.java From incubator-retired-wave with Apache License 2.0 | 6 votes |
/** * 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 */ static public 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); }
Example #9
Source File: StatusPanelWidget.java From geowe-core with GNU General Public License v3.0 | 6 votes |
private void initializeStatusPanel() { String comboWidth = "125px"; statusPanel = new VerticalPanel(); StyleInjector.inject(".statusPanelStyle { " + "background: #E0ECF8;" + "border-radius: 5px 10px;" + "opacity: 0.8}"); statusPanel.setStyleName("statusPanelStyle"); statusPanel.setSpacing(5); statusPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); initializeLayerCombo(comboWidth); initializeEpsgCombo(comboWidth); initializeStatusGrid(); statusPanel.add(new FieldLabel(layerCombo, UIMessages.INSTANCE .sbSelectLayerLabel())); statusPanel.add(new FieldLabel(epsgCombo, UIMessages.INSTANCE .sbEpsgLabel())); statusPanel.add(statusGrid); statusPanel.setVisible(false); }
Example #10
Source File: ComplexColorPicker.java From swellrt with Apache License 2.0 | 6 votes |
public ComplexColorPicker() { style.ensureInjected(); // The background color can be set to "none" noneBtn = new PushButton(messages.none()); noneBtn.addStyleName(ComplexColorPicker.style.buttonsMargins()); noneBtn.setStylePrimaryName(ComplexColorPicker.style.customColorPushbutton()); noneBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { listener.onNoneColorChoose(); } }); vp = new VerticalPanel(); // We use a simple color picker by default simplePicker = new SimpleColorPicker(this); vp.add(simplePicker); vp.add(noneBtn); super.add(vp); }
Example #11
Source File: YoungAndroidPalettePanel.java From appinventor-extensions with Apache License 2.0 | 6 votes |
private VerticalPanel addComponentCategory(ComponentCategory category) { VerticalPanel panel = new VerticalPanel(); panel.setWidth("100%"); categoryPanels.put(category, panel); // The production version will not include a mapping for Extension because // only compile-time categories are included. This allows us to i18n the // Extension title for the palette. int insert_index = Collections.binarySearch(categoryOrder, category.ordinal()); insert_index = - insert_index - 1; stackPalette.insert(panel, insert_index); String title = ""; if (ComponentCategory.EXTENSION.equals(category)) { title = MESSAGES.extensionComponentPallette(); initExtensionPanel(); } else { title = ComponentsTranslation.getCategoryName(category.getName()); } stackPalette.setStackText(insert_index, title); categoryOrder.add(insert_index, category.ordinal()); // When the categories are loaded, we want the first one open, which will almost always be User Interface stackPalette.showStack(0); return panel; }
Example #12
Source File: SampleEntryPoint.java From gwteventbinder with Apache License 2.0 | 6 votes |
@Override public void onModuleLoad() { // Create the object graph - a real application would use Gin SimpleEventBus eventBus = new SimpleEventBus(); SidebarPresenter sidebarPresenter = new SidebarPresenter(eventBus); Button sidebarView = new Button("Contacts"); sidebarView.getElement().getStyle().setFloat(Style.Float.LEFT); sidebarView.getElement().getStyle().setMarginRight(20, Unit.PX); sidebarPresenter.setView(sidebarView); RootPanel.get().add(sidebarView); ContactsPresenter contactsPresenter = new ContactsPresenter(eventBus); VerticalPanel contactsView = new VerticalPanel(); contactsPresenter.setView(contactsView); RootPanel.get().add(contactsView); // Start listening for events in the presenter contactsPresenter.start(); // Eagerly bind the server proxy ServerProxy server = new ServerProxy(eventBus); }
Example #13
Source File: OdeLog.java From appinventor-extensions with Apache License 2.0 | 6 votes |
/** * Creates a new output panel for displaying internal messages. */ private OdeLog() { // Initialize UI Button clearButton = new Button(MESSAGES.clearButton()); clearButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { clear(); } }); text = new HTML(); text.setWidth("100%"); VerticalPanel panel = new VerticalPanel(); panel.add(clearButton); panel.add(text); panel.setSize("100%", "100%"); panel.setCellHeight(text, "100%"); panel.setCellWidth(text, "100%"); initWidget(panel); }
Example #14
Source File: GitHubExportDialog.java From geowe-core with GNU General Public License v3.0 | 6 votes |
private Widget createAuthenticationPanel() { final VerticalPanel panel = new VerticalPanel(); panel.getElement().getStyle().setBackgroundColor("#E0ECF8"); panel.setWidth("350px"); panel.setSpacing(10); userNameField = new TextField(); userNameField.setTitle(UIMessages.INSTANCE.gitHubUserNameField()); userNameField.setEmptyText(UIMessages.INSTANCE.gitHubUserNameField()); userNameField.setWidth(FIELD_WIDTH); panel.add(userNameField); passwordField = new PasswordField(); passwordField.setTitle(UIMessages.INSTANCE.gitHubPasswordField()); passwordField.setEmptyText(UIMessages.INSTANCE.gitHubPasswordField()); passwordField.setWidth(FIELD_WIDTH); panel.add(passwordField); return panel; }
Example #15
Source File: GitHubExportDialog.java From geowe-core with GNU General Public License v3.0 | 6 votes |
public GitHubExportDialog() { super(); this.setHeadingText(UIMessages.INSTANCE.gitHubExportDialogTitle()); this.getHeader().setIcon(ImageProvider.INSTANCE.github24()); this.setPredefinedButtons(PredefinedButton.CANCEL); this.setPixelSize(350, 350); this.setModal(true); this.setHideOnButtonClick(true); final VerticalPanel panel = new VerticalPanel(); panel.add(createAuthenticationPanel()); panel.add(createRepositoryPanel()); panel.add(createCommitPanel()); add(panel); createButton = new TextButton(UIMessages.INSTANCE.gitHubCreateButton()); updateButton = new TextButton(UIMessages.INSTANCE.gitHubUpdateButton()); getButtonBar().add(createButton); getButtonBar().add(updateButton); }
Example #16
Source File: CreateEmptyLayerTab.java From geowe-core with GNU General Public License v3.0 | 6 votes |
public VerticalPanel getEmptyPanel() { VerticalPanel geoDataContainer = new VerticalPanel(); geoDataContainer.setSpacing(5); geoDataContainer.setWidth("280px"); geoDataContainer.setSpacing(5); geoDataContainer.add(new Label(UIMessages.INSTANCE .createEmptyLayerToolText())); createAttributes = new CheckBox(); createAttributes.setBoxLabel(UIMessages.INSTANCE .celtAddAttributesLabel()); createAttributes.setValue(false); geoDataContainer.add(createAttributes); return geoDataContainer; }
Example #17
Source File: AccessControlProviderDialog.java From core with GNU Lesser General Public License v2.1 | 6 votes |
@Override public Widget asWidget() { VerticalPanel layout = new VerticalPanel(); layout.setStyleName("window-content"); SafeHtmlBuilder builder = new SafeHtmlBuilder(); builder.append(Console.MESSAGES.access_control_provider()); layout.add(new HTML(builder.toSafeHtml())); DialogueOptions options = new DialogueOptions( Console.CONSTANTS.common_label_done(), event -> presenter.closeWindow(), Console.CONSTANTS.common_label_cancel(), event -> presenter.closeWindow() ); options.showCancel(false); return new WindowContentBuilder(new ScrollPanel(layout), options).build(); }
Example #18
Source File: LayerManagerWidget.java From geowe-core with GNU General Public License v3.0 | 6 votes |
private VerticalPanel getFoot() { slider.setWidth("290px"); slider.disable(); slider.setIncrement(1); slider.addValueChangeHandler(new ValueChangeHandler<Integer>() { @Override public void onValueChange(final ValueChangeEvent<Integer> event) { final Layer layer = getSelectedLayer(getSelectedTabName()); layer.setOpacity((float) (event.getValue().intValue() / 100.0)); } }); final VerticalPanel panel = new VerticalPanel(); panel.setWidth("300px"); panel.addStyleName(ThemeStyles.get().style().borderTop()); panel.add(new HTML(UIMessages.INSTANCE.lmOpacityHtmlLabel())); panel.add(slider); panel.add(statusBar); return panel; }
Example #19
Source File: Ode.java From appinventor-extensions with Apache License 2.0 | 6 votes |
/** * This dialog is showned if an account is disabled. It is * completely modal with no escape. The provided URL is displayed in * an iframe, so it can be tailored to each person whose account is * disabled. * * @param Url the Url to display in the dialog box. */ public void disabledAccountDialog(String Url) { // Create the UI elements of the DialogBox final DialogBox dialogBox = new DialogBox(false, true); // DialogBox(autohide, modal) dialogBox.setStylePrimaryName("ode-DialogBox"); dialogBox.setText(MESSAGES.accountDisabledMessage()); dialogBox.setHeight("700px"); dialogBox.setWidth("700px"); dialogBox.setGlassEnabled(true); dialogBox.setAnimationEnabled(true); dialogBox.center(); VerticalPanel DialogBoxContents = new VerticalPanel(); HTML message = new HTML("<iframe src=\"" + Url + "\" style=\"border: 0; width: 680px; height: 660px;\"></iframe>"); message.setStyleName("DialogBox-message"); DialogBoxContents.add(message); dialogBox.setWidget(DialogBoxContents); dialogBox.show(); }
Example #20
Source File: OpenProjectDialog.java From geowe-core with GNU General Public License v3.0 | 6 votes |
private SelectHandler createUrlToShare(final VerticalPanel geoDataContainer) { return new SelectHandler() { @Override public void onSelect(SelectEvent event) { urlToShareAnchor.setHref(getHref()); urlToShareAnchor.setText( UIMessages.INSTANCE.seeOtherWindow("GeoWE Project"), Direction.LTR); urlShared.setText(getHref()); urlPanel.setVisible(true); urlShared.setVisible(true); } private String getHref() { String baseUrl = GWT.getHostPageBaseURL(); baseUrl += "?projectUrl=" + URL.encodeQueryString(urlTextField.getValue()); return baseUrl; } }; }
Example #21
Source File: ModelNodeFormBuilder.java From core with GNU Lesser General Public License v2.1 | 5 votes |
public Widget asWidget() { VerticalPanel formPanel = new VerticalPanel(); formPanel.setStyleName("fill-layout-width"); formPanel.add(getHelp().asWidget()); formPanel.add(getForm().asWidget()); return formPanel; }
Example #22
Source File: YoungAndroidPalettePanel.java From appinventor-extensions with Apache License 2.0 | 5 votes |
private void addPaletteItem(SimplePaletteItem component, ComponentCategory category) { VerticalPanel panel = categoryPanels.get(category); if (panel == null) { panel = addComponentCategory(category); } PaletteHelper paletteHelper = paletteHelpers.get(category); if (paletteHelper != null) { paletteHelper.addPaletteItem(panel, component); } else { panel.add(component); } }
Example #23
Source File: YoungAndroidPalettePanel.java From appinventor-extensions with Apache License 2.0 | 5 votes |
@Override public void clearComponents() { for (ComponentCategory category : categoryPanels.keySet()) { VerticalPanel panel = categoryPanels.get(category); panel.clear(); stackPalette.remove(panel); } for (PaletteHelper pal : paletteHelpers.values()) { pal.clear(); } categoryPanels.clear(); paletteHelpers.clear(); categoryOrder.clear(); simplePaletteItems.clear(); }
Example #24
Source File: HostSelector.java From core with GNU Lesser General Public License v2.1 | 5 votes |
public Widget asWidget() { VerticalPanel layout = new VerticalPanel(); layout.getElement().setId("host_selection"); layout.getElement().setAttribute("title", Console.CONSTANTS.pleaseChoseHost()); layout.setStyleName("fill-layout-width"); layout.addStyleName("lhs-selector"); layout.getElement().setAttribute("style", "padding:4px;"); hosts = new ComboPicker(); hosts.addValueChangeHandler(new ValueChangeHandler<String>() { @Override public void onValueChange(final ValueChangeEvent<String> event) { if (!event.getValue().isEmpty()) { Scheduler.get().scheduleDeferred( new Scheduler.ScheduledCommand() { @Override public void execute() { Console.getCircuit().dispatch(new HostSelection(hosts.getSelectedValue())); } } ); } } }); Label hostLabel = new Label("Host:"); hostLabel.setStyleName("header-label"); layout.add(hostLabel); Widget hWidget = hosts.asWidget(); hWidget.getElement().addClassName("table-picker"); layout.add(hWidget); // combo box use all available space hWidget.getElement().getParentElement().setAttribute("width", "100%"); return layout; }
Example #25
Source File: DebugPanelWidget.java From core with GNU Lesser General Public License v2.1 | 5 votes |
public void show(boolean showReset) { if (listener != null) { listener.onShow(); } VerticalPanel child = new VerticalPanel(); Widget[] widgets = new Widget[components.length]; for (int i = 0; i < components.length; i++) { child.add(widgets[i] = components[i].getWidget()); widgets[i].setVisible(components[i].isVisibleOnStartup()); } child.add(new DebugPanelLinks(components, widgets, showReset)); panel.clear(); panel.add(child); }
Example #26
Source File: NewTopicWizard.java From core with GNU Lesser General Public License v2.1 | 5 votes |
Widget asWidget() { VerticalPanel layout = new VerticalPanel(); layout.setStyleName("window-content"); Form<ActivemqJMSTopic> form = new Form<>(ActivemqJMSTopic.class); TextBoxItem name = new TextBoxItem("name", "Name"); ListItem jndiName = new JndiNamesItem("entries", "JNDI Names"); form.setFields(name, jndiName); FormHelpPanel helpPanel = new FormHelpPanel(() -> { ModelNode address = Baseadress.get(); address.add("subsystem", "messaging-activemq"); address.add("server", presenter.getCurrentServer()); address.add("jms-topic", "*"); return address; }, form); layout.add(helpPanel.asWidget()); layout.add(form.asWidget()); DialogueOptions options = new DialogueOptions( event -> { FormValidation validation = form.validate(); if (!validation.hasErrors()) { presenter.onCreateTopic(form.getUpdatedEntity()); } }, event -> presenter.closeDialogue() ); return new WindowContentBuilder(layout, options).build(); }
Example #27
Source File: Ode.java From appinventor-extensions with Apache License 2.0 | 5 votes |
/** * Display a Dialog box that explains that you cannot connect a * device or the emulator to App Inventor until you have a project * selected. */ private void wontConnectDialog() { // Create the UI elements of the DialogBox final DialogBox dialogBox = new DialogBox(false, true); // DialogBox(autohide, modal) dialogBox.setStylePrimaryName("ode-DialogBox"); dialogBox.setText(MESSAGES.noprojectDialogTitle()); dialogBox.setHeight("100px"); dialogBox.setWidth("400px"); dialogBox.setGlassEnabled(true); dialogBox.setAnimationEnabled(true); dialogBox.center(); VerticalPanel DialogBoxContents = new VerticalPanel(); HTML message = new HTML("<p>" + MESSAGES.noprojectDuringConnect() + "</p>"); message.setStyleName("DialogBox-message"); FlowPanel holder = new FlowPanel(); Button okButton = new Button("OK"); okButton.addClickListener(new ClickListener() { public void onClick(Widget sender) { dialogBox.hide(); } }); holder.add(okButton); DialogBoxContents.add(message); DialogBoxContents.add(holder); dialogBox.setWidget(DialogBoxContents); dialogBox.show(); }
Example #28
Source File: TabFolderStapling.java From document-management-system with GNU General Public License v2.0 | 5 votes |
public TabFolderStapling() { title = GeneralComunicator.i18nExtension("stapling.tab.folder.title"); vPanel = new VerticalPanel(); scrollPanel = new ScrollPanel(vPanel); table = new FlexTable(); vPanel.add(table); initWidget(scrollPanel); }
Example #29
Source File: SaveProjectDialog.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private Widget createPanel() { VerticalPanel vPanel = new VerticalPanel(); vPanel.setPixelSize(315, 400); vPanel.setSpacing(5); vPanel.add(createTopPanel()); return vPanel; }
Example #30
Source File: CommonCacheAttributes.java From core with GNU Lesser General Public License v2.1 | 5 votes |
Widget asWidget() { VerticalPanel p = new VerticalPanel(); p.setStyleName("fill-layout-width"); p.add(assets.getHelp().asWidget()); p.add(assets.getForm().asWidget()); return p; }