Java Code Examples for com.vaadin.ui.FormLayout#setSpacing()
The following examples show how to use
com.vaadin.ui.FormLayout#setSpacing() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SignUpViewImpl.java From Vaadin4Spring-MVP-Sample-SpringSecurity with Apache License 2.0 | 5 votes |
@Override public void postConstruct() { super.postConstruct(); setSizeFull(); layout = new VerticalLayout(); layout.setSizeFull(); layout.setSpacing(true); setCompositionRoot(layout); infoLabel = new Label("Vaadin4Spring Security Demo - SignUp"); infoLabel.addStyleName(ValoTheme.LABEL_H2); infoLabel.setSizeUndefined(); layout.addComponent(infoLabel); layout.setComponentAlignment(infoLabel, Alignment.MIDDLE_CENTER); container = new VerticalLayout(); container.setSizeUndefined(); container.setSpacing(true); layout.addComponent(container); layout.setComponentAlignment(container, Alignment.MIDDLE_CENTER); layout.setExpandRatio(container, 1); form = new FormLayout(); form.setWidth("400px"); form.setSpacing(true); container.addComponent(form); buildForm(); btnSignUp = new Button("Signup", FontAwesome.FLOPPY_O); btnSignUp.addStyleName(ValoTheme.BUTTON_FRIENDLY); btnSignUp.addClickListener(this); container.addComponent(btnSignUp); container.setComponentAlignment(btnSignUp, Alignment.MIDDLE_CENTER); }
Example 2
Source File: SubDomainEditorWindow.java From XACML with MIT License | 5 votes |
@AutoGenerated private FormLayout buildMainLayout() { // common part: create layout mainLayout = new FormLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("-1px"); mainLayout.setHeight("-1px"); mainLayout.setMargin(true); mainLayout.setSpacing(true); // top-level component properties setWidth("-1px"); setHeight("-1px"); // textFieldSubdomain textFieldSubdomain = new TextField(); textFieldSubdomain.setCaption("Enter Sub Domain"); textFieldSubdomain.setImmediate(false); textFieldSubdomain .setDescription("You can enter sub domain name - do not use spaces or wildcard characters."); textFieldSubdomain.setWidth("-1px"); textFieldSubdomain.setHeight("-1px"); textFieldSubdomain.setInvalidAllowed(false); textFieldSubdomain .setInputPrompt("Examples: sales hr business marketing."); mainLayout.addComponent(textFieldSubdomain); mainLayout.setExpandRatio(textFieldSubdomain, 1.0f); // buttonSave buttonSave = new Button(); buttonSave.setCaption("Save"); buttonSave.setImmediate(true); buttonSave.setWidth("-1px"); buttonSave.setHeight("-1px"); mainLayout.addComponent(buttonSave); mainLayout.setComponentAlignment(buttonSave, new Alignment(48)); return mainLayout; }
Example 3
Source File: ChartLayout.java From usergrid with Apache License 2.0 | 5 votes |
private FormLayout addFormLayout() { FormLayout formLayout = new FormLayout(); formLayout.setWidth( "250px" ); formLayout.setHeight( "250px" ); formLayout.addStyleName( "outlined" ); formLayout.setSpacing( true ); addComponent( formLayout, "left: 10px; top: 10px;" ); return formLayout; }
Example 4
Source File: Login.java From usergrid with Apache License 2.0 | 5 votes |
private FormLayout addFormLayout() { FormLayout formLayout = new FormLayout(); formLayout.setWidth( "300px" ); formLayout.setHeight( "200px" ); formLayout.addStyleName( "outlined" ); formLayout.setSpacing( true ); mainLayout.addComponent( formLayout ); mainLayout.setComponentAlignment( formLayout, Alignment.MIDDLE_CENTER ); return formLayout; }
Example 5
Source File: UserLayout.java From usergrid with Apache License 2.0 | 5 votes |
private FormLayout addFormLayout( int x, int y ) { FormLayout formLayout = new FormLayout(); formLayout.setWidth( String.format( "%spx", x ) ); formLayout.setHeight( String.format( "%spx", y ) ); formLayout.addStyleName( "outlined" ); formLayout.setSpacing( true ); addComponent( formLayout, "left: 350px; top: 50px;" ); return formLayout; }
Example 6
Source File: WinLoadBalancerConfigListener.java From primecloud-controller with GNU General Public License v2.0 | 4 votes |
@Override public void attach() { // メインフォーム Form mainForm = new Form(); Layout mainLayout = mainForm.getLayout(); addComponent(mainForm); // ロードバランサ名 nameField = new TextField(ViewProperties.getCaption("field.loadBalancerName")); nameField.setReadOnly(true); mainLayout.addComponent(nameField); // サービス名 serviceField = new TextField(ViewProperties.getCaption("field.loadBalancerService")); serviceField.setReadOnly(true); mainLayout.addComponent(serviceField); // ロードバランサ設定パネル Panel panel = new Panel(ViewProperties.getCaption("field.loadBalancerConfig")); ((Layout) panel.getContent()).setMargin(false, false, false, true); mainLayout.addComponent(panel); // サブフォーム subForm = new Form(); FormLayout sublayout = (FormLayout) this.subForm.getLayout(); sublayout.setMargin(false); sublayout.setSpacing(false); panel.getContent().addComponent(subForm); subForm.setHeight("200px"); // ロードバランサポート loadBalancerPortField = new TextField(ViewProperties.getCaption("field.loadBalancerPort")); loadBalancerPortField.setWidth(TEXT_WIDTH); sublayout.addComponent(loadBalancerPortField); // サービスポート servicePortField = new TextField(ViewProperties.getCaption("field.loadBalancerServicePort")); servicePortField.setWidth(TEXT_WIDTH); sublayout.addComponent(servicePortField); // プロトコル protocolSelect = new ComboBox(ViewProperties.getCaption("field.loadBalancerProtocol")); protocolSelect.setWidth(TEXT_WIDTH); protocolSelect.setImmediate(true); sublayout.addComponent(protocolSelect); protocolSelect.addListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { protocolValueChange(event); } }); // SSLキー sslKeySelect = new ComboBox(ViewProperties.getCaption("field.loadBalancerSSLKey")); sslKeySelect.setWidth(TEXT_WIDTH); sslKeySelect.addContainerProperty(SSLKEY_CAPTION_ID, String.class, null); sslKeySelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY); sslKeySelect.setItemCaptionPropertyId(SSLKEY_CAPTION_ID); sublayout.addComponent(sslKeySelect); initValidation(); }