[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool AbstractTool.java,1.20,1.21
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2005-09-30 16:31:09
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31734/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java Log Message: Change from CTRL to ALT as rotation button for 1-button mouse handling Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** AbstractTool.java 30 Sep 2005 12:47:09 -0000 1.20 --- AbstractTool.java 30 Sep 2005 16:30:59 -0000 1.21 *************** *** 58,64 **** protected static final double EPSILON = 0.4; - /** The zoom action listener */ - private static ActionListener zoomAction; - /** The move action listener */ private static ActionListener moveAction; --- 58,61 ---- *************** *** 86,90 **** timer.start(); moveAction = new CameraMoveTimer(this, glv); - zoomAction = new CameraZoomTimer(this, glv); } --- 83,86 ---- *************** *** 200,209 **** pressPos[0] = e.getX(); pressPos[1] = e.getY(); ! int zoommask = InputEvent.ALT_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK; ! int rotamask = InputEvent.CTRL_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK; ! ! if (currentButton == MouseEvent.BUTTON2 || (e.getModifiersEx() & zoommask) == zoommask) { ! timer.addActionListener(zoomAction); ! } else if (currentButton == MouseEvent.BUTTON3 || (e.getModifiersEx() & rotamask) == rotamask) { timer.addActionListener(moveAction); } --- 196,201 ---- pressPos[0] = e.getX(); pressPos[1] = e.getY(); ! int rotamask = InputEvent.ALT_DOWN_MASK; ! if (currentButton == MouseEvent.BUTTON3 || (e.getModifiersEx() & rotamask) == rotamask) { timer.addActionListener(moveAction); } *************** *** 219,235 **** public void mouseReleased(MouseEvent e) { int currentButton = e.getButton(); - int zoommask = InputEvent.ALT_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK; - int rotamask = InputEvent.CTRL_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK; ! if (currentButton == MouseEvent.BUTTON3 || (e.getModifiersEx() & rotamask) == rotamask) { ! timer.removeActionListener(moveAction); ! this.dx = 0; ! this.dy = 0; ! } else if (currentButton == MouseEvent.BUTTON2 || ! (e.getModifiersEx() & zoommask) == zoommask) { ! timer.removeActionListener(zoomAction); ! this.dx = 0; ! this.dy = 0; ! } released(e); glv.repaint(true); --- 211,219 ---- public void mouseReleased(MouseEvent e) { int currentButton = e.getButton(); ! timer.removeActionListener(moveAction); ! this.dx = 0; ! this.dy = 0; ! released(e); glv.repaint(true); |