Thread: [Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview GenericTreeView.java, 1.49, 1.5
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2006-09-29 14:57:27
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9581/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java SpaceTreeView.java CameraTreeView.java SurfaceTreeView.java Log Message: Changed the Tree view to update by recursive calls to keep selection and all open paths, as well as refactoring of the generictreeview structure Made all remove methods private in the model and let delete methods call remove and afterwards make a changed event. Index: SurfaceTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SurfaceTreeView.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SurfaceTreeView.java 17 May 2006 12:03:42 -0000 1.6 --- SurfaceTreeView.java 29 Sep 2006 14:57:15 -0000 1.7 *************** *** 26,32 **** */ public void update() { ! root.removeAllChildren(); ! root.add(new SurfaceContainer("Surfaces", Project.getInstance().getSurfaces())); ! model.nodeStructureChanged(root); } } --- 26,35 ---- */ public void update() { ! if (root.getChildCount() == 0) { ! root.add(new SurfaceContainer("Surfaces", Project.getInstance().getSurfaces())); ! model.nodeStructureChanged(root); ! } else { ! ((GenericNode)root.getChildAt(0)).update(Project.getInstance().getSurfaces()); ! } } } Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** GenericTreeView.java 26 Sep 2006 09:50:54 -0000 1.49 --- GenericTreeView.java 29 Sep 2006 14:57:15 -0000 1.50 *************** *** 17,20 **** --- 17,21 ---- import java.util.Collections; import java.util.Comparator; + import java.util.Enumeration; import java.util.HashSet; import java.util.Iterator; *************** *** 274,278 **** * GenericNode */ ! public class GenericNode extends DefaultMutableTreeNode { /** * --- 275,279 ---- * GenericNode */ ! public abstract class GenericNode extends DefaultMutableTreeNode { /** * *************** *** 303,306 **** --- 304,318 ---- return null; } + + /** + * @param o the object to update with + */ + public void update(Object o) { + if (o != null) { + this.userObject = o; + } else { + log.warn("Tried to update with null on " + this); + } + } } *************** *** 354,357 **** --- 366,438 ---- public ImageIcon icon() { return genericgroupicon; + } + + /** + * Remove the children from container node + * @param children the children to remove + */ + protected void removeChildren(Collection children) { + Object[] rem = new Object[children.size()]; + int[] indices = new int[children.size()]; + int i= 0,reach = 0; + for (int n = 0; n < this.children.size(); n++) { + GenericNode s = (GenericNode)this.getChildAt(n); + if (children.contains(s)) { + rem[i] = s; + indices[i] = n; + i++; + } + } + for(int k=0; k < rem.length; k++) { + this.remove((GenericNode)rem[k]); + } + if (rem.length > 0) { + model.nodesWereRemoved(this, indices, rem); + } + } + + /** + * Update the container + */ + public void update(Object o) { + if (o instanceof Collection) { + Set elem = new HashSet((Collection)o); + Set children = new HashSet(); + Enumeration e = this.children(); + while (e.hasMoreElements()) { + GenericNode sn = (GenericNode)e.nextElement(); + if (elem.contains(sn.getUserObject())) { + //If the node is allready there then just update it + sn.update(sn.getUserObject()); + elem.remove(sn.getUserObject()); + } else { + children.add(sn); + } + } + if (elem.size() > 0) { + this.insertChildren(elem); + } + if (children.size() > 0) { + this.removeChildren(children); + } + } else { + log.warn("Were called with " + o + " and not a list"); + } + } + + /** + * Insert the given object into the node + * @param elem the elements + */ + public void insertChildren(Collection elem) { + int[] ins = new int[elem.size()]; + int i = 0; + Iterator iter = elem.iterator(); + while (iter.hasNext()) { + this.add(new EntityNode(iter.next())); + ins[i] = this.getChildCount() - 1; + i++; + } + model.nodesWereInserted(this, ins); } } *************** *** 400,403 **** --- 481,495 ---- return pm; } + + + /** + * + */ + public void update(Object o) { + if (o instanceof Entity || o instanceof Attribute) { + userObject = o; + model.nodeChanged(this); + } + } } *************** *** 410,414 **** */ private static final long serialVersionUID = 1L; ! /** * Constructor for SpaceNode --- 502,506 ---- */ private static final long serialVersionUID = 1L; ! /** * Constructor for SpaceNode *************** *** 419,423 **** Set surfaces = space.getEnvelope(); add(new SurfaceContainer("Surfaces", surfaces)); ! add(new ElementContainer("Elements", space)); add(new GeometryContainer("Geometry", space)); if (space.getModellor() != null) { --- 511,515 ---- Set surfaces = space.getEnvelope(); add(new SurfaceContainer("Surfaces", surfaces)); ! add(new ElementContainer("Elements", space.getElements())); add(new GeometryContainer("Geometry", space)); if (space.getModellor() != null) { *************** *** 426,429 **** --- 518,530 ---- } + public void update(Object o) { + if (o instanceof Space) { + Space s = (Space)o; + ((GenericNode)getChildAt(0)).update(s.getEnvelope()); + ((GenericNode)getChildAt(1)).update(s.getElements()); + ((GenericNode)getChildAt(2)).update(s); + } + } + /** * Return the displaystring for this EntityNode *************** *** 484,487 **** --- 585,598 ---- return surfaceicon; } + + /** + * + */ + public void update(Object o) { + if (o instanceof Surface) { + userObject = (Surface)o; + ((GenericNode)getChildAt(0)).update(((Surface)o).getEdges()); + } + } } *************** *** 538,541 **** --- 649,663 ---- return edgeicon; } + + public void update(Object o) { + if (o instanceof Edge) { + Edge e = (Edge)o; + userObject = e; + ((EntityNode)this.getChildAt(0)).update(e.getFrom()); + ((EntityNode)this.getChildAt(1)).update(e.getTo()); + } else { + log.warn("Should be a edge but weren't" + o); + } + } } *************** *** 586,669 **** /** - * CameraNode - */ - public class CameraNode extends EntityNode { - /** */ - private static final long serialVersionUID = 1L; - - /** - * Constructor for CameraNode - * @param camera The camera - */ - public CameraNode(Camera camera) { - super(camera); - } - } - - /** - * ProjectContainer - */ - public class ProjectContainer extends ContainerNode { - /** - * - */ - private static final long serialVersionUID = 1L; - - /** name */ - private String name; - - /** - * Constructor for ProjectContainer - * @param name Display name - * @param object The project - */ - public ProjectContainer(String name, Project object) { - super(object); - Collection spaces = object.getSpaces(); - this.name = name; - final Comparator alpha = - new Comparator() { - public int compare(Object s1, Object s2) { - return ((Space) s1).getName().compareToIgnoreCase(((Space) s2).getName()); - } - }; - - final Comparator num = - new Comparator() { - public int compare(Object s1, Object s2) { - return ((Space) s1).getId().compareTo(((Space) s2).getId()); - } - }; - - LinkedList sort = new LinkedList(spaces); - Collections.sort(sort, num); - Collections.sort(sort, alpha); - - Iterator iter = sort.iterator(); - while (iter.hasNext()) { - Space current = (Space) iter.next(); - add(new SpaceNode(current)); - } - } - - /** - * Name - * @return String - */ - public String toString() { - return name; - } - - /** - * Return icon - * @return Icon - */ - public ImageIcon icon() { - return spacegroupicon; - } - - } - - /** * SurfaceContainer */ --- 708,711 ---- *************** *** 695,699 **** } } ! /** * Return icon --- 737,759 ---- } } ! ! /** ! * Insert the given object into the node ! * @param elem the elements ! */ ! public void insertChildren(Collection elem) { ! int[] ins = new int[elem.size()]; ! int i = 0; ! Iterator iter = elem.iterator(); ! while (iter.hasNext()) { ! Surface s = (Surface)iter.next(); ! this.add(new SurfaceNode(s)); ! ins[i] = this.getChildCount() - 1; ! i++; ! } ! model.nodesWereInserted(this, ins); ! } ! ! /** * Return icon *************** *** 703,707 **** return surfacegroupicon; } - } --- 763,766 ---- *************** *** 720,726 **** * @param space The space */ ! public ElementContainer(String name, Space space) { super(name); - Collection elements = space.getElements(); Iterator iter = elements.iterator(); while (iter.hasNext()) { --- 779,784 ---- * @param space The space */ ! public ElementContainer(String name, Collection elements) { super(name); Iterator iter = elements.iterator(); while (iter.hasNext()) { *************** *** 731,734 **** --- 789,810 ---- /** + * Insert the given object into the node + * @param elem the elements + */ + public void insertChildren(Collection elem) { + int[] ins = new int[elem.size()]; + int i = 0; + Iterator iter = elem.iterator(); + while (iter.hasNext()) { + Space s = (Space)iter.next(); + log.info("interted " + s); + this.add(new SpaceNode(s)); + ins[i] = this.getChildCount() - 1; + i++; + } + model.nodesWereInserted(this, ins); + } + + /** * Return icon * @return Icon *************** *** 760,763 **** --- 836,846 ---- add(new VertexContainer("Vertices", space.getVertices())); } + + public void update(Object o) { + Space s = (Space)o; + ((SurfaceContainer)this.getChildAt(0)).update(s.getSurfaces()); + ((EdgeContainer)this.getChildAt(1)).update(s.getEdges()); + ((VertexContainer)this.getChildAt(2)).update(s.getVertices()); + } } *************** *** 781,785 **** Iterator iter = constructors.iterator(); while (iter.hasNext()) { ! add(new ConstructorNode((Constructor)iter.next())); } } --- 864,869 ---- Iterator iter = constructors.iterator(); while (iter.hasNext()) { ! Constructor current = (Constructor) iter.next(); ! add(new ConstructorNode(current)); } } *************** *** 792,795 **** --- 876,896 ---- return constructorgroupicon; } + + /** + * Insert the given object into the node + * @param elem the elements + */ + public void insertChildren(Collection elem) { + int[] ins = new int[elem.size()]; + int i = 0; + Iterator iter = elem.iterator(); + while (iter.hasNext()) { + Constructor s = (Constructor)iter.next(); + this.add(new ConstructorNode(s)); + ins[i] = this.getChildCount() - 1; + i++; + } + model.nodesWereInserted(this, ins); + } } *************** *** 816,819 **** --- 917,937 ---- /** + * Insert the given object into the node + * @param elem the elements + */ + public void insertChildren(Collection elem) { + int[] ins = new int[elem.size()]; + int i = 0; + Iterator iter = elem.iterator(); + while (iter.hasNext()) { + Edge s = (Edge)iter.next(); + this.add(new EdgeNode(s)); + ins[i] = this.getChildCount() - 1; + i++; + } + model.nodesWereInserted(this, ins); + } + + /** * Return icon * @return Icon *************** *** 825,828 **** --- 943,972 ---- /** + * CameraNode + */ + public class CameraNode extends ContainerNode { + /** */ + private static final long serialVersionUID = 1L; + + /** + * Constructor for EdgeContainer + * @param name The name + * @param vertices The edges + */ + public CameraNode(Camera c) { + super(c); + update(c); + } + + public void update(Object o) { + if (o instanceof Camera) { + super.update(((Camera)o).getClipplanes()); + } else { + log.warn("Were a " + o + " not a Camera"); + } + } + } + + /** * VertexContainer */ *************** *** 852,872 **** return edgegroupicon; } ! } ! ! /** ! * ConstraintNode ! */ ! public class ConstraintNode extends EntityNode { ! /** ! * ! */ ! private static final long serialVersionUID = 1L; ! /** ! * Constructor for ConstraintNode ! * @param constraint The constraint */ ! public ConstraintNode(Constraint constraint) { ! super(constraint); } } --- 996,1016 ---- return edgegroupicon; } ! ! /** ! * Insert the given object into the node ! * @param elem the elements */ ! public void insertChildren(Collection elem) { ! int[] ins = new int[elem.size()]; ! int i = 0; ! Iterator iter = elem.iterator(); ! while (iter.hasNext()) { ! Vertex s = (Vertex)iter.next(); ! this.add(new VertexNode(s)); ! ins[i] = this.getChildCount() - 1; ! i++; ! } ! model.nodesWereInserted(this, ins); } } *************** *** 893,900 **** while (iter.hasNext()) { Attribute current = (Attribute) iter.next(); ! add(new AttributeNode(current)); } } /** * Name --- 1037,1050 ---- while (iter.hasNext()) { Attribute current = (Attribute) iter.next(); ! add(new EntityNode(current)); } } + public void update(Object o) { + if (o instanceof ParameterBlock) { + super.update(((ParameterBlock)o).getAttributes()); + } + } + /** * Name *************** *** 943,974 **** /** - * AttributeNode - */ - public class AttributeNode extends EntityNode { - /** */ - private static final long serialVersionUID = 1L; - - /** Attribute */ - private Attribute attribute; - - /** - * Constructor - * @param object Attribute - */ - public AttributeNode(Attribute object) { - super(object); - attribute = object; - } - - /** - * Name - * @return String - */ - public String toString() { - return attribute.getName(); - } - } - - /** * ConstraintContainer */ --- 1093,1096 ---- *************** *** 989,998 **** while (iter.hasNext()) { Constraint current = (Constraint) iter.next(); ! add(new ConstraintNode(current)); } } } - /** * Selection Listener --- 1111,1119 ---- while (iter.hasNext()) { Constraint current = (Constraint) iter.next(); ! add(new EntityNode(current)); } } } /** * Selection Listener Index: CameraTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/CameraTreeView.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CameraTreeView.java 25 Jul 2006 13:14:55 -0000 1.6 --- CameraTreeView.java 29 Sep 2006 14:57:15 -0000 1.7 *************** *** 9,25 **** import java.util.Collection; import java.util.Iterator; import java.util.Enumeration; ! import java.util.ArrayList; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; - import javax.swing.tree.TreePath; import javax.swing.tree.DefaultMutableTreeNode; import net.sourceforge.bprocessor.model.Camera; import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Entity; ! /** --- 9,25 ---- import java.util.Collection; + import java.util.HashSet; import java.util.Iterator; import java.util.Enumeration; ! import java.util.Set; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; + import javax.swing.tree.TreeSelectionModel; import net.sourceforge.bprocessor.model.Camera; import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Selection; /** *************** *** 29,34 **** /** */ private static final long serialVersionUID = 1L; - /** The selected camera */ - private Camera selected; /** --- 29,32 ---- *************** *** 37,175 **** public CameraTreeView() { super(); this.addTreeSelectionListener(new SelectionListener()); ! selected = null; } - /** ! * Update the TreeView */ ! public void update() { ! selected = findSelectedCamera(); ! Enumeration e = getExpandedDescendants(new TreePath(root)); ! Object[] paths = findPaths(e); ! root.removeAllChildren(); ! Collection cameras = Project.getInstance().getCameras(); ! Collection defaultCams = Project.getInstance().getDefaultCameras(); ! Iterator iter = defaultCams.iterator(); ! while (iter.hasNext()) { ! Camera current = (Camera) iter.next(); ! GenericTreeView.CameraNode cn = new GenericTreeView.CameraNode(current); ! Iterator clipIt = current.getClipplanes().iterator(); ! while (clipIt.hasNext()) { ! cn.add(new EntityNode((Entity)clipIt.next())); } - root.add(cn); } ! iter = cameras.iterator(); ! while (iter.hasNext()) { ! Camera current = (Camera) iter.next(); ! if (!defaultCams.contains(current)) { ! GenericTreeView.CameraNode cn = new GenericTreeView.CameraNode(current); ! Iterator clipIt = current.getClipplanes().iterator(); ! while (clipIt.hasNext()) { ! cn.add(new EntityNode((Entity)clipIt.next())); ! } ! root.add(cn); ! } } - model.nodeStructureChanged(root); - openPaths(paths); - selectCamera(selected); } /** ! * Selects a given camera in the tree ! * @param cam the camera to select */ ! private void selectCamera(Camera cam) { ! Enumeration en = root.children(); ! while (en.hasMoreElements()) { ! Object o = en.nextElement(); ! if (o instanceof GenericTreeView.CameraNode) { ! GenericTreeView.CameraNode cn = (GenericTreeView.CameraNode)o; ! if (cn.getUserObject() == cam) { ! selectionModel.clearSelection(); ! selectionModel.addSelectionPath(new TreePath(new Object[] {root, cn})); ! break; } } ! } ! } ! ! /** ! * Finds the currently selected Camera ! * @return the selected camera if any else null ! */ ! private Camera findSelectedCamera() { ! Camera selected = null; ! if (selectionModel.getSelectionPath() != null) { ! Object o = selectionModel.getSelectionPath().getLastPathComponent(); ! if (o instanceof DefaultMutableTreeNode) { ! DefaultMutableTreeNode node = (DefaultMutableTreeNode)o; ! if (node.getUserObject() instanceof Camera) { ! selected = (Camera)node.getUserObject(); ! } } ! } ! return selected; ! } ! ! /** ! * Find the paths ! * @param e and enumerator of open nodes ! * @return And array of arrays of objects ! */ ! private Object[] findPaths(Enumeration e) { ! if (e != null) { ! ArrayList res = new ArrayList(); ! while (e.hasMoreElements()) { ! Object o = e.nextElement(); ! if (o instanceof TreePath) { ! TreePath tp = (TreePath)o; ! Object[] os = tp.getPath(); ! Object[] temp = new Object[os.length]; ! for (int i = 0; i < os.length; i++) { ! temp[i] = ((DefaultMutableTreeNode)os[i]).getUserObject(); ! } ! res.add(temp); ! } } - return res.toArray(); } - return null; } /** ! * Open the paths of the given objects ! * @param paths The open paths */ ! public void openPaths(Object[] paths) { ! if (paths != null) { ! for (int i = 0; i < paths.length; i++) { ! Object[] route = (Object[])paths[i]; ! if (route.length > 1) { ! openPath(root, 1, route); ! } ! } } } /** ! * Open one path in the tree ! * @param depth The depth reached in this call (< route.length) ! * @param node The node to check in ! * @param route The path to open */ ! private void openPath(DefaultMutableTreeNode node, int depth, Object[] route) { ! Enumeration e = node.children(); ! while (e.hasMoreElements()) { ! DefaultMutableTreeNode current = (DefaultMutableTreeNode)e.nextElement(); ! if (current.getUserObject() == route[depth]) { ! expandPath(new TreePath(current.getPath())); ! if (depth + 1 < route.length) { ! openPath(current, depth + 1, route); ! } ! } ! } } --- 35,116 ---- public CameraTreeView() { super(); + setShowsRootHandles(true); + getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); this.addTreeSelectionListener(new SelectionListener()); ! update(Project.getInstance().getCameras(), root); ! model.nodeStructureChanged(root); } /** ! * Remove the children from container node ! * @param children the children to remove */ ! private void removeChildren(Collection children, DefaultMutableTreeNode where) { ! Object[] rem = new Object[children.size()]; ! int[] indices = new int[children.size()]; ! int i= 0; ! for (int n = 0; n < where.getChildCount(); n++) { ! GenericNode s = (GenericNode)where.getChildAt(n); ! if (children.contains(s)) { ! rem[i] = s; ! indices[i] = n; ! i++; } } ! for(int k=0; k < rem.length; k++) { ! where.remove((GenericNode)rem[k]); ! } ! if (rem.length > 0) { ! model.nodesWereRemoved(where, indices, rem); } } /** ! * Update the container */ ! private void update(Object o, DefaultMutableTreeNode where) { ! if (o instanceof Collection) { ! Set elem = new HashSet((Collection)o); ! Set children = new HashSet(); ! Enumeration e = where.children(); ! while (e.hasMoreElements()) { ! GenericNode sn = (GenericNode)e.nextElement(); ! if (elem.contains(sn.getUserObject())) { ! //If the node is allready there then just update it ! sn.update(sn.getUserObject()); ! elem.remove(sn.getUserObject()); ! } else { ! children.add(sn); } } ! if (elem.size() > 0) { ! insertChildren(elem, where); } ! if (children.size() > 0) { ! removeChildren(children, where); } } } /** ! * Insert the given object into the node ! * @param elem the elements */ ! private void insertChildren(Collection elem, DefaultMutableTreeNode where) { ! int[] ins = new int[elem.size()]; ! int i = 0; ! Iterator iter = elem.iterator(); ! while (iter.hasNext()) { ! where.add(new CameraNode((Camera)iter.next())); ! ins[i] = where.getChildCount() - 1; ! i++; } + model.nodesWereInserted(where, ins); } /** ! * Update the TreeView */ ! public void update() { ! update(Project.getInstance().getCameras(), root); } *************** *** 188,195 **** DefaultMutableTreeNode node = (DefaultMutableTreeNode) object; Object target = node.getUserObject(); ! if (target instanceof Camera && target != selected) { ! selected = (Camera)target; ! Project.getInstance().setCurrentCamera(new Camera(selected, ! "Current Camera")); } } --- 129,135 ---- DefaultMutableTreeNode node = (DefaultMutableTreeNode) object; Object target = node.getUserObject(); ! if (target instanceof Camera) { ! Camera c = new Camera((Camera)target, "Current Camera"); ! Project.getInstance().setCurrentCamera(c); } } Index: SpaceTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpaceTreeView.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** SpaceTreeView.java 11 Sep 2006 09:21:03 -0000 1.13 --- SpaceTreeView.java 29 Sep 2006 14:57:15 -0000 1.14 *************** *** 14,17 **** --- 14,18 ---- import javax.swing.tree.TreePath; + import net.sourceforge.bprocessor.model.Entity; import net.sourceforge.bprocessor.model.Project; *************** *** 37,50 **** */ public void update() { ! Enumeration e = getExpandedDescendants(new TreePath(root)); ! Object[] paths = findPaths(e); ! root.removeAllChildren(); ! root.add(new ProjectContainer("Project", Project.getInstance())); ! root.add(new ConstraintContainer("Constraints", Project.getInstance().getConstraints())); ! root.add(new ParameterBlockNode("Globals", Project.getInstance().getGlobals())); ! root.add(new GeometryContainer("Geometry", Project.getInstance().world())); ! root.add(new ConstructorContainer("Constructors", Project.getInstance().getConstructors())); ! model.nodeStructureChanged(root); ! openPaths(paths); } --- 38,64 ---- */ public void update() { ! if (root.getChildCount() == 5) { ! ((GenericNode)root.getChildAt(0)).update(Project.getInstance().getSpaces()); ! ((GenericNode)root.getChildAt(1)).update(Project.getInstance().getConstraints()); ! ((GenericNode)root.getChildAt(2)).update(Project.getInstance().getGlobals()); ! ((GenericNode)root.getChildAt(3)).update(Project.getInstance().world()); ! ((GenericNode)root.getChildAt(4)).update(Project.getInstance().getConstructors()); ! } else { ! Enumeration e = getExpandedDescendants(new TreePath(root)); ! Object[] paths = findPaths(e); ! root.removeAllChildren(); ! root.add(new ElementContainer("Project", Project.getInstance().getSpaces())); ! root.add(new ConstraintContainer("Constraints", Project.getInstance().getConstraints())); ! root.add(new ParameterBlockNode("Globals", Project.getInstance().getGlobals())); ! root.add(new GeometryContainer("Geometry", Project.getInstance().world())); ! root.add(new ConstructorContainer("Constructors", Project.getInstance().getConstructors())); ! model.nodeStructureChanged(root); ! openPaths(paths); ! } ! } ! ! public DefaultMutableTreeNode handleNode(DefaultMutableTreeNode node, Object which) { ! ! return null; } |