Class PropertiesTableModel

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

    public class PropertiesTableModel
    extends javax.swing.table.AbstractTableModel
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String key, java.lang.String value)
      Adds the row from the given key and value.
      void add​(java.util.Properties properties)
      Adds the given Properties.
      void clear()
      Removes all data from this table model.
      java.lang.String get​(int row)
      Gets the value from the given index.
      java.lang.String get​(java.lang.String key)
      Gets the Object from the given key.
      java.lang.Class<?> getColumnClass​(int columnIndex)
      int getColumnCount()
      java.lang.String getColumnName​(int columnIndex)
      java.util.Properties getData()
      Gets the data.
      int getRowCount()
      java.lang.Object getValueAt​(int rowIndex, int columnIndex)
      java.lang.String remove​(java.lang.String key)
      Removes the Object from the given key.
      void setData​(java.util.Properties properties)
      Sets the new properties.
      protected void setProperties​(java.util.Properties properties)
      Sets the properties.
      • Methods inherited from class javax.swing.table.AbstractTableModel

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

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

      • PropertiesTableModel

        public PropertiesTableModel​(java.util.Properties properties)
        Instantiates a new PropertiesTableModel.
        Parameters:
        properties - the properties to set.
    • Method Detail

      • add

        public void add​(java.util.Properties properties)
        Adds the given Properties.
        Parameters:
        properties - the properties to add.
      • add

        public void add​(java.lang.String key,
                        java.lang.String value)
        Adds the row from the given key and value.
        Parameters:
        key - the key
        value - the value
      • clear

        public void clear()
        Removes all data from this table model.
      • get

        public java.lang.String get​(int row)
        Gets the value from the given index.
        Parameters:
        row - The index from the row to get.
        Returns:
        the row from the given index.
      • get

        public java.lang.String get​(java.lang.String key)
        Gets the Object from the given key.
        Parameters:
        key - the key
        Returns:
        the Object from the given key.
      • getColumnClass

        public java.lang.Class<?> getColumnClass​(int columnIndex)
        Specified by:
        getColumnClass in interface javax.swing.table.TableModel
        Overrides:
        getColumnClass in class javax.swing.table.AbstractTableModel
      • getColumnCount

        public int getColumnCount()
      • getColumnName

        public java.lang.String getColumnName​(int columnIndex)
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
      • getData

        public java.util.Properties getData()
        Gets the data.
        Returns:
        the data
      • getRowCount

        public int getRowCount()
      • getValueAt

        public java.lang.Object getValueAt​(int rowIndex,
                                           int columnIndex)
      • remove

        public java.lang.String remove​(java.lang.String key)
        Removes the Object from the given key.
        Parameters:
        key - the key
        Returns:
        the removed Object or null if the object is not in the tablemodel.
      • setData

        public void setData​(java.util.Properties properties)
        Sets the new properties.
        Parameters:
        properties - the new properties
      • setProperties

        protected void setProperties​(java.util.Properties properties)
        Sets the properties.
        Parameters:
        properties - the new properties