[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool ExtrudeTool.java,1.11,1.12 ClipplaneTo
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-02-22 09:02:51
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23938/src/net/sourceforge/bprocessor/gl/tool Modified Files: ExtrudeTool.java ClipplaneTool.java EraserTool.java Log Message: Changed selection behaviour in ExtrudeTool Index: ExtrudeTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrudeTool.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ExtrudeTool.java 17 Feb 2006 09:56:06 -0000 1.11 --- ExtrudeTool.java 22 Feb 2006 09:02:45 -0000 1.12 *************** *** 93,100 **** if (e.isShiftDown()) { super.pressed(e); ! } else if (selection != null && !selection.isEmpty()) { ! if (target instanceof Surface) { sides = new HashSet(); ! extrudeSurface = (Surface) target; View view = glv.getView(); Transformation trans = view.transformation(); --- 93,101 ---- if (e.isShiftDown()) { super.pressed(e); ! } else if (!selection.isEmpty()) { ! Object object = selection.iterator().next(); ! if (object instanceof Surface) { sides = new HashSet(); ! extrudeSurface = (Surface) object; View view = glv.getView(); Transformation trans = view.transformation(); *************** *** 211,214 **** --- 212,224 ---- + /** + * @param e Event + */ + protected void moved(MouseEvent e) { + if (e.isShiftDown()) { + super.moved(e); + } + } + /** * Invoked when the mouse is held pressed and moved *************** *** 216,219 **** --- 226,233 ---- */ protected void dragged(MouseEvent e) { + if (e.isShiftDown()) { + super.dragged(e); + return; + } if (extrudeSurface != null) { Vertex normal; *************** *** 252,256 **** */ protected void released(MouseEvent e) { ! super.released(e); if (Math.abs(t) < 0.0000001) { if (top != null) { --- 266,272 ---- */ protected void released(MouseEvent e) { ! if (e.isShiftDown()) { ! super.released(e); ! } if (Math.abs(t) < 0.0000001) { if (top != null) { Index: EraserTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/EraserTool.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EraserTool.java 3 Feb 2006 14:53:19 -0000 1.1 --- EraserTool.java 22 Feb 2006 09:02:45 -0000 1.2 *************** *** 19,23 **** * EraserTool */ ! public class EraserTool extends SelectTool { /** --- 19,23 ---- * EraserTool */ ! public class EraserTool extends AbstractTool { /** *************** *** 61,64 **** --- 61,70 ---- */ protected void dragged(MouseEvent e) { } + + /** + * @param e Event + */ + protected void released(MouseEvent e) { + } Index: ClipplaneTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ClipplaneTool.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ClipplaneTool.java 7 Nov 2005 07:21:21 -0000 1.5 --- ClipplaneTool.java 22 Feb 2006 09:02:45 -0000 1.6 *************** *** 21,25 **** * The Clipplane tool */ ! public class ClipplaneTool extends SelectTool { /** The logger */ --- 21,25 ---- * The Clipplane tool */ ! public class ClipplaneTool extends AbstractTool { /** The logger */ *************** *** 40,44 **** */ protected void pressed(MouseEvent e) { ! super.pressed(e); if (e.getButton() == MouseEvent.BUTTON1) { if (target instanceof Surface) { --- 40,44 ---- */ protected void pressed(MouseEvent e) { ! findTarget(e); if (e.getButton() == MouseEvent.BUTTON1) { if (target instanceof Surface) { *************** *** 63,65 **** --- 63,91 ---- } } + + /** + * @param e Event + */ + protected void moved(MouseEvent e) { + findTarget(e); + if (target instanceof Surface) { + glv.getView().makeTarget(target); + } else { + glv.getView().makeTarget(null); + } + } + + /** + * @param e Event + */ + protected void dragged(MouseEvent e) { + + } + + /** + * @param e Event + */ + protected void released(MouseEvent e) { + + } } |