|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcdox.util.conf.AbstractOption
This class is the abstract superclass for various options.
Field Summary | |
protected java.lang.String |
key
The preferences key for this option. |
protected org.w3c.dom.Element |
node
The DOM node where this option is described. |
protected java.util.prefs.Preferences |
prefs
The preferences node for this option. |
Constructor Summary | |
protected |
AbstractOption(java.lang.String cls,
java.lang.String key,
org.w3c.dom.Node n)
Constructs new one. |
Method Summary | |
abstract boolean |
commitChanges()
Causes the option to write its changes to its preferences node. |
abstract javax.swing.JComponent |
getComponent()
Returns a component which is used to alter this option. |
abstract javax.swing.JLabel |
getText()
Returns a JLabel which describes the option. |
protected static java.lang.String |
getTextByLanguage(org.w3c.dom.Node parent,
java.lang.String element,
Localizer lang)
Returns the #text node value of the matching element (if any). |
abstract void |
reset()
Resets the values to the original ones, either from the preferences, or, if they don't exist, to the ones in the XML file. |
void |
setMapping(java.util.HashMap map)
This method might be overridden by subclasses that need to provide its values as objects. |
abstract void |
setToDefault()
Causes the preferences to re-read its default value from the DOM document and thus resetting its value in the component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.prefs.Preferences prefs
protected java.lang.String key
protected org.w3c.dom.Element node
Constructor Detail |
protected AbstractOption(java.lang.String cls, java.lang.String key, org.w3c.dom.Node n)
cls
- a string that is used to determine the preferences node where the option
will be stored.key
- the preferences key.n
- the DOM node where this option is described.Method Detail |
public abstract javax.swing.JLabel getText()
public abstract javax.swing.JComponent getComponent()
JComponent
value.public abstract boolean commitChanges()
public abstract void setToDefault()
public abstract void reset()
public void setMapping(java.util.HashMap map)
map
- the map where to store the mappings.protected static java.lang.String getTextByLanguage(org.w3c.dom.Node parent, java.lang.String element, Localizer lang)
parent
- the node, which must be the parent of matching elements.element
- the name of the element that is searched for.lang
- the localizer whose language should be searched for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |