Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2725/src/net/sourceforge/bprocessor/gl/tool
Modified Files:
Tool.java ToolFactory.java
Added Files:
AltMoveTool.java
Log Message:
Experimenting
Index: ToolFactory.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** ToolFactory.java 23 Feb 2007 11:09:18 -0000 1.77
--- ToolFactory.java 28 Feb 2007 15:25:52 -0000 1.78
***************
*** 113,116 ****
--- 113,125 ----
private RotationTool rotation;
+ /** The tool for binding constructors and geometry together */
+ private RelationTool relation;
+
+ /** The tool for focusing on objects */
+ private FocusTool focusTool;
+
+ /** The too for moving alternatively */
+ private AltMoveTool altMoveTool;
+
/** The selection button */
private JToggleButton selBut;
***************
*** 151,160 ****
/** The alternative rect tool button */
private JToggleButton altRectBut;
-
- /** The tool for binding constructors and geometry together */
- private RelationTool relation;
-
- /** The tool for focusing on objects */
- private FocusTool focusTool;
/**
--- 160,163 ----
***************
*** 210,213 ****
--- 213,217 ----
altRect = new RectTool(glv, pencilcursor);
focusTool = new FocusTool(glv, null);
+ altMoveTool = new AltMoveTool(glv, pencilcursor);
Toolbar tb = Toolbar.getInstance();
***************
*** 232,235 ****
--- 236,240 ----
moveBut.setMnemonic(KeyEvent.VK_M);
registerTool(Tool.CONTROLLED_MOVE_TOOL, controlled, "Biconmovetool.gif", "Controlled Move");
+ registerTool(Tool.ALT_MOVE_TOOL, altMoveTool, "Biconmovetool.gif", "Alternative Moving");
rotationBut = this.registerTool(Tool.ROTATION_TOOL, rotation, "Biconrotaxe.gif", "Rotate");
tb.addSeparator(3);
--- NEW FILE: AltMoveTool.java ---
//---------------------------------------------------------------------------------
// $Id: AltMoveTool.java,v 1.1 2007/02/28 15:25:52 henryml Exp $
//
// Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net)
// Released under the Lesser GNU Public License v2.1
//---------------------------------------------------------------------------------
package net.sourceforge.bprocessor.gl.tool;
import java.awt.Cursor;
import java.awt.event.MouseEvent;
import net.sourceforge.bprocessor.gl.GLView;
/**
* Alternative Move Tool
*/
public class AltMoveTool extends AbstractPencil {
/**
* @param glv GLView
* @param cursor Cursor
*/
public AltMoveTool(GLView glv, Cursor cursor) {
super(glv, cursor);
}
/** {@inheritDoc} */
@Override
protected void moved(MouseEvent e) {
}
/** {@inheritDoc} */
@Override
protected void pressed(MouseEvent e) {
System.out.println("Alternative Moving!");
}
}
Index: Tool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/Tool.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** Tool.java 22 Feb 2007 12:36:57 -0000 1.29
--- Tool.java 28 Feb 2007 15:25:52 -0000 1.30
***************
*** 64,67 ****
--- 64,69 ----
/** the tool for focusing on objects */
public static final int FOCUS_TOOL = 21;
+ /** the tool for alternative moving of objects */
+ public static final int ALT_MOVE_TOOL = 22;
/**
|