|
||||||||||
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.KeyStrokeOption
This class represents a KeyStroke option. Below is an example of an appropriate section in the XML file:
<keystroke package="cdox.gui.CDoxFrame" key="about"> <default key="VK_A" modifier="CTRL_MASK+SHIFT_MASK"/> <hint xml:lang="de">Infos über CDox</hint> <hint xml:lang="en">Show about box</hint> </keystroke>You can use several modifier keys in that file, but they must be separated by "+" chars. You find the constants you can use in the class java.awt.event.KeyEvent, for modifiers you must use the *MASK constants from InputEvent.
Field Summary |
Fields inherited from class cdox.util.conf.AbstractOption |
key, node, prefs |
Constructor Summary | |
KeyStrokeOption(org.w3c.dom.Node n,
Localizer lang)
Constructs one. |
Method Summary | |
static KeyStrokeOption[] |
checkValidity()
This method checks all changed keystrokes for validity. |
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. |
protected java.lang.String |
getHint()
This one returns the descriptive hint for this keystroke as String. |
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. |
static void |
resetValidityCheck()
Resets the validity information to zero. |
void |
setMapping(java.util.HashMap map)
Maps the key stroke for this option to its key. |
void |
setToDefault()
Causes the preferences to re-read its default value from the DOM document and thus resetting its value in the component. |
java.lang.String |
toString()
|
Methods inherited from class cdox.util.conf.AbstractOption |
getTextByLanguage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public KeyStrokeOption(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
public void setMapping(java.util.HashMap map)
setMapping
in class AbstractOption
map
- the hash map where the value will be put.AbstractOption.setMapping(java.util.HashMap)
protected java.lang.String getHint()
public static KeyStrokeOption[] checkValidity()
public static void resetValidityCheck()
clear()
s an
internal hash set. This should be done every time the configuration dialog is
initialized/created. Well, actually, it is done in its constructor...
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |