|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
Jet.Concepts.Concept
A Concept is basically a DefaultMutableTreeNode.
Its userObject is its name as a String. It allows
children who can be either a Concept or a word.
Concept instances are transferable.
| Field Summary | |
static java.awt.datatransfer.DataFlavor |
DEFAULT_MUTABLE_TREENODE_FLAVOR
The flavor for DefaultMutableTreeNode |
protected java.util.Vector |
subconcepts
The Concepts that isa this Concept |
protected java.util.Vector |
words
The Words of this Concept |
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
Concept(java.lang.Object conceptName)
Creates a tree node with no children and parent, initialized with the name conceptName |
|
| Method Summary | |
void |
addConcept(Concept newConcept)
Adds a new Concept to this Concept. |
void |
addWord(Word newWord)
Adds a new Word to this Concept. |
java.util.Enumeration |
breadthFirstEnumerationOfConcepts()
Creates and returns an enumeration of the Concepts
in the subtree rooted at this node in breadth-first order. |
java.util.Enumeration |
breadthFirstEnumerationOfWords()
Creates and returns an enumeration of the Words
in the subtree rooted at this node in breadth-first order. |
java.lang.String |
getName()
Returns the name of this Concept. |
Concept |
getSubconceptAt(int index)
Returns the subconcept at the specified index in this Concept's subconcept array. |
int |
getSubconceptCount()
Returns the number of subconcepts of this Concept. |
java.util.Vector |
getSubconcepts()
Returns the vector of the subconcepts of this Concept. |
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor)
This is a Transferable method. |
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
This is a Transferable method. |
Word |
getWordAt(int index)
Returns the Word at the specified index in this
Concept's Word array. |
int |
getWordCount()
Returns the number of Words of this Concept. |
java.util.Vector |
getWords()
Returns the vector of the words of this Concept. |
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
This is a Transferable method. |
boolean |
isLeaf()
Overrides the isLeaf() method in DefaultMutableTreeNode
so that only Words are treated as leaves and Concepts
are always treated as internal nodes. |
void |
removeAllChildren()
Overrides the removeAllchildren() method
of DefaultMutableTreeNode. |
void |
removeConcept(Concept oldConcept)
Removes a subconcept with its children from this Concept. |
void |
removeWord(Word oldWord)
Removes a word from this Concept. |
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeFromParent, setAllowsChildren, setParent, setUserObject, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.util.Vector subconcepts
Concepts that isa this Concept
protected java.util.Vector words
Words of this Concept
public static final java.awt.datatransfer.DataFlavor DEFAULT_MUTABLE_TREENODE_FLAVOR
DefaultMutableTreeNode
| Constructor Detail |
public Concept(java.lang.Object conceptName)
conceptName and that allows children.
| Method Detail |
public java.lang.String getName()
Concept.
Conceptpublic boolean isLeaf()
isLeaf() method in DefaultMutableTreeNode
so that only Words are treated as leaves and Concepts
are always treated as internal nodes. This is for the graphical representation
of tree nodes.
isLeaf in interface javax.swing.tree.TreeNodefalsepublic java.util.Vector getSubconcepts()
Concept.
Conceptpublic java.util.Vector getWords()
Concept.
Conceptpublic int getSubconceptCount()
Concept.
Conceptpublic int getWordCount()
Words of this Concept.
Words of this Conceptpublic Concept getSubconceptAt(int index)
Concept's subconcept array.
Concept's subconcept arraypublic Word getWordAt(int index)
Word at the specified index in this
Concept's Word array.
Word at the specified index in this
Concept's Word arraypublic void addConcept(Concept newConcept)
Concept to this Concept.
newConcept - the new Concept to be added to this
Conceptpublic void addWord(Word newWord)
Word to this Concept.
All the words are listed before all the subconcepts in the vector
children inherited from super.
newWord - the new Word to be added to this
Conceptpublic void removeConcept(Concept oldConcept)
Concept.
oldConcept - the subconcept to be removed from this
Conceptpublic void removeWord(Word oldWord)
Concept.
oldWord - the word to be removed from this Conceptpublic void removeAllChildren()
removeAllchildren() method
of DefaultMutableTreeNode.
public java.util.Enumeration breadthFirstEnumerationOfConcepts()
Concepts
in the subtree rooted at this node in breadth-first order.
Concepts in the subtree
rooted at this node in breadth-first orderpublic java.util.Enumeration breadthFirstEnumerationOfWords()
Words
in the subtree rooted at this node in breadth-first order.
Words in the subtree
rooted at this node in breadth-first order
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
throws java.io.IOException,
java.awt.datatransfer.UnsupportedFlavorException
Transferable method.
getTransferData in interface java.awt.datatransfer.Transferablejava.io.IOException
java.awt.datatransfer.UnsupportedFlavorExceptionpublic java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Transferable method.
getTransferDataFlavors in interface java.awt.datatransfer.Transferablepublic boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
Transferable method.
isDataFlavorSupported in interface java.awt.datatransfer.Transferable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||