[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool FocusTool.java, 1.2, 1.3 FinalMoveToo
Status: Pre-Alpha
Brought to you by:
henryml
From: Nordholt <nor...@us...> - 2007-06-20 13:18:02
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1195/src/net/sourceforge/bprocessor/gl/tool Modified Files: FocusTool.java FinalMoveTool.java ArcTool.java EraserTool.java OffsetTool.java CameraTool.java CameraWalkTool.java TapeMeasure.java CameraFlyTool.java ExtrusionTool.java ClipplaneTool.java ConstructorTool.java RotationTool.java Log Message: Added simple tips for most tools. Only did a tip for the "final" movetool, other move tools have no tip. Index: OffsetTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/OffsetTool.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** OffsetTool.java 18 May 2007 09:13:17 -0000 1.14 --- OffsetTool.java 20 Jun 2007 13:17:55 -0000 1.15 *************** *** 178,181 **** --- 178,182 ---- lastOffsetPoint = current.vertex().copy(); } + setTip(secondClickTip()); } } else { *************** *** 261,263 **** --- 262,283 ---- } } + + /** + * Tip on how to set the first click + * @return short describtion of what to do + */ + public String initialTip() { + return "Pick a surface to offset or use select tool to choose" + + " specific edges of a surface to offset"; + } + + /** + * Tip on how to set the second click + * @return short describtion of what to do + */ + private String secondClickTip() { + return "Place the offset." + + " Use \"length\" to type a specific distance to offset." + + " Press Escape to cancel offset"; + } } Index: ClipplaneTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ClipplaneTool.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ClipplaneTool.java 7 May 2007 13:30:20 -0000 1.11 --- ClipplaneTool.java 20 Jun 2007 13:17:56 -0000 1.12 *************** *** 114,116 **** --- 114,124 ---- cp = null; } + + /** + * Tip on how to set the first click + * @return short describtion of what to do + */ + public String initialTip() { + return "Pick a surface to put a clipplane on and drag it in place."; + } } Index: CameraTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CameraTool.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CameraTool.java 1 Jun 2007 11:52:34 -0000 1.12 --- CameraTool.java 20 Jun 2007 13:17:55 -0000 1.13 *************** *** 76,78 **** --- 76,86 ---- orbit.released(e); } + + /** + * Tip on how to set the first click + * @return short describtion of what to do + */ + public String initialTip() { + return "Drag to rotate camera around the current viewpoint."; + } } Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** ExtrusionTool.java 15 May 2007 11:36:27 -0000 1.58 --- ExtrusionTool.java 20 Jun 2007 13:17:56 -0000 1.59 *************** *** 355,359 **** extrudesurface = null; extrudeEdges = null; ! GUI.getInstance().alert("Different geometrics in a selection ain't extrudeable"); } } --- 355,359 ---- extrudesurface = null; extrudeEdges = null; ! GUI.getInstance().alert("Different geometrics in a selection are not extrudeable"); } } *************** *** 364,368 **** extrudesurface = (Surface) target; } else { ! GUI.getInstance().alert(target + " ain't extrudeable only Surfaces are"); } } --- 364,368 ---- extrudesurface = (Surface) target; } else { ! GUI.getInstance().alert(target + " is not extrudeable only Surfaces are"); } } *************** *** 384,387 **** --- 384,388 ---- start = findIntersection(e); from = start.vertex(); + setTip(secondClickTip()); } else if (extrudesurface != null) { startx = e.getX(); *************** *** 401,404 **** --- 402,406 ---- all = !e.isAltDown(); active = true; + setTip(secondClickTip()); } } else { *************** *** 503,505 **** --- 505,526 ---- super.cleanUp(); } + + /** + * Tip on how to set the first click + * @return short describtion of what to do + */ + public String initialTip() { + return "Pick a surface to extrude or use select tool to select edges to extrude." + + " Double-click a surface to extrude same distance as previous extrusion."; + } + + /** + * Tip on how to set the second click + * @return short describtion of what to do + */ + private String secondClickTip() { + return "Place the extrusion." + + " Use \"length\" to type a specific distance to extrude." + + " Press Escape to cancel extrusion."; + } } Index: TapeMeasure.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/TapeMeasure.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TapeMeasure.java 29 Jan 2007 15:47:15 -0000 1.3 --- TapeMeasure.java 20 Jun 2007 13:17:55 -0000 1.4 *************** *** 118,121 **** --- 118,124 ---- if (current.object() instanceof Edge) { originalEdge = (Edge) current.object(); + setTip(secondClickParaTip()); + } else { + setTip(secondClickTip()); } } else { *************** *** 175,177 **** --- 178,208 ---- super.cleanUp(); } + + /** + * Tip on how to set the first click + * @return short describtion of what to do + */ + public String initialTip() { + return "Pick a point for a new construction line" + + " or pick an edge to make a parrallel constructor"; + } + + /** + * Tip on how to set the second click + * @return short describtion of what to do + */ + private String secondClickTip() { + return "Set a direction for a constructor line. " + + " Press Escape to cancel drawing the constructor."; + } + + /** + * Tip on how to set the second click + * @return short describtion of what to do + */ + private String secondClickParaTip() { + return "Place a parrallel constructor line." + + "Use \"length\" to type a specific distance to the parrallel edge." + + " Press Escape to cancel drawing the constructor."; + } } Index: ArcTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ArcTool.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ArcTool.java 19 Jun 2007 16:11:06 -0000 1.16 --- ArcTool.java 20 Jun 2007 13:17:55 -0000 1.17 *************** *** 254,258 **** private String secondClickTip() { return "Set the second endpoint of the arc." + ! " Use \"length\" to type a specific distance to endpoint" + " Press Escape to cancel drawing"; } --- 254,258 ---- private String secondClickTip() { return "Set the second endpoint of the arc." + ! " Use \"length\" to type a specific distance to endpoint." + " Press Escape to cancel drawing"; } *************** *** 267,270 **** " Press Escape to cancel drawing"; } - } --- 267,269 ---- Index: CameraWalkTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CameraWalkTool.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CameraWalkTool.java 1 Jun 2007 11:52:34 -0000 1.7 --- CameraWalkTool.java 20 Jun 2007 13:17:55 -0000 1.8 *************** *** 100,102 **** --- 100,111 ---- Project.getInstance().changed(c); } + + /** + * Tip on how to set the first click + * @return short describtion of what to do + */ + public String initialTip() { + return "Drag to rotate viewpoint around camera." + + " Use arrow keys to move camera in a plane."; + } } Index: CameraFlyTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CameraFlyTool.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** CameraFlyTool.java 1 Jun 2007 11:52:33 -0000 1.9 --- CameraFlyTool.java 20 Jun 2007 13:17:56 -0000 1.10 *************** *** 101,103 **** --- 101,112 ---- Project.getInstance().changed(c); } + + /** + * Tip on how to set the first click + * @return short describtion of what to do + */ + public String initialTip() { + return "Drag to rotate viewpoint around camera." + + " Use arrow keys to move camera."; + } } Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** FinalMoveTool.java 6 Jun 2007 20:14:08 -0000 1.15 --- FinalMoveTool.java 20 Jun 2007 13:17:55 -0000 1.16 *************** *** 168,171 **** --- 168,172 ---- last = from; updateFeedback(); + setTip(secondClickTip()); } else { Geometric geometric = affected.iterator().next(); *************** *** 236,238 **** --- 237,258 ---- copy = false; } + + /** + * Tip on how to set the first click + * @return short describtion of what to do + */ + public String initialTip() { + return "Pick an object to move or use select tool to select object(s)" + + " to move."; + } + + /** + * Tip on how to set the second click + * @return short describtion of what to do + */ + private String secondClickTip() { + return "Pick a point to move to." + + " Use \"length\" to type a specific distance to move." + + " Press Escape to cancel move."; + } } Index: EraserTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/EraserTool.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EraserTool.java 26 Feb 2007 15:06:36 -0000 1.6 --- EraserTool.java 20 Jun 2007 13:17:55 -0000 1.7 *************** *** 69,72 **** } ! } --- 69,78 ---- } ! /** ! * Tip on how to set the first click ! * @return short describtion of what to do ! */ ! public String initialTip() { ! return "Pick an edge or a vertex to erase"; ! } } Index: ConstructorTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ConstructorTool.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ConstructorTool.java 29 Mar 2007 13:50:08 -0000 1.14 --- ConstructorTool.java 20 Jun 2007 13:17:56 -0000 1.15 *************** *** 140,143 **** --- 140,144 ---- start = p1; active = true; + setTip(secondClickTip()); } else { if (p1.vertex().equalEps(current.vertex())) { *************** *** 150,153 **** --- 151,155 ---- } else if (p2 == null) { p2 = current; + setTip(thirdClickTip()); } else { if (p2.vertex().equalEps(current.vertex())) { *************** *** 184,186 **** --- 186,216 ---- process(null); } + + /** + * Tip on how to set the first click + * @return short describtion of what to do + */ + public String initialTip() { + return "Set origin of a constructor." + + " Double-click to make a B-point constructor."; + } + + /** + * Tip on how to set the second click + * @return short describtion of what to do + */ + private String secondClickTip() { + return "Set direction for the first vector of a constructor." + + " Double-click to make a B-line constructor." + + " Press Escape to cancel constructor."; + } + + /** + * Tip on how to set the third click + * @return short describtion of what to do + */ + private String thirdClickTip() { + return "Set direction of second vector of a B-plane." + + " Press Escape to cancel constructor."; + } } Index: FocusTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FocusTool.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FocusTool.java 23 Feb 2007 11:09:18 -0000 1.2 --- FocusTool.java 20 Jun 2007 13:17:55 -0000 1.3 *************** *** 70,72 **** --- 70,80 ---- } } + + /** + * Tip on how to set the first click + * @return short describtion of what to do + */ + public String initialTip() { + return "Pick a surface to focus the camera on."; + } } Index: RotationTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RotationTool.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** RotationTool.java 14 Feb 2007 14:27:24 -0000 1.26 --- RotationTool.java 20 Jun 2007 13:17:56 -0000 1.27 *************** *** 155,158 **** --- 155,159 ---- totalAngle = 0; active = true; + setTip(secondClickTip()); } } else if (p2 == null) { *************** *** 167,170 **** --- 168,172 ---- pro.setStart(from); nothits = getAffected(vertices); + setTip(fourthClickTip()); } else { finish(); *************** *** 184,187 **** --- 186,190 ---- pro = new GlProtractor(onto, p1); glv.getView().addGlObjects3D(pro); + setTip(thirdClickTip()); } *************** *** 223,227 **** */ private void updateFeedback() { ! List points = new LinkedList(); List edges = new LinkedList(); if (p1 != null) { --- 226,230 ---- */ private void updateFeedback() { ! List<Vertex> points = new LinkedList<Vertex>(); List edges = new LinkedList(); if (p1 != null) { *************** *** 381,398 **** //restore matrix gl.glPopMatrix(); - - //draw lines - /*gl.glColor3d(0.2, 0.2, 0.2); - gl.glLineWidth(1.0f); - Iterator < Line > iter = edges.iterator(); - while (iter.hasNext()) { - Line l = iter.next(); - Vertex from = l.getPointAt(-1.8 * factor); - Vertex to = l.getPointAt(1.8 * factor); - gl.glBegin(GL.GL_LINE_STRIP); - gl.glVertex3d(from.getX(), from.getY(), from.getZ()); - gl.glVertex3d(to.getX(), to.getY(), to.getZ()); - gl.glEnd(); - }*/ } --- 384,387 ---- *************** *** 427,429 **** --- 416,455 ---- } } + + /** + * Tip on how to set the first click + * @return short describtion of what to do + */ + public String initialTip() { + return "Use select tool to select object(s) to rotate," + + " then pick a center point for the rotation"; + } + + /** + * Tip on how to set the second click + * @return short describtion of what to do + */ + private String secondClickTip() { + return "Set an axis to rotate around." + + " Press Escape to cancel rotation."; + } + + /** + * Tip on how to set the third click + * @return short describtion of what to do + */ + private String thirdClickTip() { + return "Pick a start point of a rotation on the grey disc." + + " Press Escape to cancel rotation."; + } + + /** + * Tip on how to set the fourth click + * @return short describtion of what to do + */ + private String fourthClickTip() { + return "Pick an end point of a rotation on the grey disc." + + " Use \"length\" to type a specific number of degrees to rotate" + + " Press Escape to cancel rotation."; + } } |