|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcdox.util.conf.AbstractOption
cdox.util.conf.YesNoOption
This class represents a YesNo option. Below is an example of an appropriate section in the XML file:
<yesno package="cdox.gui.CDoxFrame" key="playsounds"> <default value="yes"/> <hint xml:lang="de">Sounds abspielen</hint> <hint xml:lang="en">Play sounds</hint> </yesno>The value of the default attribute value should either equal "yes" or "no".
Field Summary |
Fields inherited from class cdox.util.conf.AbstractOption |
key, node, prefs |
Constructor Summary | |
YesNoOption(org.w3c.dom.Node n,
Localizer lang)
Constructs one. |
Method Summary | |
boolean |
commitChanges()
Causes the option to write its changes to its preferences node. |
javax.swing.JComponent |
getComponent()
Returns a component which is used to alter this option. |
javax.swing.JLabel |
getText()
Returns a JLabel which describes the option. |
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 |
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 cdox.util.conf.AbstractOption |
getTextByLanguage, setMapping |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public YesNoOption(org.w3c.dom.Node n, Localizer lang)
n
- the DOM node where this option is described.lang
- a localizer.Method Detail |
public javax.swing.JLabel getText()
AbstractOption
getText
in class AbstractOption
public javax.swing.JComponent getComponent()
AbstractOption
getComponent
in class AbstractOption
JComponent
value.public boolean commitChanges()
AbstractOption
commitChanges
in class AbstractOption
public void setToDefault()
AbstractOption
setToDefault
in class AbstractOption
public void reset()
AbstractOption
reset
in class AbstractOption
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |