buttons.addComponent(cancel); buttons.setWidth("100%"); buttons.setHeight("30px"); buttons.setComponentAlignment(ok, Alignment.MIDDLE_CENTER); buttons.setComponentAlignment(cancel, Alignment.MIDDLE_CENTER);
private void updateComponentHeight() { if (container == null) return; if (getHeight() >= 0) { container.setHeight(100, Unit.PERCENTAGE); fileNameButton.setHeight(100, Unit.PERCENTAGE); uploadButton.setHeight(100, Unit.PERCENTAGE); clearButton.setHeight(100, Unit.PERCENTAGE); } else { container.setHeightUndefined(); fileNameButton.setHeightUndefined(); uploadButton.setHeightUndefined(); clearButton.setHeightUndefined(); } }
private HorizontalLayout getCaptionLayout() { final HorizontalLayout captionLayout = new HorizontalLayout(); captionLayout.setSizeFull(); captionLayout.setHeight("36px"); captionLayout.addComponents(windowCaption, closeButton); captionLayout.setExpandRatio(windowCaption, 1.0F); captionLayout.addStyleName("v-window-header"); return captionLayout; }
private HorizontalLayout getCaptionLayout() { final HorizontalLayout captionLayout = new HorizontalLayout(); captionLayout.setSizeFull(); captionLayout.setHeight("36px"); captionLayout.addComponents(windowCaption, closeButton); captionLayout.setExpandRatio(windowCaption, 1.0F); captionLayout.addStyleName("v-window-header"); return captionLayout; }
VerticalLayout vlMain = new VerticalLayout(); vlMain.setSizeFull(); HorizontalLayout hlFooter = new HorizontalLayout(); hlFooter.setHeight("50px"); // if you want you can define a height. hlFooter.addComponent(new Label("Test1")); // adding a simple component. You might want to set alignment for that component vlMain.addComponent(mainComponent); vlMain.setExpandRatio(mainComponent, 1.0f); // "give" the main component the maximum available space vlMain.addComponent(hlFooter);
/** * Initializes the upper left component. Does not show the mode switch. */ private void initUpperLeftComponent() { m_upperLeftComponent = new HorizontalLayout(); m_upperLeftComponent.setHeight("100%"); m_upperLeftComponent.setSpacing(true); m_upperLeftComponent.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT); m_upperLeftComponent.addComponent(m_languageSwitch); m_upperLeftComponent.addComponent(m_filePathLabel); }
private HorizontalLayout createLayout() { HorizontalLayout layout = new HorizontalLayout(); layout.setStyleName("main-screen"); layout.addComponent(this.menu); layout.addComponent(this.container); layout.setExpandRatio(this.container, 1); layout.setSizeFull(); layout.setSpacing(true); layout.setHeight(3000, Unit.PIXELS); return layout; }
protected void init() { this.setWidth("100%"); this.setHeight("100%"); HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setWidth("100%"); horizontalLayout.setHeight("100%"); horizontalLayout.setMargin(true); horizontalLayout.addComponent(new Label("I am the PROFILE panel!")); this.setContent(horizontalLayout); }
private void buildLayout() { final HorizontalLayout titleFilterIconsLayout = createHeaderFilterIconLayout(); titleFilterIconsLayout.addComponents(headerCaption, searchField, searchResetIcon); if (permissionChecker.hasCreateTargetPermission()) { titleFilterIconsLayout.addComponent(createfilterButton); titleFilterIconsLayout.setComponentAlignment(createfilterButton, Alignment.TOP_LEFT); } titleFilterIconsLayout.setExpandRatio(headerCaption, 0.3F); titleFilterIconsLayout.setExpandRatio(searchField, 0.7F); titleFilterIconsLayout.setHeight("40px"); addComponent(titleFilterIconsLayout); addStyleName("bordered-layout"); addStyleName("no-border-bottom"); }
private void buildLayout() { final HorizontalLayout titleFilterIconsLayout = createHeaderFilterIconLayout(); titleFilterIconsLayout.addComponents(headerCaption, searchField, searchResetIcon); if (permissionChecker.hasCreateTargetPermission()) { titleFilterIconsLayout.addComponent(createfilterButton); titleFilterIconsLayout.setComponentAlignment(createfilterButton, Alignment.TOP_LEFT); } titleFilterIconsLayout.setExpandRatio(headerCaption, 0.3F); titleFilterIconsLayout.setExpandRatio(searchField, 0.7F); titleFilterIconsLayout.setHeight("40px"); addComponent(titleFilterIconsLayout); addStyleName("bordered-layout"); addStyleName("no-border-bottom"); }
private void buildLayout() { setStyleName("filter-btns-header-layout"); typeHeaderLayout = new HorizontalLayout(); typeHeaderLayout.setHeight(32, Unit.PIXELS); typeHeaderLayout.setWidth(100.0F, Unit.PERCENTAGE); typeHeaderLayout.addComponentAsFirst(title); typeHeaderLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE); typeHeaderLayout.setComponentAlignment(title, Alignment.TOP_LEFT); if (menu != null) { typeHeaderLayout.addComponent(menu); typeHeaderLayout.setComponentAlignment(menu, Alignment.TOP_RIGHT); } typeHeaderLayout.addComponent(hideIcon); typeHeaderLayout.setComponentAlignment(hideIcon, Alignment.TOP_RIGHT); typeHeaderLayout.setExpandRatio(title, 1.0F); addComponent(typeHeaderLayout); }
public TaskListHeader() { this.i18nManager = ExplorerApp.get().getI18nManager(); this.taskService = ProcessEngines.getDefaultProcessEngine().getTaskService(); addStyleName(Reindeer.PANEL_LIGHT); addStyleName(ExplorerLayout.STYLE_SEARCHBOX); layout = new HorizontalLayout(); layout.setHeight(36, UNITS_PIXELS); layout.setWidth(99, UNITS_PERCENTAGE); // 99, otherwise the Panel will display scrollbars layout.setSpacing(true); layout.setMargin(false, true, false, true); setContent(layout); initInputField(); initKeyboardListener(); // initSortMenu(); }
private void buildLayout() { setStyleName("filter-btns-header-layout"); typeHeaderLayout = new HorizontalLayout(); typeHeaderLayout.setHeight(32, Unit.PIXELS); typeHeaderLayout.setWidth(100.0F, Unit.PERCENTAGE); typeHeaderLayout.addComponentAsFirst(title); typeHeaderLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE); typeHeaderLayout.setComponentAlignment(title, Alignment.TOP_LEFT); if (menu != null) { typeHeaderLayout.addComponent(menu); typeHeaderLayout.setComponentAlignment(menu, Alignment.TOP_RIGHT); } typeHeaderLayout.addComponent(hideIcon); typeHeaderLayout.setComponentAlignment(hideIcon, Alignment.TOP_RIGHT); typeHeaderLayout.setExpandRatio(title, 1.0F); addComponent(typeHeaderLayout); }
/** * Initializes the lower right component {@link #m_lowerRightComponent}, with all its components, i.e., * the "Add key" input field {@link #m_addKeyInput} and the "Add key" button. */ private void initLowerRightComponent() { initAddKeyInput(); Component addKeyButton = createAddKeyButton(); HorizontalLayout addKeyWrapper = new HorizontalLayout(addKeyButton); addKeyWrapper.setComponentAlignment(addKeyButton, Alignment.MIDDLE_CENTER); addKeyWrapper.setHeight("100%"); addKeyWrapper.setWidth(CmsMessageBundleEditorTypes.OPTION_COLUMN_WIDTH_PX); FormLayout inputForm = new FormLayout(m_addKeyInput); inputForm.setWidth("100%"); HorizontalLayout lowerRight = new HorizontalLayout(); lowerRight.setWidth("100%"); lowerRight.addComponent(inputForm); lowerRight.addComponent(addKeyWrapper); lowerRight.setExpandRatio(inputForm, 1f); m_lowerRightComponent = lowerRight; }
private void buildLayout() { final HorizontalLayout titleFilterIconsLayout = createHeaderFilterIconLayout(); titleFilterIconsLayout.addComponents(headerCaptionLayout); if (isAllowSearch() && isRollout()) { titleFilterIconsLayout.addComponents(searchField, searchResetIcon); titleFilterIconsLayout.setExpandRatio(headerCaptionLayout, 0.3F); titleFilterIconsLayout.setExpandRatio(searchField, 0.7F); } if (hasCreatePermission() && isRollout()) { titleFilterIconsLayout.addComponent(addButton); titleFilterIconsLayout.setComponentAlignment(addButton, Alignment.TOP_LEFT); } if (showCloseButton()) { titleFilterIconsLayout.addComponent(closeButton); titleFilterIconsLayout.setComponentAlignment(closeButton, Alignment.TOP_RIGHT); } titleFilterIconsLayout.setHeight("40px"); addComponent(titleFilterIconsLayout); addStyleName("bordered-layout"); addStyleName("no-border-bottom"); }
private void buildLayout() { final HorizontalLayout titleFilterIconsLayout = createHeaderFilterIconLayout(); titleFilterIconsLayout.addComponents(headerCaptionLayout); if (isAllowSearch() && isRollout()) { titleFilterIconsLayout.addComponents(searchField, searchResetIcon); titleFilterIconsLayout.setExpandRatio(headerCaptionLayout, 0.3F); titleFilterIconsLayout.setExpandRatio(searchField, 0.7F); } if (hasCreatePermission() && isRollout()) { titleFilterIconsLayout.addComponent(addButton); titleFilterIconsLayout.setComponentAlignment(addButton, Alignment.TOP_LEFT); } if (showCloseButton()) { titleFilterIconsLayout.addComponent(closeButton); titleFilterIconsLayout.setComponentAlignment(closeButton, Alignment.TOP_RIGHT); } titleFilterIconsLayout.setHeight("40px"); addComponent(titleFilterIconsLayout); addStyleName("bordered-layout"); addStyleName("no-border-bottom"); }
public NewMappingConfigurationWindow(MappingManagementService mappingConfigurationService, SystemEventService systemEventService, ExistingMappingConfigurationPanel existingMappingConfigurationPanel, IkasanUINavigator mappingNavigator) { super("New Mapping Configuration"); this.mappingConfigurationService = mappingConfigurationService; this.systemEventService = systemEventService; this.mappingConfiguration = new MappingConfiguration(); this.mappingConfiguration.setNumTargetValues(1); this.mappingConfiguration.setNumberOfParams(1); this.newMappingConfigurationDetailsPanel = new NewMappingConfigurationDetailsPanel(mappingConfigurationService, mappingConfiguration); this.newMappingConfigurationTypePanel = new NewMappingConfigurationTypePanel(); this.newMappingConfigurationManyToManyNumParamsPanel = new NewMappingConfigurationManyToManyNumParamsPanel(this.mappingConfiguration); this.newMappingConfigurationManyToManyTargetParamNamesPanel = new NewMappingConfigurationManyToManyTargetParamNamesPanel(this.mappingConfiguration); this.existingMappingConfiguratioSummaryPanel = new NewMappingConfigurationSummaryPanel(this.mappingConfiguration); this.newMappingConfigurationSourceParamNamesPanel = new NewMappingConfigurationManyToManySourceParamNamesPanel(); this.newMappingConfigurationManyToManyNameParamsPanel = new NewMappingConfigurationManyToManyNameParamsPanel(); this.newMappingConfigurationManyToOneNumParamsPanel = new NewMappingConfigurationManyToOneNumParamsPanel(this.mappingConfiguration); this.newMappingConfigurationManyToOneSourceParamNamesPanel = new NewMappingConfigurationManyToOneSourceParamNamesPanel(); this.newMappingConfigurationManyToOneNameParamsPanel = new NewMappingConfigurationManyToOneNameParamsPanel(); this.newMappingConfigurationPanel = existingMappingConfigurationPanel; this.mappingNavigator = mappingNavigator; this.viewPort = new HorizontalLayout(); this.viewPort.setWidth("100%"); this.viewPort.setHeight("550px"); init(); }
protected Component buildRootUpperBar() { // Logo final Link logo = new Link(null, new ExternalResource(MainUI.URI_PATH)); logo.setIcon(new ThemeResource("img/permazen-logo-48x48.png")); final HorizontalLayout logoLayout = new HorizontalLayout(); logoLayout.addStyleName("jsdb-upper-bar-company-logo-layout"); logoLayout.setWidth(48, Sizeable.Unit.PIXELS); logoLayout.addComponent(logo); logoLayout.setComponentAlignment(logo, Alignment.BOTTOM_LEFT); // Title final SizedLabel titleLabel = new SizedLabel(this.getTitle()); titleLabel.addStyleName("jsdb-title"); // Sequence parts final HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true); layout.setWidth("100%"); layout.setHeight(UPPER_BAR_HEIGHT, Sizeable.Unit.PIXELS); layout.addComponent(logoLayout); layout.setComponentAlignment(logoLayout, Alignment.BOTTOM_LEFT); layout.addComponent(titleLabel); layout.setExpandRatio(titleLabel, 1.0f); layout.setComponentAlignment(titleLabel, Alignment.BOTTOM_CENTER); final Component topRightLabel = this.getTopRightLabel(); if (topRightLabel != null) { layout.addComponent(topRightLabel); layout.setComponentAlignment(topRightLabel, Alignment.BOTTOM_RIGHT); } return layout; }
protected Component buildRootUpperBar() { // Logo final Link logo = new Link(null, new ExternalResource(MainUI.URI_PATH)); logo.setIcon(new ThemeResource("img/jsimpledb-logo-48x48.png")); final HorizontalLayout logoLayout = new HorizontalLayout(); logoLayout.addStyleName("jsdb-upper-bar-company-logo-layout"); logoLayout.setWidth(48, Sizeable.Unit.PIXELS); logoLayout.addComponent(logo); logoLayout.setComponentAlignment(logo, Alignment.BOTTOM_LEFT); // Title final SizedLabel titleLabel = new SizedLabel(this.getTitle()); titleLabel.addStyleName("jsdb-title"); // Sequence parts final HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true); layout.setWidth("100%"); layout.setHeight(UPPER_BAR_HEIGHT, Sizeable.Unit.PIXELS); layout.addComponent(logoLayout); layout.setComponentAlignment(logoLayout, Alignment.BOTTOM_LEFT); layout.addComponent(titleLabel); layout.setExpandRatio(titleLabel, 1.0f); layout.setComponentAlignment(titleLabel, Alignment.BOTTOM_CENTER); final Component topRightLabel = this.getTopRightLabel(); if (topRightLabel != null) { layout.addComponent(topRightLabel); layout.setComponentAlignment(topRightLabel, Alignment.BOTTOM_RIGHT); } return layout; }
headerWrapperLayout.addComponent(headerLayout); headerWrapperLayout.setWidth("100%"); headerLayout.setHeight("30px");