com.jstatcom.component
Class AppSettings

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.jstatcom.component.AppSettings
All Implemented Interfaces:
SettingsElement, java.io.Serializable, javax.swing.table.TableModel

public final class AppSettings
extends javax.swing.table.AbstractTableModel
implements SettingsElement

Holds user set properties. This can be used together with the AppSettings dialog to edit user settings.

Author:
Markus Kraetzig
See Also:
Serialized Form

Field Summary
static javolution.xml.XmlFormat<AppSettings> AppSettings_XML
          XML format field for (de)serialization.
 
Constructor Summary
AppSettings()
          Default constructor.
AppSettings(AppSettings appSettings)
          Copy constructor.
 
Method Summary
 int getColumnCount()
           
 java.lang.String getColumnName(int col)
           
 JSCInt getExitDialog()
          Gets JSCInt indicating whether exit Dialog should be shown.
 int getRowCount()
           
 JSCInt getSaveLastState()
          Gets JSCInt indicating whether save last state is on.
 JSCInt getSControlEdit()
          Gets JSCInt indicating whether the symbol table data table elements should be editable.
 JSCInt getShowExplorer()
          Gets JSCInt indicating whether explorer panel should be shown.
 java.lang.Object getValueAt(int row, int col)
           
 boolean isCellEditable(int row, int col)
           
 void setElement()
          Implementations of this method should use the information stored in this SettingsElement to set the state of components at runtime.
 void setValueAt(java.lang.Object value, int row, int col)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AppSettings_XML

public static final javolution.xml.XmlFormat<AppSettings> AppSettings_XML
XML format field for (de)serialization.

Constructor Detail

AppSettings

public AppSettings()
Default constructor.


AppSettings

public AppSettings(AppSettings appSettings)
Copy constructor.

Parameters:
appSettings - the instance to create a copy of
Method Detail

setElement

public void setElement()
Description copied from interface: SettingsElement
Implementations of this method should use the information stored in this SettingsElement to set the state of components at runtime. For example, one implementation of this interface, the ProjectTreeNode, adds itself to the ProjectTree when this method is called. Before that, it has been restored from its serialization in an XML file.

Specified by:
setElement in interface SettingsElement

getSaveLastState

public JSCInt getSaveLastState()
Gets JSCInt indicating whether save last state is on.

Returns:
JSCInt

getSControlEdit

public JSCInt getSControlEdit()
Gets JSCInt indicating whether the symbol table data table elements should be editable.

Returns:
JSCInt

getExitDialog

public JSCInt getExitDialog()
Gets JSCInt indicating whether exit Dialog should be shown.

Returns:
JSCInt

getShowExplorer

public JSCInt getShowExplorer()
Gets JSCInt indicating whether explorer panel should be shown.

Returns:
JSCInt

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface javax.swing.table.TableModel

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface javax.swing.table.TableModel

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

getColumnName

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

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)
Specified by:
getValueAt in interface javax.swing.table.TableModel

setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int col)
Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel