Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20095/src/net/sourceforge/bprocessor/gl/tool
Modified Files:
VectorMoveStrategy.java MoveTool.java
ControlledMoveStrategy.java
Log Message:
Work-in-progress on MoveTool
Index: MoveTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/MoveTool.java,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** MoveTool.java 3 Jul 2006 14:25:02 -0000 1.59
--- MoveTool.java 21 Jul 2006 10:42:06 -0000 1.60
***************
*** 14,18 ****
import net.sourceforge.bprocessor.model.Project;
import net.sourceforge.bprocessor.model.Vertex;
- import net.sourceforge.bprocessor.model.Surface;
import java.awt.Cursor;
--- 14,17 ----
***************
*** 180,194 ****
*/
protected void move(Set sel, Vertex delta) {
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object elm = it.next();
- if (elm instanceof Vertex) {
- ((Vertex)elm).move(delta.getX(), delta.getY(), delta.getZ());
- } else if (elm instanceof Edge) {
- ((Edge)elm).move(delta.getX(), delta.getY(), delta.getZ());
- } else if (elm instanceof Surface) {
- ((Surface) elm).move(delta.getX(), delta.getY(), delta.getZ());
- }
- }
}
--- 179,182 ----
***************
*** 277,280 ****
--- 265,274 ----
} else {
super.cleanUp();
+ from = null;
+ vertices = null;
+ lastMoveDirection = null;
+ moveEntities = null;
+ moveConstructor = null;
+ dragFlag = false;
}
}
Index: VectorMoveStrategy.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/VectorMoveStrategy.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** VectorMoveStrategy.java 14 Jun 2006 14:36:56 -0000 1.4
--- VectorMoveStrategy.java 21 Jul 2006 10:42:06 -0000 1.5
***************
*** 8,18 ****
import net.sourceforge.bprocessor.gl.GLView;
- //import net.sourceforge.bprocessor.model.Plane;
-
- //import java.util.HashSet;
-
- import java.awt.event.MouseEvent;
import java.awt.Cursor;
--- 8,18 ----
import net.sourceforge.bprocessor.gl.GLView;
+ import net.sourceforge.bprocessor.model.Edge;
+ import net.sourceforge.bprocessor.model.Surface;
+ import net.sourceforge.bprocessor.model.Vertex;
import java.awt.Cursor;
+ import java.util.Iterator;
+ import java.util.Set;
***************
*** 37,53 ****
/**
! * Invoked when a mouse button has been pressed on a component.
! * @param e The MouseEvent object
! */
! protected void pressed(MouseEvent e) {
! super.pressed(e);
! }
!
! /**
! * Invoked when the mouse cursor has been moved
! * @param e The MouseEvent object
*/
! protected void moved(MouseEvent e) {
! super.moved(e);
}
}
--- 37,57 ----
/**
! * Move the entire selection
! * @param sel The selection collection
! * @param delta The movement
*/
! protected void move(Set sel, Vertex delta) {
! Iterator it = sel.iterator();
! while (it.hasNext()) {
! Object elm = it.next();
! if (elm instanceof Vertex) {
! ((Vertex)elm).move(delta.getX(), delta.getY(), delta.getZ());
! } else if (elm instanceof Edge) {
! ((Edge)elm).move(delta.getX(), delta.getY(), delta.getZ());
! } else if (elm instanceof Surface) {
! ((Surface) elm).move(delta.getX(), delta.getY(), delta.getZ());
! }
! }
}
+
}
Index: ControlledMoveStrategy.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ControlledMoveStrategy.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ControlledMoveStrategy.java 14 Jun 2006 14:36:56 -0000 1.5
--- ControlledMoveStrategy.java 21 Jul 2006 10:42:06 -0000 1.6
***************
*** 92,104 ****
}
}
!
! /**
! * Invoked when the mouse is held pressed and moved
! * @param e The MouseEvent object
! */
! protected void dragged(MouseEvent e) {
! moved(e);
! }
!
/**
* Finds the direction of the controlled movement.
--- 92,96 ----
}
}
!
/**
* Finds the direction of the controlled movement.
|