public FormLayout() { super(); setSpacing(true); setMargin(new MarginInfo(true, false)); setWidth(100, UNITS_PERCENTAGE); }
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; }
public PropertiesForm() { super(); mainLayout = new FormLayout(); mainLayout.setMargin(true); mainLayout.setSpacing(true); mainLayout.setSizeUndefined(); mainLayout.setWidth(100, Sizeable.UNITS_PERCENTAGE); setLayout(mainLayout); }
private Layout createOverviewSection() { FormLayout layout = new FormLayout(); layout.setWidth("100%"); StaticField fieldsetTitle = createStaticField(null, i18n.translate("activationMonitor.overview.fieldset.label")); fieldsetTitle.addStyleName("fieldset-title"); layout.addComponent(fieldsetTitle); layout.addComponent(createStaticField(i18n.translate("activationMonitor.overview.lastRestart.label"), dateFormat.format(activationStorage.getLastRestartDate()))); layout.addComponent(createStaticField(i18n.translate("activationMonitor.overview.activations.label"), String.valueOf(activationStorage.getActivations()))); layout.addComponent(createStaticField(i18n.translate("activationMonitor.overview.deactivations.label"), String.valueOf(activationStorage.getDeactivations()))); layout.addComponent(createStaticField(i18n.translate("activationMonitor.overview.numberOfErrors.label"), String.valueOf(activationStorage.getActivationErrors()))); layout.addComponent(createStaticField(i18n.translate("activationMonitor.overview.commits.label"), String.valueOf(activationStorage.getCommitedTransactions()))); layout.addComponent(createStaticField(i18n.translate("activationMonitor.overview.rollbacks.label"), String.valueOf(activationStorage.getRollbackedTransactions()))); layout.addComponent(createStaticField(i18n.translate("activationMonitor.overview.size.label"), String.valueOf(activationStorage.getSizeOfActivatedContent() / 1024) + " KB")); layout.addComponent(createStaticField(i18n.translate("activationMonitor.overview.time.label"), String.valueOf(Math.floor(activationStorage.getActivationTime() / 1000) + " " + i18n.translate("activationMonitor.overview.time.seconds")))); return layout; }
/** * Initializes the form fields.<p> * * @return the form component */ private FormLayout initForm() { FormLayout form = new FormLayout(); form.setWidth("100%"); m_dateField = new CmsDateField(); m_dateField.setCaption( CmsVaadinUtils.getMessageText(org.opencms.workplace.commons.Messages.GUI_LABEL_DATE_PUBLISH_SCHEDULED_0)); form.addComponent(m_dateField); m_includeSubResources = new CheckBox( CmsVaadinUtils.getMessageText(org.opencms.workplace.commons.Messages.GUI_PUBLISH_MULTI_SUBRESOURCES_0)); if (hasFolders()) { form.addComponent(m_includeSubResources); } return form; } }
/** * Initializes the form component.<p> * * @return the form component */ private FormLayout initForm() { FormLayout form = new FormLayout(); form.setWidth("100%"); IndexedContainer sites = CmsVaadinUtils.getAvailableSitesContainer(m_context.getCms(), CAPTION_PROPERTY); m_siteComboBox = prepareComboBox(sites, org.opencms.workplace.Messages.GUI_LABEL_SITE_0); m_siteComboBox.select(m_context.getCms().getRequestContext().getSiteRoot()); form.addComponent(m_siteComboBox); ValueChangeListener changeListener = new ValueChangeListener() { private static final long serialVersionUID = 1L; public void valueChange(ValueChangeEvent event) { submit(); } }; m_siteComboBox.addValueChangeListener(changeListener); return form; }
/** * 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; }
formLayout.setWidth(100, Unit.PERCENTAGE); formLayout.setSpacing(true); formLayout.setMargin(true);
formLayout.setWidth(100, Unit.PERCENTAGE); formLayout.setSpacing(true); formLayout.setMargin(true);
formLayout.setWidth(100, Unit.PERCENTAGE); formLayout.setSpacing(true); formLayout.setMargin(true);
formLayout.setWidth(100, Unit.PERCENTAGE); formLayout.setSpacing(true); formLayout.setMargin(true);
form.setWidth("100%");
topLayout.setWidth("100%");
layout.setSpacing(true); layout.setMargin(false); layout.setWidth("100%");
this.showForm.setWidth("100%");
this.showForm.setWidth("100%");
form.setWidth("100%"); m_targetPath = new CmsPathSelectField(); m_targetPath.setCaption(
formLayout.setWidth("100%"); formLayout.addComponent(typeField); formLayout.addComponent(valueField);
formLayout.setWidth("100%"); formLayout.addComponent(typeField); formLayout.addComponent(valueField);