|
Preferences Editor | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
de.jppietsch.prefedit.PreferencesTableModel
A table model to display a Preferences as a table where each entry is
a row. The keys are in column 0 and the values are in column 2.
| Field Summary | |
static int |
VALUE_COLUMN
Description of the Field |
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
| Constructor Summary | |
PreferencesTableModel()
|
|
| Method Summary | |
int |
getColumnCount()
Gets the columnCount attribute of the PreferencesTableModel object |
String |
getColumnName(int aColumnIndex)
Returns the name of a column from the resource bundle's
resources Rsc#KEY_COLUMN_NAME and Rsc#VALUE_COLUMN_NAME. |
int |
getRowCount()
Gets the rowCount attribute of the PreferencesTableModel object |
Object |
getValueAt(int aRowIndex,
int aColumnIndex)
Gets the valueAt attribute of the PreferencesTableModel object |
boolean |
isCellEditable(int aRowIndex,
int aColumnIndex)
Returns true for the right column, because the preferences
values are editable, but not their keys. |
void |
preferenceChange(PreferenceChangeEvent anEvent)
Fires a table data changed event. |
void |
setPreferences(Preferences somePreferences)
Assigns a preferences node to this table model. |
void |
setValueAt(Object aValue,
int aRowIndex,
int aColumnIndex)
Changes the value of a preference. |
| 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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int VALUE_COLUMN
| Constructor Detail |
public PreferencesTableModel()
| Method Detail |
public int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic String getColumnName(int aColumnIndex)
resource bundle's
resources Rsc#KEY_COLUMN_NAME and Rsc#VALUE_COLUMN_NAME.
getColumnName in interface TableModelaColumnIndex - #KEY_COLUMN oder VALUE_COLUMN.
public boolean isCellEditable(int aRowIndex,
int aColumnIndex)
true for the right column, because the preferences
values are editable, but not their keys.
isCellEditable in interface TableModelaRowIndex - Is ignored, there is no difference between the rows.aColumnIndex - 0 is not editable, but 1
is.
aColumnIndex==1.
public Object getValueAt(int aRowIndex,
int aColumnIndex)
getValueAt in interface TableModelaRowIndex - Description of ParameteraColumnIndex - Description of Parameter
public void setValueAt(Object aValue,
int aRowIndex,
int aColumnIndex)
setValueAt in interface TableModelaValue - Must be a string.aRowIndex - Determines the key of the preference to be changed.aColumnIndex - Must be 1 because that's the values
column's index.public void setPreferences(Preferences somePreferences)
somePreferences - The preferences object to be displayed or null
if there is none (e.g. for the tree's root node).public void preferenceChange(PreferenceChangeEvent anEvent)
preferenceChange in interface PreferenceChangeListeneranEvent - is currently not used, but may be in future.
|
Preferences Editor | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||