Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25655/src/net/sourceforge/bprocessor/gui
Modified Files:
PopupMenu.java
Log Message:
Added a Frame modellor (not yet implemented)
Index: PopupMenu.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** PopupMenu.java 4 Jun 2007 20:38:25 -0000 1.35
--- PopupMenu.java 19 Jun 2007 14:03:32 -0000 1.36
***************
*** 203,206 ****
--- 203,218 ----
}
+
+ private abstract static class ModellorAction extends AbstractAction {
+ protected Modellor modellor;
+ protected Space space;
+
+ public ModellorAction(Modellor modellor, Space space) {
+ super(modellor.getGeneralName());
+ this.modellor = modellor;
+ this.space = space;
+ }
+ }
+
/**
* A popup generator for a collection of space
***************
*** 301,304 ****
--- 313,329 ----
pm.add(modCheck);
pm.add(getTransformMenu(sp));
+
+ for (Modellor current : Modellor.getRegisteredModellors()) {
+ if (current.application() == Modellor.DETAIL) {
+ AbstractAction action = new ModellorAction(current, sp) {
+ public void actionPerformed(ActionEvent e) {
+ System.out.println("detail " + modellor);
+ modellor.newInstance(space);
+ }
+ };
+ pm.add(action);
+ }
+ }
+
JMenu mm = new JMenu("Modellors");
Collection c = Modellor.getRegisteredModellors();
|