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
A base class for a UI component based on a TableConditionModel.
See Also:
  • Constructor Details

  • Method Details

    • conditionModel

      public final TableConditionModel<C> conditionModel()
      Returns:
      the underlying condition model
    • state

      Returns:
      the value controlling the condition panel state
    • conditionPanels

      public abstract Collection<ColumnConditionPanel<C,?>> conditionPanels()
      Returns:
      an unmodifiable view of the condition panels
    • selectableConditionPanels

      public Collection<ColumnConditionPanel<C,?>> selectableConditionPanels()
      By default this returns all condition panels, override to customize.
      Returns:
      the selectable panels
      See Also:
    • conditionPanel

      public <T extends ColumnConditionPanel<C, ?>> T conditionPanel(C columnIdentifier)
      Type Parameters:
      T - the column value type
      Parameters:
      columnIdentifier - the column identifier
      Returns:
      the condition panel associated with the given column
      Throws:
      IllegalStateException - in case no panel is available
    • controls

      public Controls controls()
      Returns:
      the controls provided by this condition panel, for example clearing the condition and toggling the condition state
    • selectConditionPanel

      public final void selectConditionPanel(JComponent dialogOwner)
      Selects one conditon panel to receive the input focus. If only one panel is available, that one receives the input focus automatically. If multiple conditon panels are available a selection dialog is presented. Override to implement.
      Parameters:
      dialogOwner - the dialog owner
    • initializedEvent

      public Optional<EventObserver<?>> initializedEvent()
      An event observer notified when this condition panel has been initialized and all its components created.
      If this event returns an empty optional it can be assumed that this condition panel is initialized when constructed.
      The default implementation returns an empty Optional.
      Returns:
      an event notified when this condition panel has been initialized or an empty Optional if not available
    • onStateChanged

      protected void onStateChanged(ColumnConditionPanel.ConditionState state)