hsvLayout.setMargin(new MarginInfo(false, false, true, false)); hsvLayout.addComponent(hsvPreview); hsvLayout.setStyleName("hsvtab"); sliders.setStyleName("hsv-sliders");
rgbLayout.setMargin(new MarginInfo(false, false, true, false)); rgbLayout.addComponent(rgbPreview); rgbLayout.setStyleName("rgbtab"); sliders.setStyleName("rgb-sliders");
private VerticalLayout buildContent() { final VerticalLayout rootLayout = new VerticalLayout(); rootLayout.setSizeFull(); rootLayout.setStyleName("main-content"); rootLayout.addComponent(buildHeader()); addLoginForm(rootLayout); addFooter(rootLayout); return rootLayout; }
private VerticalLayout buildContent() { final VerticalLayout rootLayout = new VerticalLayout(); rootLayout.setSizeFull(); rootLayout.setStyleName("main-content"); rootLayout.addComponent(buildHeader()); addLoginForm(rootLayout); addFooter(rootLayout); return rootLayout; }
private void buildUI() { addStyleName("login-screen"); // login form, centered in the available part of the screen Component loginForm = buildLoginForm(); // layout to center login form when there is sufficient screen space // - see the theme for how this is made responsive for various screen // sizes VerticalLayout centeringLayout = new VerticalLayout(); centeringLayout.setStyleName("centering-layout"); centeringLayout.addComponent(loginForm); centeringLayout.setComponentAlignment(loginForm, Alignment.MIDDLE_CENTER); // information text about logging in CssLayout loginInformation = buildLoginInformation(); addComponent(centeringLayout); addComponent(loginInformation); }
@Override public void showCustomPopupActions(List<Action> actions) { VerticalLayout customContextMenu = new VerticalLayout(); customContextMenu.setMargin(false); customContextMenu.setSpacing(false); customContextMenu.setWidthUndefined(); customContextMenu.setStyleName("c-cm-container"); for (Action action : actions) { CubaButton contextMenuButton = createContextMenuButton(); initContextMenuButton(contextMenuButton, action); customContextMenu.addComponent(contextMenuButton); } if (customContextMenu.getComponentCount() > 0) { component.showCustomPopup(customContextMenu); component.setCustomPopupAutoClose(true); } }
private void viewListView() { removeAllComponents(); final VerticalLayout tableListViewLayout = new VerticalLayout(); tableListViewLayout.setSizeFull(); tableListViewLayout.setSpacing(false); tableListViewLayout.setMargin(false); tableListViewLayout.setStyleName("table-layout"); tableListViewLayout.addComponent(targetFilterHeader); tableListViewLayout.setComponentAlignment(targetFilterHeader, Alignment.TOP_CENTER); tableListViewLayout.addComponent(targetFilterTable); tableListViewLayout.setComponentAlignment(targetFilterTable, Alignment.TOP_CENTER); tableListViewLayout.setExpandRatio(targetFilterTable, 1.0F); addComponent(tableListViewLayout); }
private void viewListView() { removeAllComponents(); final VerticalLayout tableListViewLayout = new VerticalLayout(); tableListViewLayout.setSizeFull(); tableListViewLayout.setSpacing(false); tableListViewLayout.setMargin(false); tableListViewLayout.setStyleName("table-layout"); tableListViewLayout.addComponent(targetFilterHeader); tableListViewLayout.setComponentAlignment(targetFilterHeader, Alignment.TOP_CENTER); tableListViewLayout.addComponent(targetFilterTable); tableListViewLayout.setComponentAlignment(targetFilterTable, Alignment.TOP_CENTER); tableListViewLayout.setExpandRatio(targetFilterTable, 1.0F); addComponent(tableListViewLayout); }
private void init() { totalTargetsLabel = createTotalTargetsLabel(); unassignedTargetsLabel = createUnassignedTargetsLabel(); loadingLabel = createLoadingLabel(); loadingLabel.setVisible(false); groupsLegend = new VerticalLayout(); groupsLegend.setStyleName("groups-legend"); addComponent(totalTargetsLabel); addComponent(loadingLabel); addComponent(unassignedTargetsLabel); addComponent(groupsLegend); for (int i = 0; i < MAX_GROUPS_TO_BE_DISPLAYED; i++) { groupsLegend.addComponent(createGroupTargetsLabel()); } groupsLegend.addComponent(createToBeContinuedLabel()); }
private void init() { totalTargetsLabel = createTotalTargetsLabel(); unassignedTargetsLabel = createUnassignedTargetsLabel(); loadingLabel = createLoadingLabel(); loadingLabel.setVisible(false); groupsLegend = new VerticalLayout(); groupsLegend.setStyleName("groups-legend"); addComponent(totalTargetsLabel); addComponent(loadingLabel); addComponent(unassignedTargetsLabel); addComponent(groupsLegend); for (int i = 0; i < MAX_GROUPS_TO_BE_DISPLAYED; i++) { groupsLegend.addComponent(createGroupTargetsLabel()); } groupsLegend.addComponent(createToBeContinuedLabel()); }
@Override protected Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.setStyleName("stats-panel"); if (StringUtils.isNotBlank(styleName)) { layout.addStyleName(styleName); } statText = new Label(getStatistic()); statText.setSizeUndefined(); statText.setStyleName("stats-text"); statText.addStyleName(ValoTheme.LABEL_H1); statLabel = new Label(getStatisticLabel()); statLabel.setSizeUndefined(); statLabel.setStyleName("stats-label"); statLabel.addStyleName(ValoTheme.LABEL_H4); statInfo = new Label(getStatisticInfo(), ContentMode.HTML); statInfo.setStyleName("stats-info"); statPic = new Label(getStatisticIcon(), ContentMode.HTML); statPic.setStyleName("stats-icon"); layout.addComponents(statText, statLabel, statInfo, statPic); return layout; }
private void buildFilterDetailOrCreateView() { removeAllComponents(); final VerticalLayout tableHeaderLayout = new VerticalLayout(); tableHeaderLayout.setSizeFull(); tableHeaderLayout.setSpacing(false); tableHeaderLayout.setMargin(false); tableHeaderLayout.setStyleName("table-layout"); tableHeaderLayout.addComponent(createNewFilterHeader); tableHeaderLayout.setComponentAlignment(createNewFilterHeader, Alignment.TOP_CENTER); tableHeaderLayout.addComponent(createNewFilterTable); tableHeaderLayout.setComponentAlignment(createNewFilterTable, Alignment.TOP_CENTER); tableHeaderLayout.setExpandRatio(createNewFilterTable, 1.0F); addComponent(tableHeaderLayout); setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER); setExpandRatio(tableHeaderLayout, 1.0F); final HorizontalLayout targetsCountmessageLabelLayout = addTargetFilterMessageLabel(); addComponent(targetsCountmessageLabelLayout); setComponentAlignment(targetsCountmessageLabelLayout, Alignment.BOTTOM_CENTER); }
private void buildFilterDetailOrCreateView() { removeAllComponents(); final VerticalLayout tableHeaderLayout = new VerticalLayout(); tableHeaderLayout.setSizeFull(); tableHeaderLayout.setSpacing(false); tableHeaderLayout.setMargin(false); tableHeaderLayout.setStyleName("table-layout"); tableHeaderLayout.addComponent(createNewFilterHeader); tableHeaderLayout.setComponentAlignment(createNewFilterHeader, Alignment.TOP_CENTER); tableHeaderLayout.addComponent(createNewFilterTable); tableHeaderLayout.setComponentAlignment(createNewFilterTable, Alignment.TOP_CENTER); tableHeaderLayout.setExpandRatio(createNewFilterTable, 1.0F); addComponent(tableHeaderLayout); setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER); setExpandRatio(tableHeaderLayout, 1.0F); final HorizontalLayout targetsCountmessageLabelLayout = addTargetFilterMessageLabel(); addComponent(targetsCountmessageLabelLayout); setComponentAlignment(targetsCountmessageLabelLayout, Alignment.BOTTOM_CENTER); }
private VerticalLayout createDropAreaLayout() { final VerticalLayout dropAreaLayout = new VerticalLayout(); final Label dropHereLabel = new Label(i18n.getMessage(UIMessageIdProvider.LABEL_DROP_AREA_UPLOAD)); dropHereLabel.setWidth(null); final Label dropIcon = new Label(FontAwesome.ARROW_DOWN.getHtml(), ContentMode.HTML); dropIcon.addStyleName("drop-icon"); dropIcon.setWidth(null); dropAreaLayout.addComponent(dropIcon); dropAreaLayout.setComponentAlignment(dropIcon, Alignment.TOP_CENTER); dropAreaLayout.addComponent(dropHereLabel); dropAreaLayout.setComponentAlignment(dropHereLabel, Alignment.TOP_CENTER); uploadButtonLayout.setWidth(null); uploadButtonLayout.addStyleName("upload-button"); dropAreaLayout.addComponent(uploadButtonLayout); dropAreaLayout.setComponentAlignment(uploadButtonLayout, Alignment.BOTTOM_CENTER); dropAreaLayout.setSizeFull(); dropAreaLayout.setStyleName("upload-drop-area-layout-info"); dropAreaLayout.setSpacing(false); return dropAreaLayout; }
private VerticalLayout createDropAreaLayout() { final VerticalLayout dropAreaLayout = new VerticalLayout(); final Label dropHereLabel = new Label(i18n.getMessage(UIMessageIdProvider.LABEL_DROP_AREA_UPLOAD)); dropHereLabel.setWidth(null); final Label dropIcon = new Label(FontAwesome.ARROW_DOWN.getHtml(), ContentMode.HTML); dropIcon.addStyleName("drop-icon"); dropIcon.setWidth(null); dropAreaLayout.addComponent(dropIcon); dropAreaLayout.setComponentAlignment(dropIcon, Alignment.TOP_CENTER); dropAreaLayout.addComponent(dropHereLabel); dropAreaLayout.setComponentAlignment(dropHereLabel, Alignment.TOP_CENTER); uploadButtonLayout.setWidth(null); uploadButtonLayout.addStyleName("upload-button"); dropAreaLayout.addComponent(uploadButtonLayout); dropAreaLayout.setComponentAlignment(uploadButtonLayout, Alignment.BOTTOM_CENTER); dropAreaLayout.setSizeFull(); dropAreaLayout.setStyleName("upload-drop-area-layout-info"); dropAreaLayout.setSpacing(false); return dropAreaLayout; }
/** * Layouts header, grid and optional footer. */ protected void buildLayout() { setSizeFull(); setSpacing(true); setMargin(false); setStyleName("group"); final VerticalLayout gridHeaderLayout = new VerticalLayout(); gridHeaderLayout.setSizeFull(); gridHeaderLayout.setSpacing(false); gridHeaderLayout.setMargin(false); gridHeaderLayout.setStyleName("table-layout"); gridHeaderLayout.addComponent(gridHeader); gridHeaderLayout.setComponentAlignment(gridHeader, Alignment.TOP_CENTER); gridHeaderLayout.addComponent(grid); gridHeaderLayout.setComponentAlignment(grid, Alignment.TOP_CENTER); gridHeaderLayout.setExpandRatio(grid, 1.0F); addComponent(gridHeaderLayout); setComponentAlignment(gridHeaderLayout, Alignment.TOP_CENTER); setExpandRatio(gridHeaderLayout, 1.0F); if (hasFooterSupport()) { final Layout footerLayout = getFooterSupport().createFooterMessageComponent(); addComponent(footerLayout); setComponentAlignment(footerLayout, Alignment.BOTTOM_CENTER); } }
public OptionDialogBuilderImpl() { window = new CubaWindow(); window.setModal(true); window.setClosable(false); window.setResizable(false); messageLabel = new CubaLabel(); messageLabel.setWidth(100, Sizeable.Unit.PERCENTAGE); layout = new VerticalLayout(); layout.setStyleName("c-app-option-dialog"); layout.setMargin(false); layout.setSpacing(true); buttonsContainer = new HorizontalLayout(); buttonsContainer.setMargin(false); buttonsContainer.setSpacing(true); layout.addComponent(messageLabel); layout.addComponent(buttonsContainer); layout.setExpandRatio(messageLabel, 1); layout.setComponentAlignment(buttonsContainer, Alignment.BOTTOM_RIGHT); window.setContent(layout); ThemeConstants theme = ui.getApp().getThemeConstants(); window.setWidth(theme.get("cuba.web.WebWindowManager.optionDialog.width")); }
/** * Layouts header, grid and optional footer. */ protected void buildLayout() { setSizeFull(); setSpacing(true); setMargin(false); setStyleName("group"); final VerticalLayout gridHeaderLayout = new VerticalLayout(); gridHeaderLayout.setSizeFull(); gridHeaderLayout.setSpacing(false); gridHeaderLayout.setMargin(false); gridHeaderLayout.setStyleName("table-layout"); gridHeaderLayout.addComponent(gridHeader); gridHeaderLayout.setComponentAlignment(gridHeader, Alignment.TOP_CENTER); gridHeaderLayout.addComponent(grid); gridHeaderLayout.setComponentAlignment(grid, Alignment.TOP_CENTER); gridHeaderLayout.setExpandRatio(grid, 1.0F); addComponent(gridHeaderLayout); setComponentAlignment(gridHeaderLayout, Alignment.TOP_CENTER); setExpandRatio(gridHeaderLayout, 1.0F); if (hasFooterSupport()) { final Layout footerLayout = getFooterSupport().createFooterMessageComponent(); addComponent(footerLayout); setComponentAlignment(footerLayout, Alignment.BOTTOM_CENTER); } }
public MessageDialogBuilderImpl() { window = new CubaWindow(); window.setModal(true); window.setResizable(false); layout = new VerticalLayout(); layout.setStyleName("c-app-message-dialog"); layout.setMargin(false); layout.setSpacing(true); messageLabel = new CubaLabel(); messageLabel.setStyleName("c-app-message-dialog-text"); messageLabel.setWidth(100, Sizeable.Unit.PERCENTAGE); DialogAction action = new DialogAction(DialogAction.Type.OK); okButton = createButton(action); okButton.setClickHandler(me -> { try { action.actionPerform(ui.getTopLevelWindow()); } finally { ui.removeWindow(window); } }); layout.addComponent(messageLabel); layout.addComponent(okButton); layout.setComponentAlignment(okButton, Alignment.BOTTOM_RIGHT); window.setContent(layout); ThemeConstants theme = ui.getApp().getThemeConstants(); window.setWidth(theme.get("cuba.web.WebWindowManager.messageDialog.width")); }
tableHeaderLayout.setMargin(false); tableHeaderLayout.setStyleName("table-layout"); tableHeaderLayout.addComponent(tableHeader);