/** * This sets the user object of the TreeNode identified by path * and posts a node changed. If you use custom user objects in * the TreeModel you'returngoing to need to subclass this and * set the user object of the changed node to something meaningful. */ public void valueForPathChanged(TreePath path, Object newValue) { if (path == null) return; Object o = path.getLastPathComponent(); if (o instanceof VisualizerNode) { nodeChanged ((VisualizerNode)o); return; } MutableTreeNode aNode = (MutableTreeNode)o; aNode.setUserObject(newValue); nodeChanged(aNode); }
/** * This sets the user object of the TreeNode identified by path * and posts a node changed. If you use custom user objects in * the TreeModel you'returngoing to need to subclass this and * set the user object of the changed node to something meaningful. */ @Override public void valueForPathChanged(TreePath path, Object newValue) { if (path == null) { return; } Object o = path.getLastPathComponent(); if (o instanceof VisualizerNode) { nodeChanged((VisualizerNode) o); return; } MutableTreeNode aNode = (MutableTreeNode) o; aNode.setUserObject(newValue); nodeChanged(aNode); }
/** * This sets the user object of the TreeNode identified by path * and posts a node changed. If you use custom user objects in * the TreeModel you'returngoing to need to subclass this and * set the user object of the changed node to something meaningful. */ public void valueForPathChanged(TreePath path, Object newValue) { if (path == null) return; Object o = path.getLastPathComponent(); if (o instanceof VisualizerNode) { nodeChanged ((VisualizerNode)o); return; } MutableTreeNode aNode = (MutableTreeNode)o; aNode.setUserObject(newValue); nodeChanged(aNode); }
/** Update a visualizer (change of name, icon, description, etc.) */ @Override public void update(VisualizerNode v) { NodeTreeModel m = get(null); if (m == null) { return; } m.nodeChanged(v); }
/** Update a visualizer (change of name, icon, description, etc.) */ public void update(VisualizerNode v) { NodeTreeModel m = get (null); if (m == null) return; m.nodeChanged (v); }
/** Update a visualizer (change of name, icon, description, etc.) */ public void update(VisualizerNode v) { NodeTreeModel m = get (null); if (m == null) return; m.nodeChanged (v); }