[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview GenericTreeView.java, 1.121, 1.
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2007-11-19 09:14:22
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23479/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: Renamed LibraryObj to Component Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** GenericTreeView.java 12 Nov 2007 19:21:01 -0000 1.121 --- GenericTreeView.java 19 Nov 2007 09:14:22 -0000 1.122 *************** *** 7,11 **** package net.sourceforge.bprocessor.gui.treeview; - import java.awt.Component; import java.awt.Dimension; import java.awt.Event; --- 7,10 ---- *************** *** 49,53 **** import net.sourceforge.bprocessor.model.Entity; import net.sourceforge.bprocessor.model.Geometric; ! import net.sourceforge.bprocessor.model.LibraryObj; import net.sourceforge.bprocessor.model.Material; import net.sourceforge.bprocessor.model.Observer; --- 48,52 ---- import net.sourceforge.bprocessor.model.Entity; import net.sourceforge.bprocessor.model.Geometric; ! import net.sourceforge.bprocessor.model.Component; import net.sourceforge.bprocessor.model.Material; import net.sourceforge.bprocessor.model.Observer; *************** *** 212,216 **** * @return Component */ ! public Component getTreeCellRendererComponent( JTree tree, Object value, --- 211,215 ---- * @return Component */ ! public java.awt.Component getTreeCellRendererComponent( JTree tree, Object value, *************** *** 1159,1163 **** /** ! * CameraNode */ public class CatalogContainer extends GenericNode { --- 1158,1162 ---- /** ! * Catalog Container */ public class CatalogContainer extends GenericNode { *************** *** 1167,1173 **** * @param content the children for the node */ ! public CatalogContainer(String name, Collection<LibraryObj> content) { super(name); ! for (LibraryObj l : content) { this.add(new CatalogNode(l)); } --- 1166,1172 ---- * @param content the children for the node */ ! public CatalogContainer(String name, Collection<Component> content) { super(name); ! for (Component l : content) { this.add(new CatalogNode(l)); } *************** *** 1181,1185 **** if (o instanceof Collection) { this.removeAllChildren(); ! for (LibraryObj l : (Collection<LibraryObj>)o) { this.add(new CatalogNode(l)); } --- 1180,1184 ---- if (o instanceof Collection) { this.removeAllChildren(); ! for (Component l : (Collection<Component>)o) { this.add(new CatalogNode(l)); } *************** *** 1191,1195 **** /** * A container for catalog items - * @author rimestad */ public class CatalogNode extends GenericNode { --- 1190,1193 ---- *************** *** 1198,1204 **** * @param l The lib obj */ ! public CatalogNode(LibraryObj l) { super(l); - Space s = l.getSpace(); } --- 1196,1201 ---- * @param l The lib obj */ ! public CatalogNode(Component l) { super(l); } *************** *** 1206,1210 **** @Override public String toString() { ! return ((LibraryObj)getUserObject()).getName(); } --- 1203,1207 ---- @Override public String toString() { ! return ((Component)getUserObject()).getName(); } *************** *** 1212,1217 **** @Override public void update(Object o) { ! if (o instanceof LibraryObj) { ! LibraryObj lo = (LibraryObj)o; if (lo != userObject) { userObject = lo; --- 1209,1214 ---- @Override public void update(Object o) { ! if (o instanceof Component) { ! Component lo = (Component)o; if (lo != userObject) { userObject = lo; *************** *** 1225,1236 **** public JPopupMenu menu() { JPopupMenu menu = new JPopupMenu(); ! Collection<LibraryObj> spaces = new LinkedList<LibraryObj>(); ! spaces.add((LibraryObj)getUserObject()); ! menu.add(new CollectionMenuAction(spaces, "Instanciate") { public void actionPerformed(ActionEvent e) { Project proj = Project.getInstance(); Space world = proj.getActiveSpace(); for (Object o : col) { ! LibraryObj lo = (LibraryObj)o; Space space = lo.getSpace(); Space instance = new Space(space.getName() + " instance ", space.getType(), false); --- 1222,1233 ---- public JPopupMenu menu() { JPopupMenu menu = new JPopupMenu(); ! Collection<Component> spaces = new LinkedList<Component>(); ! spaces.add((Component)getUserObject()); ! menu.add(new CollectionMenuAction(spaces, "Make Instance") { public void actionPerformed(ActionEvent e) { Project proj = Project.getInstance(); Space world = proj.getActiveSpace(); for (Object o : col) { ! Component lo = (Component)o; Space space = lo.getSpace(); Space instance = new Space(space.getName() + " instance ", space.getType(), false); |