|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
weka.gui.ensembleLibraryEditor.tree.GenericObjectNode
public class GenericObjectNode
This class is responsible for allowing users to choose an object that was provided with a GenericObjectEditor. Just about every one of these Objects is a Weka Classifier. There are two important things that these nodes are responsible for beyond the other parameter node types. First, they must discover all of the parameters that need to be added in the model as child nodes. This is done through a loop of introspection that was copied and adapted from the weka.gui.PropertySheetPanel class. Second, this class is also responsible for discovering all possible combinations of GenericObject parameters that are stored in its child nodes. This is accomplished by first discovering all of the child node parameters in the getValues method and then finding all combinations of these values with the combinAllValues method.
Field Summary |
---|
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
EMPTY_ENUMERATION |
Constructor Summary | |
---|---|
GenericObjectNode(AddModelsPanel panel,
java.lang.Object value,
GenericObjectEditor genericObjectEditor,
java.lang.String toolTipText)
The constructor initialiazes the member variables of this node, Note that the "value" of this generic object is stored as the treeNode user object. |
Method Summary | |
---|---|
void |
combineAllValues(java.util.Vector previouslySelected,
java.util.Vector remainingValues)
This method is responsible for returning all possible values through a recursive loop. |
GenericObjectEditor |
getEditor()
A getter for the GenericObjectEditor for this node |
java.lang.StringBuffer |
getHelpText()
getter for the tooltip text |
java.lang.Object |
getObject()
getter for this node's object |
javax.swing.JPanel |
getParentPanel()
getter for the parent panel |
java.lang.String |
getToolTipText()
getter for the tooltip text |
javax.swing.JTree |
getTree()
returns the current tree |
java.util.Vector |
getValues()
This method iterates over all of the child nodes of this GenericObjectNode and requests the verious sets of values that the user has presumably specified. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
This implements the PropertyChangeListener for this node that gets registered with its Editor. |
void |
setObject(java.lang.Object newValue)
setter for this nodes object |
void |
setTree(javax.swing.JTree tree)
It seems kind of dumb that the reference to the tree model is passed in seperately - but know that this is actually necessary. |
void |
setUserObject(java.lang.Object o)
this is a simple filter for the setUserObject method. |
java.lang.String |
toString()
returns always null |
void |
updateTree()
This method uses introspection to programatically discover all of the parameters for this generic object. |
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, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GenericObjectNode(AddModelsPanel panel, java.lang.Object value, GenericObjectEditor genericObjectEditor, java.lang.String toolTipText)
panel
- the reference to the parent panel for calls to JDialogvalue
- the value stored at this tree nodegenericObjectEditor
- the GenericObjectEditor for this objecttoolTipText
- the tipText to be displayed for this objectMethod Detail |
---|
public void setTree(javax.swing.JTree tree)
tree
- the tree to usepublic javax.swing.JTree getTree()
public GenericObjectEditor getEditor()
public java.lang.StringBuffer getHelpText()
public java.lang.String getToolTipText()
public java.lang.Object getObject()
public void setObject(java.lang.Object newValue)
newValue
- sets the new objectpublic void setUserObject(java.lang.Object o)
setUserObject
in interface javax.swing.tree.MutableTreeNode
setUserObject
in class javax.swing.tree.DefaultMutableTreeNode
o
- the object to setpublic javax.swing.JPanel getParentPanel()
public java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
evt
- the eventpublic void updateTree()
public java.util.Vector getValues()
public void combineAllValues(java.util.Vector previouslySelected, java.util.Vector remainingValues)
previouslySelected
- stores the values chosen in this branch of the recursionremainingValues
- the sets of values left
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |