gumbo.visualize.data.impl.swing
Class SwingTreeNode
java.lang.Object
|
+--gumbo.util.AbstractDisposable
|
+--gumbo.visualize.data.impl.swing.SwingDataProxy
|
+--gumbo.visualize.data.impl.swing.SwingTreeNode
- All Implemented Interfaces:
- DataModelListener, Disposable, Graphic, GraphicPresence, GraphicResource, GraphicView, InteractableGraphic, Interactor
- public class SwingTreeNode
- extends SwingDataProxy
A proxy for a tree node shape. Intended for use with SwingTreeView,
which controls layout and presentation. If the auto-label icon is
null a default icon is used according to the node state (leaf, closed
branch, expanded branch); otherwise, the provided icon is used regardless
of node state.
- Version:
- $Revision: 1.1 $
- Author:
- Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.
Field Summary |
static java.awt.Font |
TEXT_FONT
Default node text font. |
Method Summary |
void |
clientDataChanged(java.lang.Object source,
DataModel target)
Default implementation: Change the client data, then gives JTree
a kick to refresh itself. |
protected void |
implDispose()
Disposes itself. |
void |
initSwingDataModel(javax.swing.tree.DefaultTreeModel model,
javax.swing.tree.DefaultMutableTreeNode node)
|
protected void |
updateFeedback()
Default implementation: Notifies the native model that the node
corresponding to this graphic view has changed appearance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TEXT_FONT
public static final java.awt.Font TEXT_FONT
- Default node text font.
SwingTreeNode
public SwingTreeNode(PartView view)
initSwingDataModel
public void initSwingDataModel(javax.swing.tree.DefaultTreeModel model,
javax.swing.tree.DefaultMutableTreeNode node)
clientDataChanged
public void clientDataChanged(java.lang.Object source,
DataModel target)
- Default implementation: Change the client data, then gives JTree
a kick to refresh itself.
- Specified by:
clientDataChanged
in interface DataModelListener
- Overrides:
clientDataChanged
in class SwingDataProxy
- Parameters:
source
- The source object sending the event. Never null.target
- The affected data model. Never null.
updateFeedback
protected void updateFeedback()
- Default implementation: Notifies the native model that the node
corresponding to this graphic view has changed appearance.
- Overrides:
updateFeedback
in class SwingDataProxy
implDispose
protected void implDispose()
- Disposes itself. Note that the client is responsible for updating
the native model and graphic, which are associated with the whole
view.
- Overrides:
implDispose
in class SwingDataProxy