[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview GenericTreeView.java,1.20,1.21 S
Status: Pre-Alpha
Brought to you by:
henryml
|
From: Michael L. <he...@us...> - 2006-04-05 09:36:01
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8092/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java SpaceTreeView.java TreeView.java Log Message: A large amount of changes because of the CVS outage at sourceforge. Element-modelling now completet Index: TreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/TreeView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TreeView.java 3 Jan 2006 10:53:50 -0000 1.2 --- TreeView.java 5 Apr 2006 09:35:50 -0000 1.3 *************** *** 31,34 **** --- 31,42 ---- this.setFont(font); } + + /** + * Info + * @param info Info + */ + public static void info(Object info) { + log.info(info); + } } Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** GenericTreeView.java 25 Mar 2006 18:09:33 -0000 1.20 --- GenericTreeView.java 5 Apr 2006 09:35:49 -0000 1.21 *************** *** 8,12 **** import java.awt.Component; - import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; --- 8,11 ---- *************** *** 15,23 **** import java.util.Collection; import java.util.Iterator; - import java.util.List; import java.util.Set; import javax.swing.ImageIcon; - import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import javax.swing.JTree; --- 14,20 ---- *************** *** 47,50 **** --- 44,52 ---- public class GenericTreeView extends TreeView implements Observer { + /** + * + */ + private static final long serialVersionUID = 1L; + /** Show numbers of elements in display-string of container-nodes */ private static final boolean SHOW_COUNTERS = false; *************** *** 98,104 **** private boolean isChanged; - /** Current selection */ - private Object selection; - /** * Renderer --- 100,103 ---- *************** *** 106,109 **** --- 105,113 ---- public class Renderer extends DefaultTreeCellRenderer { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor */ *************** *** 226,229 **** --- 230,238 ---- public class GenericNode extends DefaultMutableTreeNode { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor * @param object The value *************** *** 263,266 **** --- 272,280 ---- public class ContainerNode extends GenericNode { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor for ContainerNode * @param object User object *************** *** 303,306 **** --- 317,324 ---- public class EntityNode extends GenericNode { /** + * + */ + private static final long serialVersionUID = 1L; + /** * Constructor for EntityNode * @param object User object *************** *** 329,332 **** --- 347,355 ---- public class SpaceNode extends EntityNode { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor for SpaceNode * @param space Space *************** *** 337,340 **** --- 360,364 ---- add(new SurfaceContainer("Surfaces", surfaces)); add(new ElementContainer("Elements", space)); + add(new GeometryContainer("Geometry", space)); if (space.getModellor() != null) { add(new ModellorNode(space.getModellor())); *************** *** 356,359 **** --- 380,388 ---- public class SurfaceNode extends EntityNode { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor for SurfaceNode * @param surface The surface *************** *** 378,381 **** --- 407,415 ---- public class EdgeNode extends EntityNode { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor for SurfaceNode * @param edge The edge *************** *** 401,404 **** --- 435,443 ---- public class VertexNode extends EntityNode { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor for VertexNode * @param vertex The vertex *************** *** 423,426 **** --- 462,470 ---- public class ModellorNode extends EntityNode { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor * @param modellor The modellor *************** *** 436,439 **** --- 480,488 ---- public class CameraNode extends EntityNode { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor for CameraNode * @param camera The camera *************** *** 449,452 **** --- 498,506 ---- public class SpaceContainer extends ContainerNode { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor for SpaceContainer * @param name Display name *************** *** 477,480 **** --- 531,539 ---- public class SurfaceContainer extends ContainerNode { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor for SurfaceContainer * @param name The name *************** *** 504,512 **** */ public class ElementContainer extends ContainerNode { ! /** Space */ ! private Space space; /** ! * Construftor * @param name The name * @param space The space --- 563,573 ---- */ public class ElementContainer extends ContainerNode { ! /** ! * ! */ ! private static final long serialVersionUID = 1L; /** ! * Constructor * @param name The name * @param space The space *************** *** 514,518 **** public ElementContainer(String name, Space space) { super(name); ! this.space = space; } --- 575,584 ---- public ElementContainer(String name, Space space) { super(name); ! Collection elements = space.getElements(); ! Iterator iter = elements.iterator(); ! while (iter.hasNext()) { ! Space current = (Space) iter.next(); ! add(new SpaceNode(current)); ! } } *************** *** 529,554 **** */ public JPopupMenu menu() { ! JPopupMenu menu = new JPopupMenu(); ! if (Project.getInstance().getActiveSpace() == space) { ! JMenuItem offsetItem = new JMenuItem("Finish Edit"); ! offsetItem.addActionListener(new MenuAction() { ! public void actionPerformed(ActionEvent event) { ! Project.getInstance().setActiveSpace(null); ! } ! } ! ); ! menu.add(offsetItem); ! } else { ! JMenuItem offsetItem = new JMenuItem("Edit"); ! offsetItem.addActionListener(new MenuAction() { ! public void actionPerformed(ActionEvent event) { ! Project.getInstance().setActiveSpace(space); ! } ! } ! ); ! menu.add(offsetItem); ! } ! ! return menu; } } --- 595,622 ---- */ public JPopupMenu menu() { ! return null; ! } ! } ! ! /** ! * Geometry Container ! */ ! public class GeometryContainer extends ContainerNode { ! ! /** ! * ! */ ! private static final long serialVersionUID = 1L; ! ! /** ! * Constructor ! * @param name The name ! * @param space The space ! */ ! public GeometryContainer(String name, Space space) { ! super(name); ! add(new SurfaceContainer("Surfaces", space.getSurfaces())); ! add(new EdgeContainer("Edges", space.getEdges())); ! add(new VertexContainer("Vertices", space.getVertices())); } } *************** *** 558,561 **** --- 626,632 ---- */ public class EdgeContainer extends ContainerNode { + /** */ + private static final long serialVersionUID = 1L; + /** * Constructor for EdgeContainer *************** *** 563,567 **** * @param edges The edges */ ! public EdgeContainer(String name, List edges) { super(name); Iterator iter = edges.iterator(); --- 634,638 ---- * @param edges The edges */ ! public EdgeContainer(String name, Collection edges) { super(name); Iterator iter = edges.iterator(); *************** *** 579,583 **** --- 650,683 ---- return edgegroupicon; } + } + + /** + * VertexContainer + */ + public class VertexContainer extends ContainerNode { + /** */ + private static final long serialVersionUID = 1L; + + /** + * Constructor for EdgeContainer + * @param name The name + * @param vertices The edges + */ + public VertexContainer(String name, Collection vertices) { + super(name); + Iterator iter = vertices.iterator(); + while (iter.hasNext()) { + Vertex current = (Vertex) iter.next(); + add(new VertexNode(current)); + } + } + /** + * Return icon + * @return Icon + */ + public ImageIcon icon() { + return edgegroupicon; + } } *************** *** 587,590 **** --- 687,695 ---- public class ConstraintNode extends EntityNode { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor for ConstraintNode * @param constraint The constraint *************** *** 600,603 **** --- 705,713 ---- public class ConstraintContainer extends ContainerNode { /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor for ConstraintContainer * @param name The name *************** *** 643,647 **** TreePath path = getPathForLocation(e.getX(), e.getY()); if (path != null) { ! if (e.isControlDown()) { Object object = path.getLastPathComponent(); if (object instanceof GenericNode) { --- 753,757 ---- TreePath path = getPathForLocation(e.getX(), e.getY()); if (path != null) { ! if (e.isPopupTrigger()) { Object object = path.getLastPathComponent(); if (object instanceof GenericNode) { Index: SpaceTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpaceTreeView.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SpaceTreeView.java 30 Jan 2006 15:08:35 -0000 1.5 --- SpaceTreeView.java 5 Apr 2006 09:35:50 -0000 1.6 *************** *** 18,21 **** --- 18,26 ---- /** + * + */ + private static final long serialVersionUID = 1L; + + /** * Constructor for SpaceTreeView */ *************** *** 35,38 **** --- 40,44 ---- root.add(new SpaceContainer("Construction", construction)); root.add(new ConstraintContainer("Constraints", constraints)); + root.add(new GeometryContainer("Geometry", Project.getInstance().world())); model.nodeStructureChanged(root); } |