Package eu.bandm.tools.util.ui
Class SwingForester.TreeProxy
java.lang.Object
eu.bandm.tools.util.ui.SwingForester.TreeProxy
- All Implemented Interfaces:
TreeNode
- Direct Known Subclasses:
SwingForester.LazyNode,SwingForester.Leaf
- Enclosing class:
SwingForester
Common superclass of the two kinds of nodes which are displayed:
lazy subtrees or simple leafs.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()Return the optional label string.Return the tree node one level above.final ObjectReturn the represented object.final StringtoString()Return the visible string representation.abstract StringHook to be overridden by the user: Return the string representation (to be shown in the gui) of the value of the represented field.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, isLeaf
-
Field Details
-
parent
-
label
-
source
-
-
Constructor Details
-
TreeProxy
Only constructor.- Parameters:
parent- the parent nodelabel- describes the role of the object in its context, eg. the "UML associaton" pointing to a subtree, or the field name of a (class or primitive type) field value.source- is the data object represented by this GUI node.
-
-
Method Details
-
getParent
Return the tree node one level above. Will only be ==null for "top" node of the graphics. -
getLabel
Return the optional label string.- Returns:
- the optional label string
- See Also:
-
getSource
Return the represented object.- Returns:
- the represented object.
- See Also:
-
toString
Return the visible string representation. CallsvalueToString(), prepends the label, if !=null, with the separator, and wraps all in html tags if selected bySwingForester.html. -
valueToString
Hook to be overridden by the user: Return the string representation (to be shown in the gui) of the value of the represented field.- Returns:
- the string representation (to be shown in the gui) of the value of the represented field.
-