Class TableConditionPanel<C>

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
is.codion.swing.common.ui.component.table.TableConditionPanel<C>
Type Parameters:
C - the type used to identify the table columns
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
FilterTableConditionPanel

public abstract class TableConditionPanel<C> extends JPanel
An abstract base class for a UI component based on a TableConditionModel.
See Also:
  • Constructor Details

  • Method Details

    • view

      public final Value<ConditionPanel.ConditionView> view()
      Returns:
      the Value controlling the ConditionPanel.ConditionView
    • panels

      public abstract Map<C,ConditionPanel<?>> panels()
      Returns:
      the condition panels mapped to their respective identifier
    • selectable

      public Map<C,ConditionPanel<?>> selectable()
      By default this returns all condition panels, override to customize.
      Returns:
      the selectable condition panels
      See Also:
    • panel

      public <T extends ConditionPanel<?>> T panel(C identifier)
      Type Parameters:
      T - the condition panel type
      Parameters:
      identifier - the identifier for which to retrieve the ConditionPanel
      Returns:
      the ConditionPanel associated with the given identifier
      Throws:
      IllegalArgumentException - in case no panel is available for the given identifier
    • controls

      public Controls controls()
      Returns:
      the controls provided by this condition panel, for example clearing the condition and changing the condition view
    • select

      public final void select(JComponent dialogOwner)
      Selects one of the selectable condition panels to receive the input focus. If only one panel is selectable, that one receives the input focus automatically. If multiple condition panels are selectable, a selection dialog is presented.
      Parameters:
      dialogOwner - the selection dialog owner
      See Also:
    • onViewChanged

      protected void onViewChanged(ConditionPanel.ConditionView conditionView)
      Called each time the condition view changes, override to update this panel according to the state
      Parameters:
      conditionView - the new condition view