/** * Constructs an empty HorizontalLayout. */ public HorizontalLayout() { super(); setSpacing(false); }
public BreadcrumbComponent() { final HorizontalLayout rootLayout = new HorizontalLayout(); rootLayout.setSpacing(true); setCompositionRoot(rootLayout); setId("breadcrumbs"); }
private Layout createFooter() { HorizontalLayout footer = new HorizontalLayout(); footer.setSpacing(true); footer.setMargin(true); footer.setWidth(100, Unit.PERCENTAGE); footer.addComponent(okayButton); footer.setComponentAlignment(okayButton, Alignment.BOTTOM_RIGHT); return footer; }
@Override public Component initContent() { HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true); layout.setWidth("100%"); layout.addComponent(oidType); layout.addComponent(oidValue); layout.setExpandRatio(oidValue, 1); return layout; }
private Layout createMainArea(final String description) { HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true); layout.setMargin(true); layout.setWidth(100, Unit.PERCENTAGE); Label label = new Label(description, ContentMode.PREFORMATTED); label.setWidth(100, Unit.PERCENTAGE); layout.addComponent(label); return layout; }
/** * Convenience method for presenting notification indicator with string content. */ @Override public void openNotification(MessageStyleType type, boolean doesTimeout, String title, String linkText, final NotificationCallback callback) { HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true); layout.addComponent(new Label(title, ContentMode.HTML)); Button button = new Button(linkText, new ClickListener() { @Override public void buttonClick(ClickEvent event) { callback.onLinkClicked(); } }); button.setStyleName(BaseTheme.BUTTON_LINK); layout.addComponent(button); openNotification(type, doesTimeout, new ViewAdapter(layout)); }
public LayoutHintComponent(LayoutManager layoutManager, GraphContainer graphContainer) { this.layoutManager = layoutManager; final Label icon = new Label(); icon.setIcon(FontAwesome.INFO_CIRCLE); final Label text = new Label("A manual layout exists for the current selection."); final HorizontalLayout layout = new HorizontalLayout(); layout.addComponent(icon); layout.addComponent(text); layout.setDescription("Click to apply the manual layout"); layout.addLayoutClickListener((event) -> { graphContainer.setLayoutAlgorithm(new ManualLayoutAlgorithm(layoutManager)); graphContainer.redoLayout(); }); layout.setSpacing(true); setCompositionRoot(layout); }
horizontalLayout.addComponent(button); horizontalLayout.setSpacing(true);
horizontalLayout.addComponent(button); horizontalLayout.setSpacing(true);
Label label = new Label(translator.translate(DISABLE_PERIODIC_UPDATE)); optionEntry.addComponent(label); optionEntry.setSpacing(true); optionEntry.setComponentAlignment(disableSelection, Alignment.MIDDLE_RIGHT); optionEntry.setComponentAlignment(label, Alignment.MIDDLE_RIGHT); Component automaticUpdatePeriodControl = createAutomaticUpdatePeriodControl(combo); optionEntry.addComponent(automaticUpdatePeriodControl); optionEntry.setSpacing(true); optionEntry.setComponentAlignment(periodSelection, Alignment.MIDDLE_RIGHT); optionEntry.setComponentAlignment(automaticUpdatePeriodControl, Alignment.MIDDLE_RIGHT);
public HeaderPanel() { label = new Label(); label.setContentMode(ContentMode.HTML); helpPopupView = new PopupView(new HelpContent(UiState.ServiceConfigurationView)); helpPopupView.setVisible(false); helpPopupView.setPopupVisible(false); Button popupButton = UIHelper.createButton("", "help", Config.Icons.HELP, new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { helpPopupView.setPopupVisible(true); helpPopupView.setVisible(true); } }); HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true); layout.setMargin(true); layout.addComponent(popupButton); layout.addComponent(helpPopupView); layout.addComponent(label); layout.setComponentAlignment(label, Alignment.MIDDLE_LEFT); setContent(layout); }
public InfoDialog(String caption, String description) { setCaption(caption); setModal(true); setResizable(false); setClosable(false); setWidth(400, Unit.PIXELS); setHeight(200, Unit.PIXELS); okButton = UIHelper.createButton("ok", null, null, event -> InfoDialog.this.close()); okButton.setId("infoDialog.button.ok"); label.setValue(description); final HorizontalLayout buttonLayout = new HorizontalLayout(okButton); buttonLayout.setSpacing(true); layout.setSpacing(true); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(label); layout.addComponent(buttonLayout); layout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); setContent(layout); center(); }
contentLayout.setSpacing(true);
extraControls.setSpacing(true);
public ConfirmationDialog(String caption, String description) { setCaption(caption); setModal(true); setResizable(false); setClosable(false); setWidth(400, Unit.PIXELS); setHeight(200, Unit.PIXELS); addCloseListener(this); okButton = UIHelper.createButton("ok", null, null, this); okButton.setId("confirmationDialog.button.ok"); cancelButton = UIHelper.createButton("cancel", "cancels the current action.", null, this); cancelButton.setId("confirmationDialog.button.cancel"); label.setDescription(description); final HorizontalLayout buttonLayout = new HorizontalLayout(okButton, cancelButton); buttonLayout.setSpacing(true); layout.setSpacing(true); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(label); layout.addComponent(buttonLayout); layout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); setContent(layout); center(); }
/** * Override of CompletedLayout section.<br> * Used the configuration in order to define the action to perform and Thumbnail component to display. */ @Override protected Layout createCompletedActionLayout() { if (isReadOnly()) { return new HorizontalLayout(); } // Action Button (Upload new or delete). Default is always Upload HorizontalLayout actionLayout = new HorizontalLayout(); actionLayout.setSizeUndefined(); actionLayout.addStyleName("buttons"); actionLayout.setSpacing(true); // Add an Edit Button if the MediaFile has configured it. if (getValue() != null && !getValue().isEmpty() && getValue().getEditAssetAppConfiguration().hasEditConfig()) { Button edit = createEditButton(); actionLayout.addComponent(edit); } // Add Upload Button getUpload().setButtonCaption(getCaption(selectAnotherCaption, null)); actionLayout.addComponent(getUpload()); // Add a Remove Button if a file is present. if (getValue() != null && !getValue().isEmpty()) { Button delete = createDeleteButton(); actionLayout.addComponent(delete); actionLayout.setComponentAlignment(delete, Alignment.MIDDLE_LEFT); } return actionLayout; }
private Component getLegend(String entity) { HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setSpacing(true); horizontalLayout.addStyleName("summary"); horizontalLayout.addStyleName("global"); Label labelx = new Label(entity); labelx.addStyleName("summary-font-legend"); Image ackdImage = new Image(null, new ThemeResource("img/acknowledged.png")); ackdImage.setWidth(16, Sizeable.Unit.PIXELS); Image unackdImage = new Image(null, new ThemeResource("img/unacknowledged.png")); unackdImage.setWidth(16, Sizeable.Unit.PIXELS); Label dummyLabel = new Label(); dummyLabel.setWidth(32, Sizeable.Unit.PIXELS); horizontalLayout.addComponent(labelx); horizontalLayout.addComponent(ackdImage); horizontalLayout.addComponent(unackdImage); horizontalLayout.addComponent(dummyLabel); horizontalLayout.setComponentAlignment(ackdImage, Alignment.TOP_RIGHT); horizontalLayout.setComponentAlignment(unackdImage, Alignment.TOP_RIGHT); horizontalLayout.setExpandRatio(labelx, 4.0f); horizontalLayout.setExpandRatio(ackdImage, 1.0f); horizontalLayout.setExpandRatio(unackdImage, 1.0f); horizontalLayout.setExpandRatio(dummyLabel, 1.0f); horizontalLayout.setWidth(375, Sizeable.Unit.PIXELS); return horizontalLayout; }
defaultLayout.setSpacing(true); noDefaultsAvailable = new Label("No vertices found.<br/>Please add vertices manually.", ContentMode.HTML); noDefaultsAvailable.setVisible(false);
@Override public Object generateCell(Table source, Object itemId, Object columnId) { HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true);
buttonLayout.setSpacing(true);