Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11890/src/net/sourceforge/bprocessor/gui
Modified Files:
PopupMenu.java
Log Message:
Translate and Rotate commands
Index: PopupMenu.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** PopupMenu.java 22 Oct 2007 19:26:36 -0000 1.55
--- PopupMenu.java 24 Oct 2007 06:48:28 -0000 1.56
***************
*** 534,537 ****
--- 534,566 ----
menu.add(action);
}
+ {
+ AbstractAction action = new GeometricMenuAction(arguments, "Translate...") {
+ public void actionPerformed(ActionEvent event) {
+ Set<Vertex> vertices = Geometry.collect(entities);
+ Vertex center = Vertex.center(vertices);
+ CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem();
+ system = system.copy();
+ system.setOrigin(center);
+ Command command = new Command.Translate(vertices, system);
+ AttributeView.instance().display(command);
+ }
+ };
+ menu.add(action);
+ }
+ {
+ AbstractAction action = new GeometricMenuAction(arguments, "Rotate...") {
+ public void actionPerformed(ActionEvent event) {
+ Set<Vertex> vertices = Geometry.collect(entities);
+ Vertex center = Vertex.center(vertices);
+ CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem();
+ system = system.copy();
+ system.setOrigin(center);
+ Command command = new Command.Rotate(vertices, system);
+ AttributeView.instance().display(command);
+ }
+ };
+ menu.add(action);
+ }
+
return menu;
}
|