Class LogEntryViewerTableModel

    • Constructor Detail

      • LogEntryViewerTableModel

        public LogEntryViewerTableModel()
        Initializes the model with no data.
      • LogEntryViewerTableModel

        public LogEntryViewerTableModel​(Vector<LogEntry> data)
        Initializes the model with the specified data.
        Parameters:
        data - the data to display
    • Method Detail

      • getData

        public Vector<LogEntry> getData()
        Returns the underlying data.
        Returns:
        the data
      • getRowCount

        public int getRowCount()
        Returns the number of rows.
        Specified by:
        getRowCount in interface TableModel
        Returns:
        the number of rows
      • getColumnCount

        public int getColumnCount()
        Returns the number of columns in the table.
         Host
         IP
         DB-ID
         Generation
         Type
         Statuts
         Source
         
        Specified by:
        getColumnCount in interface TableModel
        Returns:
        the number of columns, always 7
      • getLogEntryAt

        public LogEntry getLogEntryAt​(int row)
        Returns the LogEntry at the given position.
        Parameters:
        row - the row in the table
        Returns:
        the entry
      • getValueAt

        public Object getValueAt​(int row,
                                 int column)
        Returns the value at the given position.
        Specified by:
        getValueAt in interface TableModel
        Parameters:
        row - the row in the table
        column - the column in the table
        Returns:
        the value
      • isSearchMatch

        public boolean isSearchMatch​(SearchParameters params,
                                     int row)
        Tests whether the search matches the specified row.
        Specified by:
        isSearchMatch in interface CustomSearchTableModel
        Parameters:
        params - the search parameters
        row - the row of the underlying, unsorted model
        Returns:
        true if the search matches this row
      • clear

        public void clear()
        Removes all entries.
      • add

        public void add​(LogEntry entry)
        Adds the log entry to the model (appended at the end).
        Parameters:
        entry - the entry to add
      • add

        public void add​(LogEntry entry,
                        boolean sort)
        Adds the log entry to the model. Entry can be inserted at the end or in sorted fashion.
        Parameters:
        entry - the entry to add
        sort - whether to sort the data
      • addAll

        public void addAll​(Collection<LogEntry> entries)
        Adds the log entries to the model (appended at the end).
        Parameters:
        entries - the entries to add
      • addAll

        public void addAll​(Collection<LogEntry> entries,
                           boolean sort)
        Adds the log entries to the model. Entries can be inserted at the end or in sorted fashion.
        Parameters:
        entries - the entries to add
        sort - whether to sort the data