Package com.vaadin.ui

Examples of com.vaadin.ui.FormLayout


*/
public class PopupViewCaption extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        FormLayout layout = new FormLayout();
        addComponent(layout);
        Label label = new Label("Label");
        PopupView popup = new PopupView("Popup short text", label);
        popup.setCaption("Popup Caption:");
        layout.addComponent(popup);
    }
View Full Code Here


        return c;
    }

    /** Create new FormLayout and add it to current component container. */
    public FormLayout formlayout() {
        FormLayout c = new FormLayout();
        c.setImmediate(true);
        add(c);
        return c;
    }
View Full Code Here

    /**
     * Create new FormLayout with given caption and add it to current component
     * container.
     */
    public FormLayout formlayout(String caption) {
        FormLayout c = formlayout();
        c.setCaption(caption);
        return c;
    }
View Full Code Here

     * Creates the form containing fields to edit user data
     *
     * @returns the user edit fields
     */
    private FormLayout createFormLayout() {
        FormLayout formLayout = new FormLayout();
        formLayout.setMargin(false, false, false, true);
        formLayout.addComponent(initUsernameTextField());
        formLayout.addComponent(initPasswordField());
        formLayout.addComponent(initSelect());
        HorizontalLayout addUserButtons = new HorizontalLayout();
        addUserButtons.addComponent(initApplyButton());
        Button initializeAddNewUserButton = initializeAddNewUserButton();
        addUserButtons.addComponent(initializeAddNewUserButton);
        // addUserButtons.setComponentAlignment(initializeAddNewUserButton, Alignment.MIDDLE_CENTER);
        addUserButtons.setSpacing(true);
        addUserButtons.addComponent(initCancelNewUserButton());

        formLayout.addComponent(addUserButtons);
        hideNewUserButtons();
        disableTextFieldsAndSelect();
        return formLayout;
    }
View Full Code Here

    public MahasiswaForm() {

        container.setAutoCommit(true);
       
        formLayout = new FormLayout();

        setImmediate(true);
        mahasiswa = new Mahasiswa();
        beanItem = new BeanItem<Mahasiswa>(mahasiswa);
       
View Full Code Here

        m_groupSelect.setImmediate(true);
        m_groupSelect.setNullSelectionAllowed(false);
        m_groupSelect.setRequired(true);
        m_groupSelect.addListener(changeListener);

        FormLayout formLayout = new FormLayout();
        formLayout.addComponent(m_usernameTextField);
        formLayout.addComponent(m_passwordTextField);
        formLayout.addComponent(m_groupSelect);

        m_applyButton = new Button();
        m_applyButton.setCaption("Apply changes");
        m_applyButton.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                storeUserInfo();
            }
        });

        m_cancelButton = new Button();
        m_cancelButton.setEnabled(false);
        m_cancelButton.setCaption("Cancel");
        m_cancelButton.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                selectUser((UserDTO) m_userTable.getValue());
            }
        });

        HorizontalLayout addUserButtons = new HorizontalLayout();
        addUserButtons.setMargin(true, false, false, false);
        addUserButtons.setSpacing(true);
        addUserButtons.addComponent(m_applyButton);
        addUserButtons.addComponent(m_cancelButton);

        formLayout.addComponent(addUserButtons);

        HorizontalLayout horizontalLayout = new HorizontalLayout();
        horizontalLayout.setSizeFull();
        horizontalLayout.setSpacing(true);
        horizontalLayout.addComponent(usersList);
View Full Code Here

            public void buttonClick(ClickEvent event) {
                storeUserInfo();
            }
        });

        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);

        addComponent(formLayout);
    }
View Full Code Here

  }

  @AutoGenerated
  private FormLayout buildFormLayout_3() {
    // common part: create layout
    formLayout_3 = new FormLayout();
    formLayout_3.setImmediate(false);
    formLayout_3.setWidth("-1px");
    formLayout_3.setHeight("-1px");
    formLayout_3.setMargin(true);
    formLayout_3.setSpacing(true);
View Full Code Here

  }

  @AutoGenerated
  private FormLayout buildFormLayout_2() {
    // common part: create layout
    formLayout_2 = new FormLayout();
    formLayout_2.setImmediate(false);
    formLayout_2.setWidth("-1px");
    formLayout_2.setHeight("-1px");
    formLayout_2.setMargin(true);
    formLayout_2.setSpacing(true);
View Full Code Here

  private FormLayout mainLayout;

  public PropertiesForm() {
    super();
    mainLayout = new FormLayout();
    mainLayout.setMargin(true);
    mainLayout.setSpacing(true);
    mainLayout.setSizeUndefined();
    mainLayout.setWidth(100, Sizeable.UNITS_PERCENTAGE);
    setLayout(mainLayout);
View Full Code Here

TOP

Related Classes of com.vaadin.ui.FormLayout

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.