Java Code Examples for com.google.gwt.user.client.ui.HorizontalPanel
The following examples show how to use
com.google.gwt.user.client.ui.HorizontalPanel. These examples are extracted from open source projects.
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 Project: core Source File: DebugPanelFilterWidget.java License: 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 2
Source Project: dashbuilder Source File: TableDisplayerView.java License: 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 Project: appinventor-extensions Source File: LabeledTextBox.java License: 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 4
Source Project: appinventor-extensions Source File: GalleryAppBox.java License: 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 5
Source Project: dashbuilder Source File: ColumnListEditorView.java License: 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 6
Source Project: unitime Source File: WebTable.java License: 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 7
Source Project: document-management-system Source File: MailDashboard.java License: 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 8
Source Project: document-management-system Source File: WorkflowWidget.java License: 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 9
Source Project: document-management-system Source File: Status.java License: 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 10
Source Project: sc2gears Source File: ApiUser.java License: 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 11
Source Project: sc2gears Source File: User.java License: 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 12
Source Project: geowe-core Source File: BasicToolBar.java License: 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 13
Source Project: geowe-core Source File: ZoomStatusWidget.java License: 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 14
Source Project: geowe-core Source File: JoinDataDialog.java License: 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 15
Source Project: geowe-core Source File: MenuPanelWidget.java License: GNU General Public License v3.0 | 5 votes |
private HorizontalPanel getExtentGroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.add(currentExtentTool); horizontalGroup.add(customExtentTool); horizontalGroup.add(lockCurrentExtentTool); return horizontalGroup; }
Example 16
Source Project: EasyML Source File: JobDescPopupPanel.java License: Apache License 2.0 | 5 votes |
public JobDescPopupPanel(String title) { Label label = new Label(title); label.setStyleName("bda-newjob-head"); verticalPanel.add(label); verticalPanel.add(createGrid()); HorizontalPanel hpanel = new HorizontalPanel(); hpanel.setStyleName("bda-newjob-hpanel"); verticalPanel.add(errorLabel); Button cancelBtn = new Button(Constants.studioUIMsg.cancel()); cancelBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { JobDescPopupPanel.this.hide(); } }); hpanel.add(submitBtn); hpanel.add(cancelBtn); submitBtn.removeStyleName("gwt-Button"); cancelBtn.removeStyleName("gwt-Button"); submitBtn.addStyleName("button-style"); cancelBtn.addStyleName("button-style"); errorLabel.setStyleName("error-label"); verticalPanel.add(hpanel); verticalPanel.addStyleName("bda-newjob"); this.setCloseEnable(false); }
Example 17
Source Project: unitime Source File: WebTable.java License: Apache License 2.0 | 5 votes |
public InstructorCell(ArrayList<String> names, ArrayList<String> emails, String separator) { super(null, separator); if (names != null && !names.isEmpty()) { separator = separator.replace(" ", " "); for (int i = 0; i < names.size(); i++) { String text = names.get(i) + (i + 1 < names.size() ? separator : ""); String email = (emails != null && i < emails.size() ? emails.get(i) : null); if (email != null && !email.isEmpty()) { iText += text; HorizontalPanel p = new HorizontalPanel(); p.setStyleName("instructor"); Anchor a = new Anchor(); a.setHref("mailto:" + email); a.setHTML(new Image(RESOURCES.email()).getElement().getString()); a.setTitle(MESSAGES.sendEmail(names.get(i))); a.setStyleName("unitime-SimpleLink"); a.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { event.stopPropagation(); } }); p.add(a); p.setCellVerticalAlignment(a, HasVerticalAlignment.ALIGN_MIDDLE); HTML h = new HTML(text, false); h.getElement().getStyle().setMarginLeft(2, Unit.PX); p.add(h); iPanel.add(p); iContent.add(h); } else add(text); } } else { add(" "); } }
Example 18
Source Project: calendar-component Source File: WeekGrid.java License: Apache License 2.0 | 5 votes |
public WeekGrid(VCalendar parent, boolean format24h) { setCalendar(parent); content = new HorizontalPanel(); timebar = new Timebar(format24h); content.add(timebar); wrapper = new SimplePanel(); wrapper.setStylePrimaryName("v-calendar-week-wrapper"); wrapper.add(content); setWidget(wrapper); }
Example 19
Source Project: appinventor-extensions Source File: ReportList.java License: Apache License 2.0 | 5 votes |
/** * Adds the header row to the table. * */ private void setHeaderRow() { table.getRowFormatter().setStyleName(0, "ode-ProjectHeaderRow"); HorizontalPanel reportHeader = new HorizontalPanel(); final Label reportHeaderLabel = new Label(MESSAGES.moderationReportTextHeader()); reportHeaderLabel.addStyleName("ode-ProjectHeaderLabel"); reportHeader.add(reportHeaderLabel); table.setWidget(0, 0, reportHeader); HorizontalPanel appHeader = new HorizontalPanel(); final Label appHeaderLabel = new Label(MESSAGES.moderationAppHeader()); appHeaderLabel.addStyleName("ode-ProjectHeaderLabel"); appHeader.add(appHeaderLabel); table.setWidget(0, 1, appHeader); HorizontalPanel dateCreatedHeader = new HorizontalPanel(); final Label dateCreatedHeaderLabel = new Label(MESSAGES.moderationReportDateCreatedHeader()); dateCreatedHeaderLabel.addStyleName("ode-ProjectHeaderLabel"); dateCreatedHeader.add(dateCreatedHeaderLabel); table.setWidget(0, 2, dateCreatedHeader); HorizontalPanel appAuthorHeader = new HorizontalPanel(); final Label appAuthorHeaderLabel = new Label(MESSAGES.moderationAppAuthorHeader()); appAuthorHeaderLabel.addStyleName("ode-ProjectHeaderLabel"); appAuthorHeader.add(appAuthorHeaderLabel); table.setWidget(0, 3, appAuthorHeader); HorizontalPanel reporterHeader = new HorizontalPanel(); final Label reporterHeaderLabel = new Label(MESSAGES.moderationReporterHeader()); reporterHeaderLabel.addStyleName("ode-ProjectHeaderLabel"); reporterHeader.add(reporterHeaderLabel); table.setWidget(0, 4, reporterHeader); }
Example 20
Source Project: appinventor-extensions Source File: DesignToolbar.java License: Apache License 2.0 | 5 votes |
/** * Initializes and assembles all commands into buttons in the toolbar. */ public DesignToolbar() { super(); isReadOnly = Ode.getInstance().isReadOnly(); projectNameLabel = new Label(); projectNameLabel.setStyleName("ya-ProjectName"); HorizontalPanel toolbar = (HorizontalPanel) getWidget(); toolbar.insert(projectNameLabel, 0); // width of palette minus cellspacing/border of buttons toolbar.setCellWidth(projectNameLabel, "222px"); addButton(new ToolbarItem(WIDGET_NAME_TUTORIAL_TOGGLE, MESSAGES.toggleTutorialButton(), new ToogleTutorialAction())); setButtonVisible(WIDGET_NAME_TUTORIAL_TOGGLE, false); // Don't show unless needed List<DropDownItem> screenItems = Lists.newArrayList(); addDropDownButton(WIDGET_NAME_SCREENS_DROPDOWN, MESSAGES.screensButton(), screenItems); if (AppInventorFeatures.allowMultiScreenApplications() && !isReadOnly) { addButton(new ToolbarItem(WIDGET_NAME_ADDFORM, MESSAGES.addFormButton(), new AddFormAction())); addButton(new ToolbarItem(WIDGET_NAME_REMOVEFORM, MESSAGES.removeFormButton(), new RemoveFormAction())); } addButton(new ToolbarItem(WIDGET_NAME_SWITCH_TO_FORM_EDITOR, MESSAGES.switchToFormEditorButton(), new SwitchToFormEditorAction()), true); addButton(new ToolbarItem(WIDGET_NAME_SWITCH_TO_BLOCKS_EDITOR, MESSAGES.switchToBlocksEditorButton(), new SwitchToBlocksEditorAction()), true); // Gray out the Designer button and enable the blocks button toggleEditor(false); Ode.getInstance().getTopToolbar().updateFileMenuButtons(0); }
Example 21
Source Project: appinventor-extensions Source File: LabeledTextBox.java License: Apache License 2.0 | 5 votes |
/** * Use this TextBox if you want to have text validation while a user is typing * * @param caption caption for leading label * @param validator The validator to use for a specific textBox */ public LabeledTextBox(String caption, Validator validator) { this.validator = validator; 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"); defaultTextBoxColor = textbox.getElement().getStyle().getBorderColor(); textbox.setWidth("100%"); panel.add(textbox); panel.setCellWidth(label, "40%"); panel.setCellVerticalAlignment(textbox, HasVerticalAlignment.ALIGN_MIDDLE); HorizontalPanel errorPanel = new HorizontalPanel(); errorLabel = new Label(""); errorPanel.add(errorLabel); VerticalPanel vp = new VerticalPanel(); vp.add(panel); vp.add(errorPanel); vp.setHeight("85px"); initWidget(vp); setWidth("100%"); }
Example 22
Source Project: geowe-core Source File: GeoDataImportDialog.java License: GNU General Public License v3.0 | 5 votes |
private Widget createUrlToShareAnchor() { urlPanel = new HorizontalPanel(); urlPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); urlPanel.setSpacing(1); urlToShareAnchor = new AnchorBuilder().build(); urlPanel.add(urlToShareAnchor); Image img = new Image(ImageProvider.INSTANCE.externalLink16()); urlPanel.add(img); urlPanel.setVisible(false); return urlPanel; }
Example 23
Source Project: appinventor-extensions Source File: ColumnLayout.java License: Apache License 2.0 | 5 votes |
@Override public void apply(WorkAreaPanel workArea) { // Clear base panel workArea.clear(); // Horizontal panel to hold columns HorizontalPanel horizontalPanel = new HorizontalPanel(); horizontalPanel.setSize("100%", "100%"); workArea.add(horizontalPanel); // Initialize columns for (Column column : columns) { horizontalPanel.add(column.columnPanel); workArea.getWidgetDragController().registerDropController(column); // Add invisible dummy widget to prevent column from collapsing when it contains no boxes column.columnPanel.add(new Label()); // Add boxes from layout List<BoxDescriptor> boxes = column.boxes; for (int index = 0; index < boxes.size(); index++) { BoxDescriptor bd = boxes.get(index); Box box = workArea.createBox(bd); if (box != null) { column.insert(box, index); box.restoreLayoutSettings(bd); } } } workArea.getWidgetDragController().addDragHandler(changeDetector); }
Example 24
Source Project: geowe-core Source File: SimpleThemingVerticalLegend.java License: GNU General Public License v3.0 | 5 votes |
@Override protected List<Widget> getData() { Map<String, String> attrColorMap = createAttributeColorMap(); List<Widget> widgets = new ArrayList<Widget>(); for (Entry<String, String> attr : attrColorMap.entrySet()) { HorizontalPanel hpanel = new HorizontalPanel(); hpanel.setSpacing(2); hpanel.add(getColorPanel(attr.getValue())); hpanel.add(new Label(attr.getKey())); widgets.add(hpanel); } return widgets; }
Example 25
Source Project: unitime Source File: CurriculaCourses.java License: Apache License 2.0 | 5 votes |
public void addBlankLine() { List<Widget> line = new ArrayList<Widget>(); HorizontalPanel hp = new HorizontalPanel(); line.add(hp); CurriculaCourseSelectionBox cx = new CurriculaCourseSelectionBox(); cx.setWidth("130px"); cx.addCourseSelectionHandler(iCourseChangedHandler); if (cx.getCourseFinder() instanceof HasOpenHandlers) ((HasOpenHandlers<PopupPanel>)cx.getCourseFinder()).addOpenHandler(new OpenHandler<PopupPanel>() { @Override public void onOpen(OpenEvent<PopupPanel> event) { iTable.clearHover(); } }); if (!iEditable) cx.setEnabled(false); line.add(cx); for (int col = 0; col < iClassifications.getClassifications().size(); col++) { ShareTextBox ex = new ShareTextBox(col, null, null); if (!iEditable) ex.setReadOnly(true); line.add(ex); EnrollmentLabel note = new EnrollmentLabel(col, null, null, null, null, null, null); line.add(note); } int row = iTable.addRow("", line); iTable.getRowFormatter().addStyleName(row, "unitime-NoPrint"); if (iVisibleCourses != null) iTable.getRowFormatter().setVisible(row, false); for (int col = 0; col < line.size(); col++) if (!iTable.getCellFormatter().isVisible(0, col)) iTable.getCellFormatter().setVisible(row, col, false); }
Example 26
Source Project: appinventor-extensions Source File: MockForm.java License: Apache License 2.0 | 5 votes |
PhoneBar() { phoneBarImage = new Image(images.phonebar()); bar = new DockPanel(); bar.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT); bar.add(phoneBarImage, DockPanel.EAST); initWidget(bar); setStylePrimaryName("ode-SimpleMockFormPhoneBar"); setSize("100%", HEIGHT + "px"); }
Example 27
Source Project: appinventor-extensions Source File: MockSwitch.java License: Apache License 2.0 | 5 votes |
/** * Creates a new MockSwitch component. * * @param editor editor of source file the component belongs to */ public MockSwitch(SimpleEditor editor) { super(editor, TYPE, images.toggleswitch()); panel = new HorizontalPanel(); switchLabel = new InlineHTML(); panel.add(switchLabel); toggleWidget = panel; isInitialized = false; initWrapper(toggleWidget); }
Example 28
Source Project: geowe-core Source File: MenuPanelWidget.java License: 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 29
Source Project: document-management-system Source File: ToolBarBoxExample.java License: GNU General Public License v2.0 | 5 votes |
/** * ToolBarBoxExample */ public ToolBarBoxExample() { toolBarBoxExtension = new ToolBarBoxExtension(new Image(OKMExtensionBundleExampleResources.INSTANCE.general()), "new toolbar") { @Override public Widget getWidget() { return hPanel; } }; hPanel = new HorizontalPanel(); hPanel.add(new HTML("new toolbarbox example")); }
Example 30
Source Project: core Source File: ServerSwitch.java License: 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; }