Class LegacyTwinColGrid<T>

All Implemented Interfaces:
AttachNotifier, ClickNotifier<VerticalLayout>, DetachNotifier, HasComponents, HasElement, HasEnabled, HasOrderedComponents<VerticalLayout>, HasSize, HasStyle, HasValidation, HasValue<HasValue.ValueChangeEvent<Set<T>>,Set<T>>, HasValueAndElement<HasValue.ValueChangeEvent<Set<T>>,Set<T>>, FlexComponent<VerticalLayout>, ThemableLayout, Serializable

@Deprecated public class LegacyTwinColGrid<T> extends TwinColGrid<T>
Deprecated.
Implementation of TwinColGrid with deprecated methods from version 2.9.0.
See Also:
  • Field Details

    • leftGrid

      @Deprecated protected final Grid<T> leftGrid
      Deprecated.
      Use getAvailableGrid()
    • rightGrid

      @Deprecated protected final Grid<T> rightGrid
      Deprecated.
      Use getSelectionGrid()
    • leftGridDataProvider

      @Deprecated protected ListDataProvider<T> leftGridDataProvider
      Deprecated.
      Use getAvailableGrid().getDataProvider()
    • rightGridDataProvider

      @Deprecated protected ListDataProvider<T> rightGridDataProvider
      Deprecated.
      Use getSelectionGrid().getDataProvider()
  • Constructor Details

    • LegacyTwinColGrid

      public LegacyTwinColGrid()
      Deprecated.
      Constructs a new TwinColGrid with an empty ListDataProvider.
    • LegacyTwinColGrid

      public LegacyTwinColGrid(Supplier<Grid<T>> gridSupplier)
      Deprecated.
      Constructs a new empty TwinColGrid, using the specified supplier for instantiating both grids.
      Parameters:
      gridSupplier - a supplier for instantiating both grids
    • LegacyTwinColGrid

      public LegacyTwinColGrid(@NonNull @NonNull Grid<T> availableGrid, @NonNull @NonNull Grid<T> selectionGrid)
      Deprecated.
      Constructs a new empty TwinColGrid, using the specified grids for each side.
      Parameters:
      availableGrid - the grid that contains the available items
      selectionGrid - the grid that contains the selected items
    • LegacyTwinColGrid

      @Deprecated public LegacyTwinColGrid(String caption)
      Constructs a new empty TwinColGrid with caption
      Parameters:
      caption - the component caption
    • LegacyTwinColGrid

      @Deprecated public LegacyTwinColGrid(ListDataProvider<T> dataProvider, String caption)
      Constructs a new TwinColGrid with data provider for options.
      Parameters:
      dataProvider - the data provider, not null
      caption - the component caption
    • LegacyTwinColGrid

      @Deprecated public LegacyTwinColGrid(String caption, Supplier<Grid<T>> gridSupplier)
      Constructs a new empty TwinColGrid, using the specified supplier for instantiating both grids.
      Parameters:
      caption - the component caption
      gridSupplier - a supplier for instantiating both grids
    • LegacyTwinColGrid

      @Deprecated public LegacyTwinColGrid(String caption, @NonNull @NonNull Grid<T> availableGrid, @NonNull @NonNull Grid<T> selectionGrid)
      Constructs a new empty TwinColGrid, using the specified grids for each side.
      Parameters:
      caption - the component caption
      availableGrid - the grid that contains the available items
      selectionGrid - the grid that contains the selected items
    • LegacyTwinColGrid

      @Deprecated public LegacyTwinColGrid(Collection<T> options, String caption)
      Constructs a new TwinColGrid with caption and the given options.
      Parameters:
      caption - the caption to set, can be null
      options - the options, cannot be null
  • Method Details

    • setLeftGridClassName

      @Deprecated public void setLeftGridClassName(String classname)
      Deprecated.
      Use getAvailableGrid().setClassName(classname)
    • addLeftGridClassName

      @Deprecated public void addLeftGridClassName(String classname)
      Deprecated.
      Use getAvailableGrid().addClassName(classname)
    • removeLeftGridClassName

      @Deprecated public void removeLeftGridClassName(String classname)
      Deprecated.
      Use getAvailableGrid().removeClassName(classname)
    • setRightGridClassName

      @Deprecated public void setRightGridClassName(String classname)
      Deprecated.
      Use getSelectionGrid().setClassName(classname)
    • addRightGridClassName

      @Deprecated public void addRightGridClassName(String classname)
      Deprecated.
      Use getSelectionGrid().addClassName(classname)
    • removeRightGridClassName

      @Deprecated public void removeRightGridClassName(String classname)
      Deprecated.
      Use getSelectionGrid().removeClassName(classname)
    • withRightColumnCaption

      @Deprecated public LegacyTwinColGrid<T> withRightColumnCaption(String caption)
      Sets the text shown above the grid with the available items. null clears the caption.
      Parameters:
      caption - The text to show, null to clear
      Returns:
      this instance
    • withLeftColumnCaption

      @Deprecated public LegacyTwinColGrid<T> withLeftColumnCaption(String caption)
      Sets the text shown above the grid with the available items. null clears the caption.
      Parameters:
      caption - The text to show, null to clear
      Returns:
      this instance
    • getRightColumnCaption

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

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

      @Deprecated public void addLeftGridSelectionListener(SelectionListener<Grid<T>,T> listener)
      Deprecated.
      Use getAvailableGrid().addSelectionListener(listener);
    • addRightGridSelectionListener

      @Deprecated public void addRightGridSelectionListener(SelectionListener<Grid<T>,T> listener)
      Deprecated.
      Use getSelectionGrid().addSelectionListener(listener);
    • getLeftGrid

      @Deprecated public Grid<T> getLeftGrid()
      Deprecated.
      Use TwinColGrid.getAvailableGrid(). Depending on the orientation, the "left grid" may not be located at the left side.
      Return the left grid component.
    • getRightGrid

      @Deprecated public Grid<T> getRightGrid()
      Deprecated.
      Use TwinColGrid.getSelectionGrid(). Depending on the orientation, the "right grid" may not be located at the right side.
      Return the right grid component.
    • setDataProvider

      protected void setDataProvider(ListDataProvider<T> dataProvider)
      Deprecated.
      Overrides:
      setDataProvider in class TwinColGrid<T>
    • addColumn

      @Deprecated public LegacyTwinColGrid<T> addColumn(ItemLabelGenerator<T> itemLabelGenerator, String header)
      Deprecated.
      Adds a new text column to this Grid with a value provider. The column will use a TextRenderer. The value is converted to a String using the provided itemLabelGenerator.
      Parameters:
      itemLabelGenerator - the value provider
      header - the column header
      Returns:
      this instance
    • addSortableColumn

      @Deprecated public LegacyTwinColGrid<T> addSortableColumn(ItemLabelGenerator<T> itemLabelGenerator, Comparator<T> comparator, String header)
      Deprecated.
      Use TwinColGrid.addColumn(ItemLabelGenerator).setHeader(header).setComparator(comparator)
      Adds a new sortable text column to this Grid with a value provider. The column will use a TextRenderer. The value is converted to a String using the provided itemLabelGenerator.
      Parameters:
      itemLabelGenerator - the value provider
      comparator - the in-memory comparator
      header - the column header
      Returns:
      this instance
    • addSortableColumn

      @Deprecated public LegacyTwinColGrid<T> addSortableColumn(ItemLabelGenerator<T> itemLabelGenerator, Comparator<T> comparator, String header, String key)
      Deprecated.
      Use TwinColGrid.addColumn(ItemLabelGenerator).setHeader(header).setComparator(comparator).setKey(key)
      Adds a new sortable text column to this Grid with a value provider. The column will use a TextRenderer. The value is converted to a String using the provided itemLabelGenerator.
      Parameters:
      itemLabelGenerator - the value provider
      comparator - the in-memory comparator
      header - the column header
      key - the column key
      Returns:
      this instance
    • addFilterableColumn

      @Deprecated public LegacyTwinColGrid<T> addFilterableColumn(ItemLabelGenerator<T> itemLabelGenerator, SerializableFunction<T,String> filterableValue, String header, String filterPlaceholder, boolean enableClearButton, String key)
      Deprecated.
      Use addFilterableColumn(itemLabelGenerator, filterableValue) and configure the other properties on the returned TwinColumn.
      Adds a new filterable text column to this TwinColGrid, with a key. The value is converted to a String using the provided itemLabelGenerator and matches are computed against the result of filterableValue.
    • addFilterableColumn

      @Deprecated public LegacyTwinColGrid<T> addFilterableColumn(ItemLabelGenerator<T> itemLabelGenerator, String header, String filterPlaceholder, boolean enableClearButton)
      Deprecated.
      Use addFilterableColumn(itemLabelGenerator) and configure the other properties on the returned TwinColumn.
      Adds a new filterable text column to this TwinColGrid, with no key. The value is converted to a String using the provided itemLabelGenerator and matches are computed against the result of the same itemLabelGenerator.
    • addFilterableColumn

      @Deprecated public LegacyTwinColGrid<T> addFilterableColumn(ItemLabelGenerator<T> itemLabelGenerator, SerializableFunction<T,String> filterableValue, String header, String filterPlaceholder, boolean enableClearButton)
      Deprecated.
      Use addFilterableColumn(itemLabelGenerator, filterableValue) and configure the other properties on the returned TwinColumn.
      Adds a new filterable text column to this TwinColGrid, with no key. The value is converted to a String using the provided itemLabelGenerator and matches are computed against the result of filterableValue.
    • addFilterableColumn

      @Deprecated public LegacyTwinColGrid<T> addFilterableColumn(ItemLabelGenerator<T> itemLabelGenerator, String header, String filterPlaceholder, boolean enableClearButton, String key)
      Deprecated.
      Use addFilterableColumn(itemLabelGenerator) and configure the other properties on the returned TwinColumn.
      Adds a new filterable text column to this TwinColGrid, with a key. The value is converted to a String using the provided itemLabelGenerator and matches are computed against the result of the same itemLabelGenerator.