Package com.vaadin.ui

Class TwinColSelect

    • Constructor Detail

      • TwinColSelect

        public TwinColSelect()
      • TwinColSelect

        public TwinColSelect​(String caption)
        Parameters:
        caption -
      • TwinColSelect

        public TwinColSelect​(String caption,
                             Container dataSource)
        Parameters:
        caption -
        dataSource -
      • TwinColSelect

        public TwinColSelect​(String caption,
                             Collection<?> options)
        Parameters:
        caption -
        options -
    • Method Detail

      • setColumns

        @Deprecated
        public void setColumns​(int columns)
        Deprecated.
        As of 7.0. "Columns" does not reflect the exact number of characters that will be displayed. It is better to use setWidth together with "em" to control the width of the field.
        Sets the width of the component so that it displays approximately the given number of letters in each of the two selects.

        Calling setColumns(10); is roughly equivalent to calling setWidth((10*2+4)+"10em");

        Parameters:
        columns - the number of columns to set.
      • getColumns

        @Deprecated
        public int getColumns()
        Deprecated.
        As of 7.0. "Columns" does not reflect the exact number of characters that will be displayed. It is better to use setWidth together with "em" to control the width of the field.
        Gets the number of columns for the component.
        See Also:
        setColumns(int)
      • getRows

        public int getRows()
      • setRows

        public void setRows​(int rows)
        Sets the number of rows in the editor. If the number of rows is set to 0, the actual number of displayed rows is determined implicitly by the adapter.

        If a height if set (using AbstractComponent.setHeight(String) or #setHeight(float, int)) it overrides the number of rows. Leave the height undefined to use this method. This is the opposite of how setColumns(int) work.

        Parameters:
        rows - the number of rows to set.
      • setRightColumnCaption

        public void setRightColumnCaption​(String rightColumnCaption)
        Sets the text shown above the right column.
        Parameters:
        caption - The text to show
      • getRightColumnCaption

        public String getRightColumnCaption()
        Returns the text shown above the right column.
        Returns:
        The text shown or null if not set.
      • setLeftColumnCaption

        public void setLeftColumnCaption​(String leftColumnCaption)
        Sets the text shown above the left column.
        Parameters:
        caption - The text to show
      • getLeftColumnCaption

        public String getLeftColumnCaption()
        Returns the text shown above the left column.
        Returns:
        The text shown or null if not set.
      • getState

        protected TwinColSelectState getState()
        Description copied from class: AbstractComponent
        Returns the shared state bean with information to be sent from the server to the client. Subclasses should override this method and set any relevant fields of the state returned by super.getState().
        Overrides:
        getState in class AbstractSelect
        Returns:
        updated component shared state