Interface HistoryReferencesTableModel<T extends HistoryReferencesTableEntry>

    • Method Detail

      • getColumn

        HistoryReferencesTableModel.Column getColumn​(int columnIndex)
        Returns the Column at the given column index.
        Parameters:
        columnIndex - the column index used to get the Column
        Returns:
        the Column at the given column index
        Throws:
        java.lang.IllegalArgumentException - if columnIndex is not valid (is negative, greater or equal than the number of columns).
      • getColumnIndex

        int getColumnIndex​(HistoryReferencesTableModel.Column column)
        Returns the index of the given column. If the given column is not enabled, null is returned.
        Parameters:
        column - the column that will be searched
        Returns:
        the index of the given column, or null if not enabled.
        Throws:
        java.lang.IllegalArgumentException - if column is null
        See Also:
        isColumnEnabled(Column)
      • isColumnEnabled

        boolean isColumnEnabled​(HistoryReferencesTableModel.Column column)
        Tells whether the given column is enabled. A column is enabled if the table model was configured to use it.
        Parameters:
        column - the column that will be checked
        Returns:
        true if the column is enabled, false otherwise.
        Throws:
        java.lang.IllegalArgumentException - if column is null
      • getPrototypeValue

        java.lang.Object getPrototypeValue​(int columnIndex)
        Returns the prototype value for the given column index. The prototype value is a possible representation of the values that might exist in the column. It's used to set an expected width for the column.
        Parameters:
        columnIndex - the column index that will be checked.
        Returns:
        the prototype value for the column
        Throws:
        java.lang.IllegalArgumentException - if columnIndex is not valid (is negative, greater or equal than the number of columns).
      • addEntry

        void addEntry​(T entry)
        Appends the given entry to the end of the entries.
        Parameters:
        entry - the entry that will be added
      • refreshEntryRow

        void refreshEntryRow​(int historyReferenceId)
        Notifies the table model listeners that the entry with the given historyReferenceId has changed.

        The call to this method has no effect if there is no entry with the given ID.

        Parameters:
        historyReferenceId - the HistoryReference ID of the entry that has changed
        See Also:
        TableModelListener
      • removeEntry

        void removeEntry​(int historyReferenceId)
        Removes the entry with the given historyReferenceId.

        The call to this method has no effect if there is no entry with the given ID.

        Parameters:
        historyReferenceId - the HistoryReference ID of the entry that will be removed
      • getEntry

        T getEntry​(int rowIndex)
        Returns the entry at the given rowIndex.
        Parameters:
        rowIndex - the row index of the entry
        Returns:
        the entry at the given row index
        Throws:
        java.lang.IllegalArgumentException - if rowIndex is not valid (is negative, greater or equal than the number of rows).
      • getEntryWithHistoryId

        T getEntryWithHistoryId​(int historyReferenceId)
        Returns the entry with the given historyReferenceId. If there is no entry with the given ID null is returned.
        Parameters:
        historyReferenceId - the HistoryReference ID of the entry that will be returned
        Returns:
        the entry with the given HistoryReference ID, or null if there is no entry with the given ID
      • getEntryRowIndex

        int getEntryRowIndex​(int historyReferenceId)
        Returns the row index of the entry with the given historyReferenceId. If there is no entry with the given ID -1 is returned.
        Parameters:
        historyReferenceId - the HistoryReference ID of the entry that will be searched
        Returns:
        the row index of the entry with the given HistoryReference ID, or -1 if there is no entry with the given ID
      • clear

        void clear()
        Removes all the entries.