Package adams.gui.core
Class AbstractBaseTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- adams.gui.core.AbstractBaseTableModel
-
- All Implemented Interfaces:
LoggingLevelHandler
,LoggingSupporter
,SpreadSheetSupporter
,Serializable
,TableModel
- Direct Known Subclasses:
AbstractMoveableTableModel
,AbstractTableBasedSelectionPanel.AbstractSelectionTableModel
,BreakpointTableModel
,CheckableTableModel
,ContainerModel
,ExpressionWatchPanel.TableModel
,FileWrapperTableModel
,InformativeStatisticFactory.Model
,InstanceTableModel
,KeyValuePairTableModel
,LocatedObjectsTableModel
,LogEntryViewerTableModel
,PlaceholderManagementPanel.PlaceholderTableModel
,ReportFactory.Model
,ResultSetTableModel
,SpreadSheetTableModel
,StoragePanel.TableModel
,VariableManagementPanel.VariableTableModel
,XYSequenceTable.Model
public abstract class AbstractBaseTableModel extends AbstractTableModel implements SpreadSheetSupporter, LoggingSupporter, LoggingLevelHandler
Abstract ancestor for table models. The models are automatically sortable.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Logger
m_Logger
the logger in use.protected Boolean
m_LoggingIsEnabled
whether logging is enabled.protected LoggingLevel
m_LoggingLevel
the logging level.-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBaseTableModel()
Initializes the model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configureLogger()
Initializes the logger.Logger
getLogger()
Returns the logger in use.LoggingLevel
getLoggingLevel()
Returns the logging level.protected void
initializeLogging()
Pre-configures the logging.boolean
isLoggingEnabled()
Returns whether logging is enabled.void
setLoggingLevel(LoggingLevel value)
Sets the logging level.SpreadSheet
toSpreadSheet()
Returns the content as spreadsheet.String
toString()
Returns the table content as spreadsheet.-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
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
getColumnCount, getRowCount, getValueAt
-
-
-
-
Field Detail
-
m_LoggingLevel
protected LoggingLevel m_LoggingLevel
the logging level.
-
m_Logger
protected transient Logger m_Logger
the logger in use.
-
m_LoggingIsEnabled
protected transient Boolean m_LoggingIsEnabled
whether logging is enabled.
-
-
Method Detail
-
initializeLogging
protected void initializeLogging()
Pre-configures the logging.
-
configureLogger
protected void configureLogger()
Initializes the logger.
Default implementation uses the class name.
-
getLogger
public Logger getLogger()
Returns the logger in use.- Specified by:
getLogger
in interfaceLoggingSupporter
- Returns:
- the logger
-
setLoggingLevel
public void setLoggingLevel(LoggingLevel value)
Sets the logging level.- Specified by:
setLoggingLevel
in interfaceLoggingLevelHandler
- Parameters:
value
- the level
-
getLoggingLevel
public LoggingLevel getLoggingLevel()
Returns the logging level.- Specified by:
getLoggingLevel
in interfaceLoggingLevelHandler
- Returns:
- the level
-
isLoggingEnabled
public boolean isLoggingEnabled()
Returns whether logging is enabled.- Specified by:
isLoggingEnabled
in interfaceLoggingSupporter
- Returns:
- true if at least
Level.INFO
-
toSpreadSheet
public SpreadSheet toSpreadSheet()
Returns the content as spreadsheet.- Specified by:
toSpreadSheet
in interfaceSpreadSheetSupporter
- Returns:
- the content
-
-