Class ServerListTableModel

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.table.TableModel

    class ServerListTableModel
    extends javax.swing.table.AbstractTableModel
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String[] columnNames  
      private java.util.List<ServerInfo> items  
      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumnCount()
      Returns the amount of columns in this statesTable.
      java.lang.String getColumnName​(int column)
      Returns the name of the specified column.
      ServerInfo getItem​(int row)
      Gets the given item.
      int getRowCount()
      Returns the amount of rows in this statesTable.
      java.lang.Object getValueAt​(int row, int column)
      Returns the value at the requested location.
      void setItems​(java.util.List<ServerInfo> items)
      Sets the items that should be contained by this model.
      • Methods inherited from class javax.swing.table.AbstractTableModel

        addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • columnNames

        private static final java.lang.String[] columnNames
    • Constructor Detail

      • ServerListTableModel

        public ServerListTableModel​(java.util.List<ServerInfo> items)
    • Method Detail

      • setItems

        public void setItems​(java.util.List<ServerInfo> items)
        Sets the items that should be contained by this model.
        Parameters:
        items - The ArrayList containing the items.
      • getItem

        public ServerInfo getItem​(int row)
        Gets the given item.
        Parameters:
        row - The row-number identifying a ServerInfo-line.
        Returns:
        The ServerInfo.
      • getColumnCount

        public int getColumnCount()
        Returns the amount of columns in this statesTable.
        Returns:
        The amount of columns in this statesTable.
      • getColumnName

        public java.lang.String getColumnName​(int column)
        Returns the name of the specified column.
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
        Returns:
        The name of the specified column.
      • getRowCount

        public int getRowCount()
        Returns the amount of rows in this statesTable.
        Returns:
        The amount of rows in this statesTable.
      • getValueAt

        public java.lang.Object getValueAt​(int row,
                                           int column)
        Returns the value at the requested location.
        Parameters:
        row - The requested row.
        column - The requested column.
        Returns:
        The value at the requested location.