|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.jaspira.action.keys.KeyTree
public class KeyTree
Tree over keysequences. Provides for a given key-sequences the number of sub-sequences.
| Constructor Summary | |
|---|---|
KeyTree()
Creates a root tree. |
|
KeyTree(KeyTree parent,
KeySequence sequence)
Creates a new sub tree with the given parent and keystroke. |
|
| Method Summary | |
|---|---|
void |
addSequence(KeySequence sequence)
Adds the given sequence to the tree, creating branches as necessary. |
int |
getNumberOfChildren()
Returns the number of possible keys fom here. |
KeySequence |
getSequence()
|
KeyTree |
getSubTree(javax.swing.KeyStroke stroke)
Returns the sub tree for the given keystroke. |
boolean |
hasChildren()
Returns true if this sub tree has any keys that lead further. |
javax.swing.KeyStroke[] |
keys()
Returns all children key strokes. |
boolean |
removeSequence(KeySequence sequence)
Removes a sequence from the tree, deleting obsolete branches. |
KeyTree[] |
subTrees()
Returns all sub trees. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public KeyTree()
public KeyTree(KeyTree parent,
KeySequence sequence)
parent - Parent tree or nullsequence - Remaining key sequence| Method Detail |
|---|
public void addSequence(KeySequence sequence)
sequence - Sequence to addpublic boolean removeSequence(KeySequence sequence)
sequence - Sequence to remove
public boolean hasChildren()
public int getNumberOfChildren()
public KeyTree getSubTree(javax.swing.KeyStroke stroke)
stroke - Key stroke to check
public javax.swing.KeyStroke[] keys()
public KeyTree[] subTrees()
public KeySequence getSequence()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||