|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.util.AbstractPluginPreferences
public abstract class AbstractPluginPreferences
This class acts as a wraper for the Preferences
class. It
is meant to be extended by plugins that need to store preferences.
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
logger
|
protected Preferences |
prefs
|
static java.lang.String |
VERSION_KEY
|
Constructor Summary | |
---|---|
AbstractPluginPreferences(java.lang.String namespace,
int version)
Constructs an AbstractPluginPreference object. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
addPropertyChangeListener(java.lang.String key,
java.beans.PropertyChangeListener l)
|
void |
addTableListener(java.lang.String table,
java.beans.PropertyChangeListener l)
|
void |
convert(int oldVersion)
Convert the preferences from oldVersion . |
java.lang.String |
get(java.lang.String key)
Returns the String value to which the specified key is mapped. |
java.lang.String[] |
getArray(java.lang.String key)
|
boolean |
getBoolean(java.lang.String key)
Returns the boolean value to which the specified key is mapped. |
java.awt.Color |
getColor(java.lang.String key)
|
java.awt.Font |
getFont(java.lang.String key)
|
int |
getInt(java.lang.String key)
|
int[] |
getIntArray(java.lang.String key)
|
javax.swing.KeyStroke |
getKeyStroke(java.lang.String key)
|
long |
getLong(java.lang.String key)
|
boolean |
getNotShowDialog(java.lang.String dialogName)
|
java.lang.String[] |
getTableColumns(java.lang.String table)
Returns an array of visible columns as an array of column keys. |
int[] |
getTableColumnWidths(java.lang.String table)
|
boolean |
getTableMaintainSortOrder(java.lang.String table)
|
int |
getTableSortedColumn(java.lang.String table)
Returns 0, if no column is sorted, otherwise the model index of the column + 1. |
void |
removeProperty(java.lang.String key)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
removePropertyChangeListener(java.lang.String key,
java.beans.PropertyChangeListener l)
|
void |
renameProperty(java.lang.String oldKey,
java.lang.String newKey)
Renames a property, used for conversion of property file formats. |
void |
set(java.lang.String key,
boolean newValue)
|
void |
set(java.lang.String key,
java.awt.Color newValue)
|
void |
set(java.lang.String key,
java.awt.Font newValue)
|
void |
set(java.lang.String key,
int newValue)
|
void |
set(java.lang.String key,
int[] newValue)
|
void |
set(java.lang.String key,
javax.swing.KeyStroke newValue)
|
void |
set(java.lang.String key,
long newValue)
|
void |
set(java.lang.String key,
java.lang.String newValue)
|
void |
set(java.lang.String key,
java.lang.String[] newValue)
|
void |
setDefault(java.lang.String key,
java.lang.String value)
|
void |
setDefault(java.lang.String key,
java.lang.String value,
Validator validator)
|
void |
setNotShowDialog(java.lang.String dialogName,
boolean newValue)
|
void |
setTableColumns(java.lang.String table,
java.lang.String[] columns)
Sets an array of visible columns as an array of column keys. |
void |
setTableColumnWidths(java.lang.String table,
int[] widths)
|
void |
setTableMaintainSortOrder(java.lang.String table,
boolean enable)
|
void |
setTableSortedColumn(java.lang.String table,
int column)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION_KEY
protected static org.apache.log4j.Logger logger
protected Preferences prefs
Constructor Detail |
---|
public AbstractPluginPreferences(java.lang.String namespace, int version)
namespace
- a prefix that is used for each keyversion
- the current version of the preferencesMethod Detail |
---|
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener
in interface PreferencesProvider
public void addPropertyChangeListener(java.lang.String key, java.beans.PropertyChangeListener l)
addPropertyChangeListener
in interface PreferencesProvider
public void addTableListener(java.lang.String table, java.beans.PropertyChangeListener l)
addTableListener
in interface TablePreferencesProvider
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener
in interface PreferencesProvider
public void removePropertyChangeListener(java.lang.String key, java.beans.PropertyChangeListener l)
removePropertyChangeListener
in interface PreferencesProvider
public void convert(int oldVersion)
oldVersion
. The
default implementation does nothing. Sub classes should
overwrite this method.
public java.lang.String get(java.lang.String key)
PreferencesProvider
get
in interface PreferencesProvider
public boolean getNotShowDialog(java.lang.String dialogName)
public java.lang.String[] getArray(java.lang.String key)
public boolean getBoolean(java.lang.String key)
PreferencesProvider
getBoolean
in interface PreferencesProvider
public java.awt.Color getColor(java.lang.String key)
public java.awt.Font getFont(java.lang.String key)
public int getInt(java.lang.String key)
public int[] getIntArray(java.lang.String key)
public javax.swing.KeyStroke getKeyStroke(java.lang.String key)
getKeyStroke
in interface PreferencesProvider
public long getLong(java.lang.String key)
public java.lang.String[] getTableColumns(java.lang.String table)
TablePreferencesProvider
getTableColumns
in interface TablePreferencesProvider
public int[] getTableColumnWidths(java.lang.String table)
getTableColumnWidths
in interface TablePreferencesProvider
public boolean getTableMaintainSortOrder(java.lang.String table)
getTableMaintainSortOrder
in interface TablePreferencesProvider
public int getTableSortedColumn(java.lang.String table)
TablePreferencesProvider
getTableSortedColumn
in interface TablePreferencesProvider
public void removeProperty(java.lang.String key)
public void renameProperty(java.lang.String oldKey, java.lang.String newKey)
public void set(java.lang.String key, java.lang.String newValue)
set
in interface PreferencesProvider
public void set(java.lang.String key, java.lang.String[] newValue)
public void set(java.lang.String key, boolean newValue)
set
in interface PreferencesProvider
public void set(java.lang.String key, java.awt.Color newValue)
public void set(java.lang.String key, java.awt.Font newValue)
public void set(java.lang.String key, int newValue)
public void set(java.lang.String key, int[] newValue)
public void set(java.lang.String key, javax.swing.KeyStroke newValue)
set
in interface PreferencesProvider
public void set(java.lang.String key, long newValue)
public void setDefault(java.lang.String key, java.lang.String value, Validator validator)
public void setDefault(java.lang.String key, java.lang.String value)
public void setNotShowDialog(java.lang.String dialogName, boolean newValue)
public void setTableColumns(java.lang.String table, java.lang.String[] columns)
TablePreferencesProvider
setTableColumns
in interface TablePreferencesProvider
public void setTableColumnWidths(java.lang.String table, int[] widths)
setTableColumnWidths
in interface TablePreferencesProvider
public void setTableMaintainSortOrder(java.lang.String table, boolean enable)
setTableMaintainSortOrder
in interface TablePreferencesProvider
public void setTableSortedColumn(java.lang.String table, int column)
setTableSortedColumn
in interface TablePreferencesProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |