Refine search
private Component createComponent(BusinessServiceEdge ref) { FormLayout formLayout = new FormLayout(); formLayout.setMargin(false); formLayout.setSpacing(false); formLayout.addComponent(createLabel("Map Function", describeMapFunction(ref.getMapFunction()))); formLayout.addComponent(createLabel("Weight", Float.toString(ref.getWeight()))); return formLayout; }
private Layout createActivationsPerWorkspaceSection() { FormLayout layout = new FormLayout(); layout.setWidth("100%"); StaticField fieldsetTitle = createStaticField(null, i18n.translate("activationMonitor.activationsPerWorkspace.fieldset.label")); fieldsetTitle.addStyleName("fieldset-title"); layout.addComponent(fieldsetTitle); for (Map.Entry<String, Integer> entry : activationStorage.getActivationsPerWorkspace().entrySet()) { String workspace = entry.getKey(); Integer numberOfActivations = entry.getValue(); if (numberOfActivations > 0) { layout.addComponent(createStaticField(workspace, String.valueOf(numberOfActivations))); } } return layout; }
/** * Creates the upper right component of the options grid. * Creation includes the initialization of {@link #m_filePathField}. * * @return the upper right component in the options grid. */ private Component createUpperRightComponent() { HorizontalLayout upperRight = new HorizontalLayout(); upperRight.setSizeFull(); FormLayout fileNameDisplay = new FormLayout(); fileNameDisplay.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); fileNameDisplay.setSizeFull(); m_filePathField = new TextField(); m_filePathField.setWidth("100%"); m_filePathField.setEnabled(true); m_filePathField.setReadOnly(true); fileNameDisplay.addComponent(m_filePathField); fileNameDisplay.setSpacing(true); FormLayout filePathDisplay = new FormLayout(); filePathDisplay.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); filePathDisplay.setSizeFull(); filePathDisplay.addComponent(m_filePathField); filePathDisplay.setSpacing(true); upperRight.addComponent(filePathDisplay); upperRight.setExpandRatio(filePathDisplay, 2f); HorizontalLayout placeHolder = new HorizontalLayout(); placeHolder.setWidth(CmsMessageBundleEditorTypes.OPTION_COLUMN_WIDTH_PX); upperRight.addComponent(placeHolder); return upperRight; }
public FormLayout() { super(); setSpacing(true); setMargin(new MarginInfo(true, false)); setWidth(100, UNITS_PERCENTAGE); }
public PropertiesForm() { super(); mainLayout = new FormLayout(); mainLayout.setMargin(true); mainLayout.setSpacing(true); mainLayout.setSizeUndefined(); mainLayout.setWidth(100, Sizeable.UNITS_PERCENTAGE); setLayout(mainLayout); }
private void buildLayout() { setSizeUndefined(); formLayout = new FormLayout(); formLayout.addComponent(controllerIDTextField); formLayout.addComponent(nameTextField); formLayout.addComponent(descTextArea); controllerIDTextField.focus(); }
final FormLayout formLayout = new FormLayout(); formLayout.setSpacing(true); formLayout.setMargin(true); m_typeSelect.setItemCaption(EdgeType.REDUCTION_KEY, "Reduction Key"); m_typeSelect.setWidth(100.0f, Unit.PERCENTAGE); formLayout.addComponent(m_typeSelect); .collect(Collectors.toList())); m_childServiceComponent.getItemIds().forEach(item -> m_childServiceComponent.setItemCaption(item, BusinessServiceEditWindow.describeBusinessService((BusinessService) item))); formLayout.addComponent(m_childServiceComponent); .collect(Collectors.toList())); m_ipServiceComponent.getItemIds().forEach(item -> m_ipServiceComponent.setItemCaption(item, BusinessServiceEditWindow.describeIpService((IpService) item))); formLayout.addComponent(m_ipServiceComponent); m_reductionKeyComponent = new TextField("Reduction Key"); m_reductionKeyComponent.setId("reductionKeyField"); m_reductionKeyComponent.setWidth(100.0f, Unit.PERCENTAGE); m_reductionKeyComponent.setVisible(false); m_reductionKeyComponent.setImmediate(true); m_reductionKeyComponent.setValidationVisible(true); formLayout.addComponent(m_reductionKeyComponent); m_friendlyNameField.setNullRepresentation(""); m_friendlyNameField.setMaxLength(FRIENDLY_NAME_MAXLENGTH); formLayout.addComponent(m_friendlyNameField); formLayout.addComponent(m_mapFunctionSelect);
m_keyInputField = new TextField(keyName); m_keyInputField.setValue(""); m_keyInputField.setId("keyField"); m_keyInputField.selectAll(); m_keyInputField.setImmediate(true); FormLayout formLayout = new FormLayout(); formLayout.setSizeUndefined(); formLayout.setMargin(true); formLayout.addComponent(m_keyInputField); formLayout.addComponent(m_valueInputField); formLayout.addComponent(horizontalLayout); verticalLayout.addComponent(formLayout);
private Panel issuePanel() { TextField id = new TextField("Card id"); TextField amount = new TextField("Amount"); Button submit = new Button("Submit"); submit.addClickListener(evt -> { commandGateway.sendAndWait(new IssueCmd(id.getValue(), Integer.parseInt(amount.getValue()))); Notification.show("Success", Notification.Type.HUMANIZED_MESSAGE) .addCloseListener(e -> cardSummaryDataProvider.refreshAll()); }); FormLayout form = new FormLayout(); form.addComponents(id, amount, submit); form.setMargin(true); Panel panel = new Panel("Issue single card"); panel.setContent(form); return panel; }
final TextField labelField = new TextField(); labelField.setValue(def.getLabel()); labelField.setImmediate(true); labelField.setCaption("Label"); labelField.setDescription("Label of this category"); FormLayout baseFormLayout = new FormLayout(); baseFormLayout.setSizeFull(); baseFormLayout.setMargin(true); baseFormLayout.addComponent(labelField); baseFormLayout.addComponent(categoriesTable);
private void initFields() { nonEditableField = new TextField(); nonEditableField.setWidth(400, Unit.PIXELS); nonEditableField.setReadOnly(true); nonEditableField.setEnabled(false); contentLayout.addComponent(selectedField); contentLayout.addComponent(editableField); contentLayout.addComponent(nonEditableField);
FormLayout leftFormLayout = new FormLayout(); FormLayout middleFormLayout = new FormLayout(); FormLayout rightFormLayout = new FormLayout(); m_widthField = new TextField(); m_widthField.setCaption("Graph Width"); m_widthField.setDescription("Width of graphs"); m_widthField.setValue(m_dashletSpec.getParameters().get("width")); leftFormLayout.addComponent(m_columnsSelect); leftFormLayout.addComponent(m_widthField); leftFormLayout.addComponent(m_timeFrameValue); middleFormLayout.addComponent(m_rowsSelect); middleFormLayout.addComponent(m_heightField); middleFormLayout.addComponent(m_timeFrameType); rightFormLayout.addComponent(selectKSCReport); rightFormLayout.addComponent(importButton);
/** * Instantiates a new resource type form. */ public ResourceTypeForm() { setCaption("Resource Type Detail"); resourceTypeLayout.setMargin(true); name.setRequired(true); name.setWidth("100%"); resourceTypeLayout.addComponent(name); label.setRequired(true); label.setWidth("100%"); resourceTypeLayout.addComponent(label); resourceLabel.setRequired(false); resourceLabel.setWidth("100%"); resourceTypeLayout.addComponent(resourceLabel); resourceTypeLayout.addComponent(storageStrategy); resourceTypeLayout.addComponent(persistenceSelectorStrategy); setResourceType(createBasicResourceType()); resourceTypeEditor.bind(name, "name"); resourceTypeEditor.bind(label, "label"); resourceTypeEditor.bind(resourceLabel, "resourceLabel"); resourceTypeEditor.bind(storageStrategy, "storageStrategy"); resourceTypeEditor.bind(persistenceSelectorStrategy, "persistenceSelectorStrategy"); setCompositionRoot(resourceTypeLayout); }
private Component buildLoginForm() { FormLayout loginForm = new FormLayout(); loginForm.addStyleName("login-form"); loginForm.setSizeUndefined(); loginForm.setMargin(false); loginForm.addComponent(username = new TextField(MNls.find(this,"login.username=Username"), "")); username.setWidth(15, Unit.EM); loginForm.addComponent(password = new PasswordField(MNls.find(this,"login.password=Password"))); password.setWidth(15, Unit.EM); password.setDescription(MNls.find(this,"login.password.description=Your password")); CssLayout buttons = new CssLayout(); buttons.setStyleName("buttons"); loginForm.addComponent(buttons);
m_usernameTextField = new TextField(); m_usernameTextField.setCaption("Username"); m_usernameTextField.setImmediate(true); m_usernameTextField.setRequired(true); m_usernameTextField.addListener(changeListener); m_groupSelect.addListener(changeListener); FormLayout formLayout = new FormLayout(); formLayout.addComponent(m_usernameTextField); formLayout.addComponent(m_passwordTextField); formLayout.addComponent(m_groupSelect); addUserButtons.addComponent(m_cancelButton); formLayout.addComponent(addUserButtons);
setWidth("20%"); m_usernameTextField = new TextField(); m_usernameTextField.setEnabled(false); m_usernameTextField.setCaption("Username"); FormLayout formLayout = new FormLayout(); formLayout.setMargin(false, false, false, true); formLayout.addComponent(m_usernameTextField); formLayout.addComponent(m_passwordTextField); formLayout.addComponent(m_groupField); formLayout.addComponent(m_applyButton);
@Override public Component createLayout(TabbedLayoutDefinition definition, Map<String, Component> mappings) { TabSheet tabSheetComponent = new TabSheet(); tabSheetComponent.addStyleName(ValoTheme.TABSHEET_FRAMED); tabSheetComponent.setSizeFull(); if (definition.getTabs().size() == 1) { tabSheetComponent.addStyleName("single-tab"); } definition.getTabs().forEach(tabDefinition -> { FormLayout formSection = new FormLayout(); formSection.setMargin(true); formSection.setSizeFull(); tabDefinition.getFields().forEach(field -> { final Component fieldComponent = mappings.get(field.getName()); if (fieldComponent != null) { formSection.addComponent(fieldComponent); // TODO formSection.setComponentHelpDescription(fieldComponent, fieldComponent.getDescription()); } else { log.warn(String.format("Could not retrieve component field named %s from mappings", field.getName())); } }); tabSheetComponent.addTab(formSection, StringUtils.defaultIfBlank(tabDefinition.getLabel(), tabDefinition.getName())); }); return tabSheetComponent; } }
FormLayout formLayout = new FormLayout(); formLayout.setSizeUndefined(); formLayout.setMargin(true); formLayout.addComponent(m_inputField); formLayout.addComponent(horizontalLayout); verticalLayout.addComponent(formLayout);
@Override protected void addContent(VerticalLayout layout) { if (this.titleComponent != null) layout.addComponent(this.titleComponent); final FormLayout formLayout = new FormLayout(); for (Field<?> field : this.fieldMap.values()) formLayout.addComponent(field); layout.addComponent(formLayout); }
private CommonDialogWindow createWindow() { final Label madatoryStarLabel = new Label("*"); madatoryStarLabel.setStyleName("v-caption v-required-field-indicator"); madatoryStarLabel.setWidth(null); addStyleName("lay-color"); setSizeUndefined(); formLayout = new FormLayout(); formLayout.setCaption(null); if (editSwModule) { formLayout.addComponent(softwareModuleType); } else { formLayout.addComponent(typeComboBox); typeComboBox.focus(); } formLayout.addComponent(nameTextField); formLayout.addComponent(versionTextField); formLayout.addComponent(vendorTextField); formLayout.addComponent(descTextArea); setCompositionRoot(formLayout); final CommonDialogWindow window = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW) .caption(i18n.getMessage("caption.create.new", i18n.getMessage("caption.software.module"))).id(UIComponentIdProvider.SW_MODULE_CREATE_DIALOG) .content(this).layout(formLayout).i18n(i18n).saveDialogCloseListener(new SaveOnDialogCloseListener()) .buildCommonDialogWindow(); nameTextField.setEnabled(!editSwModule); versionTextField.setEnabled(!editSwModule); return window; }