Package adams.gui.core
Class PropertiesTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- adams.gui.core.AbstractBaseTableModel
-
- adams.gui.core.KeyValuePairTableModel
-
- adams.gui.core.PropertiesTableModel
-
- All Implemented Interfaces:
LoggingLevelHandler
,LoggingSupporter
,SpreadSheetSupporter
,CustomSearchTableModel
,Serializable
,TableModel
public class PropertiesTableModel extends KeyValuePairTableModel
Table model for displaying a properties object.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.gui.core.KeyValuePairTableModel
m_ColumnNames, m_Data, m_Editable, m_Modified
-
Fields inherited from class adams.gui.core.AbstractBaseTableModel
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description PropertiesTableModel()
Initializes the table model with no data.PropertiesTableModel(Properties props)
Initializes the table model.PropertiesTableModel(Properties props)
Initializes the table model.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static String[][]
convert(Properties data)
Turns the properties into key-value pairs.Properties
getProperties()
Returns the current content as properties.-
Methods inherited from class adams.gui.core.KeyValuePairTableModel
getColumnClass, getColumnCount, getColumnName, getKeyAt, getRowCount, getValueAt, getValueAt, isCellEditable, isEditable, isModified, isSearchMatch, setEditable, setModified, setValueAt
-
Methods inherited from class adams.gui.core.AbstractBaseTableModel
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, setLoggingLevel, toSpreadSheet, toString
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, removeTableModelListener
-
-
-
-
Constructor Detail
-
PropertiesTableModel
public PropertiesTableModel()
Initializes the table model with no data.
-
PropertiesTableModel
public PropertiesTableModel(Properties props)
Initializes the table model.- Parameters:
props
- the props to display
-
PropertiesTableModel
public PropertiesTableModel(Properties props)
Initializes the table model.- Parameters:
props
- the props to display
-
-
Method Detail
-
getProperties
public Properties getProperties()
Returns the current content as properties.- Returns:
- the properties
-
convert
protected static String[][] convert(Properties data)
Turns the properties into key-value pairs. The keys are sorted alphabetically.- Parameters:
data
- the data to convert- Returns:
- the converted data
-
-