Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23378/src/net/sourceforge/bprocessor/gui/treeview
Modified Files:
GenericTreeView.java SpaceTreeView.java
Log Message:
Added constructors to the tree view
Index: GenericTreeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** GenericTreeView.java 30 May 2006 09:29:02 -0000 1.30
--- GenericTreeView.java 21 Jul 2006 14:58:58 -0000 1.31
***************
*** 41,44 ****
--- 41,45 ----
import net.sourceforge.bprocessor.model.Camera;
import net.sourceforge.bprocessor.model.Constraint;
+ import net.sourceforge.bprocessor.model.Constructor;
import net.sourceforge.bprocessor.model.Edge;
import net.sourceforge.bprocessor.model.Entity;
***************
*** 94,97 ****
--- 95,104 ----
protected static ImageIcon genericgroupicon;
+ /** Constructor icon */
+ protected static ImageIcon constructoricon;
+
+ /** Constructor group icon */
+ protected static ImageIcon constructorgroupicon;
+
static {
spaceicon = loadIcon("Biconspace.gif");
***************
*** 104,107 ****
--- 111,116 ----
vertexgroupicon = loadIcon("Biconvertexgroup.gif");
genericgroupicon = loadIcon("Bicongenericgroup.gif");
+ constructoricon = loadIcon("Biconconstructor.gif");
+ constructorgroupicon = loadIcon("Biconconstructorgroup.gif");
}
***************
*** 512,515 ****
--- 521,550 ----
/**
+ * ConstructorNode
+ */
+ public class ConstructorNode extends EntityNode {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructor for ConstructorNode
+ * @param c The constructor
+ */
+ public ConstructorNode(Constructor c) {
+ super(c);
+ }
+
+ /**
+ * Return icon
+ * @return Icon
+ */
+ public ImageIcon icon() {
+ return constructoricon;
+ }
+ }
+
+ /**
* EdgeNode
*/
***************
*** 588,594 ****
*/
public class CameraNode extends EntityNode {
! /**
! *
! */
private static final long serialVersionUID = 1L;
--- 623,627 ----
*/
public class CameraNode extends EntityNode {
! /** */
private static final long serialVersionUID = 1L;
***************
*** 758,761 ****
--- 791,826 ----
/**
+ * Constructor Container
+ */
+ public class ConstructorContainer extends ContainerNode {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructor
+ * @param name The name
+ * @param constructors The constructors
+ */
+ public ConstructorContainer(String name, Collection constructors) {
+ super(name);
+ Iterator iter = constructors.iterator();
+ while (iter.hasNext()) {
+ add(new ConstructorNode((Constructor)iter.next()));
+ }
+ }
+
+ /**
+ * Return icon
+ * @return icon
+ */
+ public ImageIcon icon() {
+ return constructorgroupicon;
+ }
+ }
+
+ /**
* EdgeContainer
*/
Index: SpaceTreeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpaceTreeView.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** SpaceTreeView.java 24 May 2006 13:43:42 -0000 1.11
--- SpaceTreeView.java 21 Jul 2006 14:58:58 -0000 1.12
***************
*** 45,48 ****
--- 45,49 ----
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);
|