[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool ToolFactory.java,1.39,1.40
Status: Pre-Alpha
Brought to you by:
henryml
From: Nordholt <nor...@us...> - 2006-03-27 14:41:11
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17627 Modified Files: ToolFactory.java Log Message: add new movestrategies Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** ToolFactory.java 22 Mar 2006 11:42:44 -0000 1.39 --- ToolFactory.java 27 Mar 2006 14:41:03 -0000 1.40 *************** *** 61,64 **** --- 61,70 ---- private MoveTool move; + /** The vector movetool strategy */ + private MoveTool vectorStrategy; + + /** The normal movetool strategy */ + private MoveTool controlledStrategy; + /** rotation tool */ private RotationTool rotation; *************** *** 170,174 **** --- 176,183 ---- arc = new ArcTool(glv, pencilcursor); rect = new RectTool(glv, pencilcursor); + controlledStrategy = new ControlledMoveStrategy(glv, pencilcursor); + vectorStrategy = new VectorMoveStrategy(glv, pencilcursor); move = new MoveTool(glv, pencilcursor); + move.setStrategy(vectorStrategy); rotation = new RotationTool(glv, pencilcursor); extrusion = new MultiExtrudeTool(glv, pencilcursor); *************** *** 351,357 **** } } /** ! listener for the move popup. */ class MovePopupActionListener implements ActionListener { --- 360,367 ---- } } + /** ! * listener for the move popup. */ class MovePopupActionListener implements ActionListener { *************** *** 362,375 **** public void actionPerformed(ActionEvent actionEvent) { if (actionEvent.getActionCommand().equals("Vector")) { ! move.setMoveMode(MoveTool.THREE_CLICK); ! } else if (actionEvent.getActionCommand().equals("Axis restricted")) { ! move.setMoveMode(MoveTool.AXIS_RESTRICTED); ! } else if (actionEvent.getActionCommand().equals("Free plane")) { ! move.setMoveMode(MoveTool.FREE_SNAP); } else if (actionEvent.getActionCommand().equals("Controlled")) { ! move.setMoveMode(MoveTool.CONTROLLED); } } } ! } } --- 372,383 ---- public void actionPerformed(ActionEvent actionEvent) { if (actionEvent.getActionCommand().equals("Vector")) { ! log.info("vector bruges nu"); ! move.setStrategy(vectorStrategy); } else if (actionEvent.getActionCommand().equals("Controlled")) { ! log.info("controlled bruges nu"); ! move.setStrategy(controlledStrategy); } } } ! } } |