Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24554/src/net/sourceforge/bprocessor/gui
Modified Files:
PopupMenu.java
Log Message:
Reorganised Space Menu
Draw coordinatesystem and grid in the transformed system
Index: PopupMenu.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PopupMenu.java 29 Sep 2006 07:13:12 -0000 1.4
--- PopupMenu.java 2 Oct 2006 06:10:15 -0000 1.5
***************
*** 24,28 ****
import net.sourceforge.bprocessor.model.Attribute;
import net.sourceforge.bprocessor.model.Entity;
- import net.sourceforge.bprocessor.model.AxisRotate;
import net.sourceforge.bprocessor.model.Geometry;
import net.sourceforge.bprocessor.model.Project;
--- 24,27 ----
***************
*** 41,44 ****
--- 40,95 ----
/**
+ * @param s Space
+ * @return Transform Menu
+ */
+ public static JMenu getTransformMenu(Space s) {
+ JMenu pm = new JMenu("Transform");
+ AbstractAction translate = new SpaceMenuAction(s, "Translate") {
+ public void actionPerformed(ActionEvent arg0) {
+ space.addTransform(new Translate());
+ space.changed();
+ }
+ };
+ pm.add(translate);
+ AbstractAction rotate = new SpaceMenuAction(s, "Rotate") {
+ public void actionPerformed(ActionEvent arg0) {
+ space.addTransform(new Rotate());
+ space.changed();
+ }
+ };
+ pm.add(rotate);
+ AbstractAction scale = new SpaceMenuAction(s, "Scale") {
+ public void actionPerformed(ActionEvent arg0) {
+ space.addTransform(new Scale());
+ space.changed();
+ }
+ };
+ pm.add(scale);
+ AbstractAction translatelocal = new SpaceMenuAction(s, "Translate Local") {
+ public void actionPerformed(ActionEvent arg0) {
+ space.pushTransform(new Translate());
+ space.changed();
+ }
+ };
+ pm.add(translatelocal);
+ AbstractAction rotatelocal = new SpaceMenuAction(s, "Rotate Local") {
+ public void actionPerformed(ActionEvent arg0) {
+ space.pushTransform(new Rotate());
+ space.changed();
+ }
+ };
+ pm.add(rotatelocal);
+ AbstractAction scalelocal = new SpaceMenuAction(s, "Scale Local") {
+ public void actionPerformed(ActionEvent arg0) {
+ space.pushTransform(new Scale());
+ space.changed();
+ }
+ };
+ pm.add(scalelocal);
+
+ return pm;
+ }
+
+ /**
* A popup generator for a space
* @param s the space
***************
*** 113,152 ****
};
pm.add(check);
! AbstractAction translate = new SpaceMenuAction(s, "Translate") {
! public void actionPerformed(ActionEvent arg0) {
! space.addTransform(new Translate());
! space.changed();
! }
! };
! pm.add(translate);
! AbstractAction rotate = new SpaceMenuAction(s, "Rotate") {
! public void actionPerformed(ActionEvent arg0) {
! space.addTransform(new Rotate());
! space.changed();
! }
! };
! pm.add(rotate);
! AbstractAction scale = new SpaceMenuAction(s, "Scale") {
! public void actionPerformed(ActionEvent arg0) {
! space.addTransform(new Scale());
! space.changed();
! }
! };
! pm.add(scale);
! AbstractAction axisrotate = new SpaceMenuAction(s, "Axis Rotate") {
! public void actionPerformed(ActionEvent arg0) {
! space.addTransform(new AxisRotate());
! space.changed();
! }
! };
! pm.add(axisrotate);
! AbstractAction axisrotatelocal = new SpaceMenuAction(s, "Local Axis Rotate") {
! public void actionPerformed(ActionEvent arg0) {
! space.pushTransform(new AxisRotate());
! space.changed();
! }
! };
! pm.add(axisrotatelocal);
! // Adding all modellors
JMenu mm = new JMenu("Modellors");
Collection c = Modellor.getRegisteredModellors();
--- 164,168 ----
};
pm.add(check);
! pm.add(getTransformMenu(s));
JMenu mm = new JMenu("Modellors");
Collection c = Modellor.getRegisteredModellors();
|