Class FilteredTable<R,​C,​T extends FilteredTableModel<R,​C>>

    • Method Detail

      • updateUI

        public void updateUI()
        Overrides:
        updateUI in class JTable
      • searchField

        public JTextField searchField()
        Returns:
        the search field
      • setDoubleClickAction

        public void setDoubleClickAction​(Action doubleClickAction)
        Parameters:
        doubleClickAction - the action to perform when a double click is performed on the table, null for no double click action
      • getDoubleClickAction

        public Action getDoubleClickAction()
        Returns:
        the Action performed when the table receives a double click
      • isSortingEnabled

        public boolean isSortingEnabled()
        Returns:
        true if sorting via the table header is enabled
      • setSortingEnabled

        public void setSortingEnabled​(boolean sortingEnabled)
        Parameters:
        sortingEnabled - true if sorting via the table header should be enabled
      • setSortingEnabled

        public void setSortingEnabled​(C columnIdentifier,
                                      boolean sortingEnabled)
        Parameters:
        columnIdentifier - the column identifier
        sortingEnabled - true if sorting via the table header should be enabled for the given column
      • isSortingEnabled

        public boolean isSortingEnabled​(C columnIdentifier)
        Parameters:
        columnIdentifier - the column identifier
        Returns:
        true if sorting via the table header is enabled for the given column
      • isScrollToSelectedItem

        public boolean isScrollToSelectedItem()
        Returns:
        true if the JTable instance scrolls automatically to the coordinate of the record selected in the underlying table model
      • setScrollToSelectedItem

        public void setScrollToSelectedItem​(boolean scrollToSelectedItem)
        Specifies whether this table should automatically scroll to the topmost selected row. Note that no scrolling is performed if any of the selected rows are already visible.
        Parameters:
        scrollToSelectedItem - true if this table should automatically scroll to selected rows
      • getCenterOnScroll

        public FilteredTable.CenterOnScroll getCenterOnScroll()
        Returns:
        the scrolling behaviour when scrolling to the selected row/column
      • setCenterOnScroll

        public void setCenterOnScroll​(FilteredTable.CenterOnScroll centerOnScroll)
        Specifies the scrolling behaviour when scrolling to the selected row/column
        Parameters:
        centerOnScroll - the scrolling behaviour
      • setSelectionMode

        public void setSelectionMode​(int selectionMode)
        Overrides:
        setSelectionMode in class JTable
      • setFilterPanelsVisible

        public void setFilterPanelsVisible​(boolean filterPanelsVisible)
        Hides or shows the active filter panel dialogs for this table panel
        Parameters:
        filterPanelsVisible - true if the active filter panel dialogs should be shown, false if they should be hidden
      • selectColumns

        public void selectColumns()
        Shows a dialog for selecting which columns to show/hide
      • isCellVisible

        public boolean isCellVisible​(int row,
                                     int column)
        Returns true if the given cell is visible.
        Parameters:
        row - the row
        column - the column
        Returns:
        true if this table is contained in a scrollpanel and the cell with the given coordinates is visible.
      • scrollToColumn

        public void scrollToColumn​(C columnIdentifier)
        Scrolls horizontally so that the column identified by the given identifier becomes visible. Has no effect if this table is not contained in a scrollpanel.
        Parameters:
        columnIdentifier - the column identifier
      • scrollToCoordinate

        public void scrollToCoordinate​(int row,
                                       int column,
                                       FilteredTable.CenterOnScroll centerOnScroll)
        Scrolls to the given coordinate. Has no effect if this table is not contained in a scrollpanel.
        Parameters:
        row - the row
        column - the column
        centerOnScroll - specifies whether to center the selected row and or column
      • copySelectedCell

        public void copySelectedCell()
        Copies the contents of the selected cell to the clipboard.
      • createSelectColumnsControl

        public Control createSelectColumnsControl()
        Returns:
        a control for showing the column selection dialog
      • createToggleColumnsControls

        public Controls createToggleColumnsControls()
        Returns:
        Controls containing ToggleControls for showing/hiding columns.
      • createResetColumnsControl

        public Control createResetColumnsControl()
        Returns:
        a Control for resetting the columns to their original location and visibility
      • createSingleSelectionModeControl

        public ToggleControl createSingleSelectionModeControl()
        Returns:
        a ToggleControl for toggling the table selection mode (single or multiple)
      • setAutoStartsEdit

        public void setAutoStartsEdit​(boolean autoStartsEdit)
        A convenience method for setting the client property 'JTable.autoStartsEdit'.
        Parameters:
        autoStartsEdit - the value
      • addDoubleClickListener

        public void addDoubleClickListener​(EventDataListener<MouseEvent> listener)
        Parameters:
        listener - a listener notified each time the table is double-clicked
      • removeDoubleClickListener

        public void removeDoubleClickListener​(EventDataListener<MouseEvent> listener)
        Parameters:
        listener - the listener to remove
      • filteredTable

        public static <R,​C,​T extends FilteredTableModel<R,​C>> FilteredTable<R,​C,​T> filteredTable​(T tableModel)
        Instantiates a new FilteredTable using the given model
        Type Parameters:
        R - the type representing rows
        C - the type used to identify columns
        T - the table model type
        Parameters:
        tableModel - the table model
        Returns:
        a new FilteredTable
      • filteredTable

        public static <R,​C,​T extends FilteredTableModel<R,​C>> FilteredTable<R,​C,​T> filteredTable​(T tableModel,
                                                                                                                               ConditionPanelFactory conditionPanelFactory)
        Instantiates a new FilteredTable using the given model
        Type Parameters:
        R - the type representing rows
        C - the type used to identify columns
        T - the table model type
        Parameters:
        tableModel - the table model
        conditionPanelFactory - the column condition panel factory
        Returns:
        a new FilteredTable