Class TabControl<V>

Type Parameters:
V - The type of values to select.
All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, com.globalmentor.model.MutableValued<V>, com.globalmentor.model.Valued<V>, io.clogr.Clogged, Component, CompositeComponent, Control, InputFocusableComponent, ListSelectControl<V>, SelectControl<V>, ValueControl<V>, ValuedComponent<V>, ListListenable<V>, Displayable, Enableable, InfoModel, LabelModel, ListSelectModel<V>, Model, SelectModel<V>, PresentationModel, ValueModel<V>, DepictedObject, Iterable<V>, Collection<V>, List<V>
Direct Known Subclasses:
CardTabControl

public class TabControl<V> extends AbstractListSelectControl<V>
Control to allow selection of one or more values from a list using a tabbed interface.
Author:
Garret Wilson
  • Field Details

    • AXIS_PROPERTY

      public static final String AXIS_PROPERTY
      The axis bound property.
    • MAX_TAB_COUNT_PROPERTY

      public static final String MAX_TAB_COUNT_PROPERTY
      The maximum tab count bound property.
  • Constructor Details

    • TabControl

      public TabControl(Class<V> valueClass, Flow axis)
      Value class and axis constructor with a default data model to represent a given type.
      Parameters:
      valueClass - The class indicating the type of value held in the model.
      axis - The axis along which the tabs are oriented.
      Throws:
      NullPointerException - if the given value class and/or axis is null.
    • TabControl

      public TabControl(Class<V> valueClass, Flow axis, int maxTabCount)
      Value class, axis, and maximum tab count constructor with a default data model to represent a given type with multiple selection.
      Parameters:
      valueClass - The class indicating the type of value held in the model.
      axis - The axis along which the tabs are oriented.
      maxTabCount - The requested number of visible rows, or -1 if no row count is specified.
      Throws:
      NullPointerException - if the given value class and/or axis is null.
    • TabControl

      public TabControl(Class<V> valueClass, ListSelectionPolicy<V> selectionStrategy, Flow axis)
      Value class, selection strategy, and axis constructor with a default data model to represent a given type.
      Parameters:
      valueClass - The class indicating the type of value held in the model.
      selectionStrategy - The strategy for selecting values in the model.
      axis - The axis along which the tabs are oriented.
      Throws:
      NullPointerException - if the given value class, selection strategy, and/or axis is null.
    • TabControl

      public TabControl(Class<V> valueClass, ListSelectionPolicy<V> selectionStrategy, Flow axis, int maxTabCount)
      Value class, selection strategy, axis, and maximum tab count constructor with a default data model to represent a given type.
      Parameters:
      valueClass - The class indicating the type of value held in the model.
      selectionStrategy - The strategy for selecting values in the model.
      axis - The axis along which the tabs are oriented.
      maxTabCount - The requested number of visible tabs, or -1 if no maximum tab count is specified.
      Throws:
      NullPointerException - if the given value class, selection strategy, and/or axis is null.
    • TabControl

      public TabControl(ListSelectModel<V> listSelectModel, Flow axis)
      List select model and axis constructor.
      Parameters:
      listSelectModel - The component list select model.
      axis - The axis along which the tabs are oriented.
      Throws:
      NullPointerException - if the given list select model and/or axis is null.
    • TabControl

      public TabControl(ListSelectModel<V> listSelectModel, Flow axis, int maxTabCount)
      List select model, axis, and maximum tab count constructor.
      Parameters:
      listSelectModel - The component list select model.
      axis - The axis along which the tabs are oriented.
      maxTabCount - The requested number of visible tabs, or -1 if no maximum tab count is specified.
      Throws:
      NullPointerException - if the given list select model and/or axis is null.
    • TabControl

      public TabControl(ListSelectModel<V> listSelectModel, ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy, Flow axis)
      List select model, value representation strategy, and axis constructor.
      Parameters:
      listSelectModel - The component list select model.
      valueRepresentationStrategy - The strategy to create label models to represent this model's values.
      axis - The axis along which the tabs are oriented.
      Throws:
      NullPointerException - if the given list select model, value representation strategy, and/or axis is null.
    • TabControl

      public TabControl(ListSelectModel<V> listSelectModel, ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy, Flow axis, int maxTabCount)
      List select model, value representation strategy, axis, and maximum tab count constructor.
      Parameters:
      listSelectModel - The component list select model.
      valueRepresentationStrategy - The strategy to create label models to represent this model's values.
      axis - The axis along which the tabs are oriented.
      maxTabCount - The requested number of visible tabs, or -1 if no maximum tab count is specified.
      Throws:
      NullPointerException - if the given list select model, value representation strategy, and/or axis is null.
  • Method Details

    • getAxis

      public Flow getAxis()
      Returns:
      The flow axis.
    • setAxis

      public void setAxis(Flow newAxis)
      Sets the flow axis. This is a bound property
      Parameters:
      newAxis - The flow axis.
      Throws:
      NullPointerException - if the given axis is null.
      See Also:
    • getMaxTabCount

      public int getMaxTabCount()
      Returns:
      The estimated number of tabs requested to be visible, or -1 if no tab count is specified.
    • setMaxTabCount

      public void setMaxTabCount(int newMaxTabCount)
      Sets the estimated number of tabs requested to be visible. This is a bound property of type Integer.
      Parameters:
      newMaxTabCount - The new requested number of visible tabs, or -1 if no tab count is specified.
      See Also: