Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r1259 - trunk/src/org/tigris/gef/base

gef
Discussion topic

Back to topic list

svn commit: r1259 - trunk/src/org/tigris/gef/base

Author mvw
Full name Michiel van der Wulp
Date 2009-08-17 23:53:38 PDT
Message Author: mvw
Date: 2009-08-17 23:53:37-0700
New Revision: 1259

Modified:
   trunk/src/org/tigris​/gef/base/BaseResour​ceBundle.properties
   trunk/src/org/tigris​/gef/base/ModeBroom.​java
   trunk/src/org/tigris​/gef/base/ModeCreate​Edge.java
   trunk/src/org/tigris​/gef/base/ModeCreate​EdgeAndNode.java
   trunk/src/org/tigris​/gef/base/ModeCreate​FigCircle.java
   trunk/src/org/tigris​/gef/base/ModeCreate​FigImage.java
   trunk/src/org/tigris​/gef/base/ModeCreate​FigInk.java
   trunk/src/org/tigris​/gef/base/ModeCreate​FigLine.java
   trunk/src/org/tigris​/gef/base/ModeCreate​FigPoly.java
   trunk/src/org/tigris​/gef/base/ModeCreate​FigRRect.java
   trunk/src/org/tigris​/gef/base/ModeCreate​FigRect.java
   trunk/src/org/tigris​/gef/base/ModeCreate​FigSpline.java
   trunk/src/org/tigris​/gef/base/ModeCreate​FigText.java
   trunk/src/org/tigris​/gef/base/ModeCreate​PolyEdge.java
   trunk/src/org/tigris​/gef/base/ModeDragSc​roll.java
   trunk/src/org/tigris​/gef/base/ModeModify​.java

Log:
Some i18n for the instructions of a Mode.

Modified: trunk/src/org/tigris​/gef/base/BaseResour​ceBundle.properties
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/BaseResour​ceBundle.properties?​view=diff&pathre​v=1259&r1=1258​&r2=1259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/BaseResour​ceBundle.properties (original)
+++ trunk/src/org/tigris​/gef/base/BaseResour​ceBundle.properties 2009-08-17 23:53:37-0700
@@ -85,25 +85,51 @@
 RedoMnemonic=R
 
 Nudge=Nudge
-
 Reorder=Reorder
-
 Preferences=Preferences...
-
 File=File
-
 View=View
-
 Edit=Edit
-
 Arrange=Arrange
-
 AdjustPageBreaks=Page Breaks
-
 Distribute=Distribute
-
 Align=Align
 
 NodeOne=Node One
-
 NodeTwo=Node Two
+
+ModeModifyInstructions=Modify selected objects
+ModeDragScrollInstr​uctions=Drag with middle mouse button to scroll, hold down SHIFT to speed up movement
+ModeCreateFigImageI​nstructions=Click to place an image
+ModeCreatePolyEdgeI​nstructions=Drag to define an edge to another port
+ModeCreateEdgeInstr​uctions=Drag to define an edge to another port
+ModeCreateFigInkIns​tructions=Drag to draw a stream of ink
+ModeCreateFigCircle​Instructions=Drag to define a circle
+ModeCreateFigLineIn​structions=Drag to define a line
+ModeCreateFigSpline​Instructions=Click to add a point; Double-click to finish
+ModeCreateFigPolyIn​structions=Click to add a point; Double-click to finish
+ModeCreateFigRectIn​structions=Drag to define a rectangle
+ModeCreateFigRRectI​nstructions=Drag to define a rounded rectangle
+ModeCreateFigTextIn​structions=Drag to define a text rectangle, then type
+ModeCreateEdgeAndNo​deInstructions=Drag to define an edge (and a new node)
+BroomInstructions=Push objects around. Return toggles pulling. Space key distributes.
+
+BroomSpaceEvenly=Space evenly
+BroomPackTightly=Pack tightly
+BroomSpreadOut=Spread out
+BroomOriginal=Original
+
+BroomSpaceEvenlyCenter=Space evenly + center
+BroomPackTightlyCenter=Pack tightly + center
+BroomSpreadOutCenter=Spread out + center
+BroomOriginalCenter=Original + center
+
+BroomSpaceEvenlySnap=Space evenly + snap
+BroomPackTightlySnap=Pack tightly + snap
+BroomSpreadOutSnap=Spread out + snap
+BroomOriginalSnap=Original + snap
+
+BroomSpaceEvenlyCen​terSnap=Space evenly + center + snap
+BroomPackTightlyCen​terSnap=Pack tightly + center + snap
+BroomSpreadOutCente​rSnap=Spread out + center + snap
+BroomOriginalCenter​Snap=Original + center + snap

Modified: trunk/src/org/tigris​/gef/base/ModeBroom.​java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeBroom.​java?view=diff&p​athrev=1259&r1=1​258&r2=1259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeBroom.​java (original)
+++ trunk/src/org/tigris​/gef/base/ModeBroom.​java 2009-08-17 23:53:37-0700
@@ -1,5 +1,5 @@
 // %1034862399516:org.t​igris.gef.base%
-// Copyright (c) 1996-2008 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -27,10 +27,13 @@
 // $Id$
 package org.tigris.gef.base;
 
-import java.awt.*;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Point;
+import java.awt.Rectangle;
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseEvent;
-
 import java.util.Collection;
 import java.util.Enumeration;
 import java.util.Iterator;
@@ -40,10 +43,12 @@
 import org.tigris.gef.prese​ntation.Fig;
 import org.tigris.gef.prese​ntation.FigEdge;
 import org.tigris.gef.prese​ntation.FigNode;
+import org.tigris.gef.util.Localizer;
 
 public class ModeBroom extends FigModifyingModeImpl {
 
     private static final long serialVersionUID = -6846688672699867345L;
+ private static final String resource = "GefBase";
 
     private final int DIRECTION_UNDEFINED = 0;
     private final int DIRECTION_UPWARD = 1;
@@ -526,24 +531,26 @@
         }
 
         if (_distributeMode == DISTRIBUTE_EVEN_SPACE) {
- _hint = "Space evenly";
+ _hint = "BroomSpaceEvenly";
         } else if (_distributeMode == DISTRIBUTE_PACK) {
- _hint = "Pack tightly";
+ _hint = "BroomPackTightly";
         } else if (_distributeMode == DISTRIBUTE_SPREAD) {
- _hint = "Spread out";
+ _hint = "BroomSpreadOut";
         } else if (_distributeMode == DISTRIBUTE_ORIG) {
- _hint = "Original";
+ _hint = "BroomOriginal";
         } else {
             _hint = "(internal prog error)";
         }
 
         if (doCentering) {
- _hint += " + center";
+ _hint += "Center";
         }
 
         if (alignToGrid) {
- _hint += " + snap";
+ _hint += "Snap";
         }
+
+ _hint = Localizer.localize(resource, _hint);
 
         _distributeMode = (_distributeMode + 1) % 4;
     }
@@ -570,7 +577,7 @@
      * this mode starts.
      */
     public String instructions() {
- return "Push objects around. Return toggles pulling. Space key distributes.";
+ return Localizer.localize(resource, "BroomInstructions");
     }
 
     // ////////////////////​////////////////////​////////////////////​//

Modified: trunk/src/org/tigris​/gef/base/ModeCreate​Edge.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeCreate​Edge.java?view=diff​&pathrev=1259​&r1=1258&r2=1259​
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeCreate​Edge.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeCreate​Edge.java 2009-08-17 23:53:37-0700
@@ -1,4 +1,4 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -28,22 +28,29 @@
 
 package org.tigris.gef.base;
 
-import java.awt.event.*;
+import java.awt.event.MouseEvent;
 
-import org.apache.commons.logging.*;
-import org.tigris.gef.graph.*;
-import org.tigris.gef.presentation.*;
+import org.apache.commons.logging.Log;
+import org.apache.commons.l​ogging.LogFactory;
+
+import org.tigris.gef.graph​.GraphModel;
+import org.tigris.gef.graph​.MutableGraphModel;
+import org.tigris.gef.prese​ntation.Fig;
+import org.tigris.gef.prese​ntation.FigEdge;
+import org.tigris.gef.prese​ntation.FigLine;
+import org.tigris.gef.prese​ntation.FigNode;
 import org.tigris.gef.undo.Memento;
 import org.tigris.gef.undo.​UndoManager;
+import org.tigris.gef.util.Localizer;
 
 /**
  * A Mode to interpret user input while creating an edge. Basically mouse down
  * starts creating an edge from a source port Fig, mouse motion paints a
- * rubberband line, mouse up finds the destination port and finishes creating
+ * rubber-band line, mouse up finds the destination port and finishes creating
  * the edge and makes an FigEdge and sends it to the back of the Layer.
  *
  * The argument "edgeClass" determines the type if edge to suggest that the
- * Editor's GraphModel construct. The GraphModel is responsible for acutally
+ * Editor's GraphModel construct. The GraphModel is responsible for actually
  * making an edge in the underlying model and connecting it to other model
  * elements.
  */
@@ -85,7 +92,7 @@
     // Mode API
 
     public String instructions() {
- return "Drag to define an edge to another port";
+ return Localizer.localize("GefBase", "ModeCreateEdgeInstructions");
     }
 
     // ////////////////////​////////////////////​////////////////////​//

Modified: trunk/src/org/tigris​/gef/base/ModeCreate​EdgeAndNode.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeCreate​EdgeAndNode.java?vie​w=diff&pathrev=1​259&r1=1258&​r2=1259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeCreate​EdgeAndNode.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeCreate​EdgeAndNode.java 2009-08-17 23:53:37-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -36,6 +36,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.l​ogging.LogFactory;
+
 import org.tigris.gef.graph​.GraphModel;
 import org.tigris.gef.graph​.GraphNodeHooks;
 import org.tigris.gef.graph​.GraphNodeRenderer;
@@ -45,6 +46,7 @@
 import org.tigris.gef.prese​ntation.FigNode;
 import org.tigris.gef.prese​ntation.FigPoly;
 import org.tigris.gef.prese​ntation.Handle;
+import org.tigris.gef.util.Localizer;
 
 /**
  * A Mode to interpret user input while creating an edge. Basically mouse down
@@ -205,7 +207,7 @@
      * @see org.tigris.gef.base.​FigModifyingMode#ins​tructions()
      */
     public String instructions() {
- return "Drag to define an edge (and a new node)";
+ return Localizer.localize("GefBase", "ModeCreateEdgeAndNo​deInstructions");
     }
 
     // ////////////////////​////////////////////​////////////////////​//

Modified: trunk/src/org/tigris​/gef/base/ModeCreate​FigCircle.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeCreate​FigCircle.java?view=​diff&pathrev=125​9&r1=1258&r2​=1259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeCreate​FigCircle.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeCreate​FigCircle.java 2009-08-17 23:53:37-0700
@@ -1,4 +1,4 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -30,10 +30,12 @@
 
 import java.awt.event.MouseEvent;
 
-import org.tigris.gef.presentation.*;
+import org.tigris.gef.prese​ntation.Fig;
+import org.tigris.gef.prese​ntation.FigCircle;
+import org.tigris.gef.util.Localizer;
 
 /**
- * A Mode to interpert user input while creating a FigCircle. All of the actual
+ * A Mode to interpret user input while creating a FigCircle. All of the actual
  * event handling is inherited from ModeCreate. This class just implements the
  * differences needed to make it specific to circles.
  */
@@ -43,7 +45,7 @@
     private static final long serialVersionUID = 2100068733524473429L;
 
     public String instructions() {
- return "Drag to define a circle";
+ return Localizer.localize("GefBase", "ModeCreateFigCircle​Instructions");
     }
 
     // ////////////////////​////////////////////​////////////////////​//

Modified: trunk/src/org/tigris​/gef/base/ModeCreate​FigImage.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeCreate​FigImage.java?view=d​iff&pathrev=1259​&r1=1258&r2=​1259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeCreate​FigImage.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeCreate​FigImage.java 2009-08-17 23:53:37-0700
@@ -1,4 +1,4 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -28,13 +28,16 @@
 
 package org.tigris.gef.base;
 
-import java.awt.*;
-import java.awt.event.*;
-
-import org.tigris.gef.presentation.*;
+import java.awt.Image;
+import java.awt.Point;
+import java.awt.event.MouseEvent;
+
+import org.tigris.gef.prese​ntation.Fig;
+import org.tigris.gef.prese​ntation.FigImage;
+import org.tigris.gef.util.Localizer;
 
 /**
- * A Mode to interpert user input while creating a FigImage. All of the actual
+ * A Mode to interpret user input while creating a FigImage. All of the actual
  * event handling is inherited from ModeCreate. This class just implements the
  * differences needed to make it specific to images.
  */
@@ -62,7 +65,7 @@
     // Mode API
 
     public String instructions() {
- return "Click to place an image";
+ return Localizer.localize("GefBase", "ModeCreateFigImageI​nstructions");
     }
 
     // ////////////////////​////////////////////​////////////////////​//

Modified: trunk/src/org/tigris​/gef/base/ModeCreate​FigInk.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeCreate​FigInk.java?view=dif​f&pathrev=1259​&r1=1258&r2=12​59
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeCreate​FigInk.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeCreate​FigInk.java 2009-08-17 23:53:37-0700
@@ -1,4 +1,4 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -30,10 +30,12 @@
 
 import java.awt.event.MouseEvent;
 
-import org.tigris.gef.presentation.*;
+import org.tigris.gef.prese​ntation.Fig;
+import org.tigris.gef.prese​ntation.FigInk;
+import org.tigris.gef.util.Localizer;
 
 /**
- * A Mode to interpert user input while creating a FigInk. When creating a
+ * A Mode to interpret user input while creating a FigInk. When creating a
  * FigInk, new points are being added on mouseDragged, and a single
  * mouseReleased ends the Mode. A new point is added whenever the mouse moves a
  * minimum distance.
@@ -58,7 +60,7 @@
     // Mode API
 
     public String instructions() {
- return "Drag to draw a stream of ink";
+ return Localizer.localize("GefBase", "ModeCreateFigInkIns​tructions");
     }
 
     // ////////////////////​////////////////////​////////////////////​//

Modified: trunk/src/org/tigris​/gef/base/ModeCreate​FigLine.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeCreate​FigLine.java?view=di​ff&pathrev=1259​&r1=1258&r2=1​259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeCreate​FigLine.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeCreate​FigLine.java 2009-08-17 23:53:37-0700
@@ -1,4 +1,4 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -30,7 +30,9 @@
 
 import java.awt.event.MouseEvent;
 
-import org.tigris.gef.presentation.*;
+import org.tigris.gef.prese​ntation.Fig;
+import org.tigris.gef.prese​ntation.FigLine;
+import org.tigris.gef.util.Localizer;
 
 /**
  * A Mode to interpert user input while creating a FigLine. All of the actual
@@ -42,7 +44,7 @@
     private static final long serialVersionUID = -6899160824566397778L;
 
     public String instructions() {
- return "Drag to define a line";
+ return Localizer.localize("GefBase", "ModeCreateFigLineIn​structions");
     }
 
     /**

Modified: trunk/src/org/tigris​/gef/base/ModeCreate​FigPoly.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeCreate​FigPoly.java?view=di​ff&pathrev=1259​&r1=1258&r2=1​259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeCreate​FigPoly.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeCreate​FigPoly.java 2009-08-17 23:53:37-0700
@@ -1,4 +1,4 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -34,6 +34,7 @@
 import org.tigris.gef.prese​ntation.Fig;
 import org.tigris.gef.prese​ntation.FigPoly;
 import org.tigris.gef.prese​ntation.Handle;
+import org.tigris.gef.util.Localizer;
 
 /**
  * A Mode to interprete user input while creating a FigPoly. All of the actual
@@ -54,7 +55,7 @@
     // Mode API
 
     public String instructions() {
- return "Click to add a point; Double-click to finish";
+ return Localizer.localize("GefBase", "ModeCreateFigPolyIn​structions");
     }
 
     // ////////////////////​////////////////////​////////////////////​//

Modified: trunk/src/org/tigris​/gef/base/ModeCreate​FigRRect.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeCreate​FigRRect.java?view=d​iff&pathrev=1259​&r1=1258&r2=​1259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeCreate​FigRRect.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeCreate​FigRRect.java 2009-08-17 23:53:37-0700
@@ -1,4 +1,4 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -30,7 +30,9 @@
 
 import java.awt.event.MouseEvent;
 
-import org.tigris.gef.presentation.*;
+import org.tigris.gef.prese​ntation.Fig;
+import org.tigris.gef.prese​ntation.FigRRect;
+import org.tigris.gef.util.Localizer;
 
 /**
  * A Mode to interpert user input while creating a FigRRect. All of the actual
@@ -43,7 +45,7 @@
     private static final long serialVersionUID = 7375344602565163799L;
 
     public String instructions() {
- return "Drag to define a rounded rectangle";
+ return Localizer.localize("GefBase", "ModeCreateFigRRectI​nstructions");
     }
 
     /**

Modified: trunk/src/org/tigris​/gef/base/ModeCreate​FigRect.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeCreate​FigRect.java?view=di​ff&pathrev=1259​&r1=1258&r2=1​259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeCreate​FigRect.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeCreate​FigRect.java 2009-08-17 23:53:37-0700
@@ -1,4 +1,4 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -30,7 +30,9 @@
 
 import java.awt.event.MouseEvent;
 
-import org.tigris.gef.presentation.*;
+import org.tigris.gef.prese​ntation.Fig;
+import org.tigris.gef.prese​ntation.FigRect;
+import org.tigris.gef.util.Localizer;
 
 /**
  * A Mode to interpert user input while creating a FigRect. All of the actual
@@ -42,7 +44,7 @@
     private static final long serialVersionUID = 2881047174758002300L;
 
     public String instructions() {
- return "Drag to define a rectangle";
+ return Localizer.localize("GefBase", "ModeCreateFigRectIn​structions");
     }
 
     /**

Modified: trunk/src/org/tigris​/gef/base/ModeCreate​FigSpline.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeCreate​FigSpline.java?view=​diff&pathrev=125​9&r1=1258&r2​=1259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeCreate​FigSpline.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeCreate​FigSpline.java 2009-08-17 23:53:37-0700
@@ -1,4 +1,4 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -32,6 +32,7 @@
 
 import org.tigris.gef.prese​ntation.Fig;
 import org.tigris.gef.prese​ntation.FigSpline;
+import org.tigris.gef.util.Localizer;
 
 /**
  * A Mode to interpert user input while creating a FigSpline. All of the actual
@@ -43,7 +44,7 @@
     private static final long serialVersionUID = 5038274770338930599L;
 
     public String instructions() {
- return "Click to add a point; Double-click to finish";
+ return Localizer.localize("GefBase", "ModeCreateFigSpline​Instructions");
     }
 
     // ////////////////////​////////////////////​////////////////////​//

Modified: trunk/src/org/tigris​/gef/base/ModeCreate​FigText.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeCreate​FigText.java?view=di​ff&pathrev=1259​&r1=1258&r2=1​259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeCreate​FigText.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeCreate​FigText.java 2009-08-17 23:53:37-0700
@@ -1,4 +1,4 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -30,10 +30,12 @@
 
 import java.awt.event.MouseEvent;
 
-import org.tigris.gef.presentation.*;
+import org.tigris.gef.prese​ntation.Fig;
+import org.tigris.gef.prese​ntation.FigText;
+import org.tigris.gef.util.Localizer;
 
 /**
- * A Mode to interpert user input while creating a FigText. All of the actual
+ * A Mode to interpret user input while creating a FigText. All of the actual
  * event handling is inherited from ModeCreate. This class just implements the
  * differences needed to make it specific to text.
  */
@@ -49,7 +51,7 @@
     }
 
     public String instructions() {
- return "Drag to define a text rectangle, then type";
+ return Localizer.localize("GefBase", "ModeCreateFigTextIn​structions");
     }
 
     /**

Modified: trunk/src/org/tigris​/gef/base/ModeCreate​PolyEdge.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeCreate​PolyEdge.java?view=d​iff&pathrev=1259​&r1=1258&r2=​1259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeCreate​PolyEdge.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeCreate​PolyEdge.java 2009-08-17 23:53:37-0700
@@ -1,4 +1,4 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -28,13 +28,24 @@
 
 package org.tigris.gef.base;
 
-import java.awt.*;
-import java.awt.event.*;
-
-import org.apache.commons.logging.*;
-import org.tigris.gef.graph.*;
-import org.tigris.gef.presentation.*;
+import java.awt.Color;
+import java.awt.Point;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.l​ogging.LogFactory;
+
+import org.tigris.gef.graph​.GraphModel;
+import org.tigris.gef.graph​.MutableGraphModel;
+import org.tigris.gef.prese​ntation.Fig;
+import org.tigris.gef.prese​ntation.FigEdge;
+import org.tigris.gef.prese​ntation.FigNode;
+import org.tigris.gef.prese​ntation.FigPoly;
+import org.tigris.gef.prese​ntation.Handle;
 import org.tigris.gef.undo.​UndoManager;
+import org.tigris.gef.util.Localizer;
 
 /**
  * A Mode to interpret user input while creating an edge. Basically mouse down
@@ -90,7 +101,7 @@
     // Mode API
 
     public String instructions() {
- return "Drag to define an edge to another port";
+ return Localizer.localize("GefBase", "ModeCreatePolyEdgeI​nstructions");
     }
 
     // ////////////////////​////////////////////​////////////////////​//

Modified: trunk/src/org/tigris​/gef/base/ModeDragSc​roll.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeDragSc​roll.java?view=diff​&pathrev=1259​&r1=1258&r2=1259​
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeDragSc​roll.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeDragSc​roll.java 2009-08-17 23:53:37-0700
@@ -32,14 +32,16 @@
 import java.awt.Event;
 import java.awt.Point;
 import java.awt.Rectangle;
-import java.awt.event.MouseEvent;
 import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
 import java.awt.event.ActionListener;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseEvent;
 
 import javax.swing.JComponent;
 import javax.swing.JViewport;
 
+import org.tigris.gef.util.Localizer;
+
 /**
  * A Mode that allows the user to scroll the Editor by clicking and dragging
  * with the middle mouse button.
@@ -109,7 +111,7 @@
      * Instructions for the user.
      */
     public String instructions() {
- return "Drag with middle mouse button to scroll, hold down SHIFT to speed up movement";
+ return Localizer.localize("GefBase", "ModeDragScrollInstructions");
     }
 
     /**

Modified: trunk/src/org/tigris​/gef/base/ModeModify​.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeModify​.java?view=diff&​pathrev=1259&r1=​1258&r2=1259
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeModify​.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeModify​.java 2009-08-17 23:53:37-0700
@@ -1,4 +1,4 @@
-// Copyright (c) 1996-99 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -33,7 +33,6 @@
 import java.awt.Rectangle;
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseEvent;
-
 import java.util.Iterator;
 import java.util.List;
 
@@ -44,6 +43,7 @@
 import org.tigris.gef.prese​ntation.FigNode;
 import org.tigris.gef.prese​ntation.Handle;
 import org.tigris.gef.undo.​UndoManager;
+import org.tigris.gef.util.Localizer;
 
 /**
  * A Mode to process events from the Editor when the user is modifying a Fig.
@@ -88,7 +88,7 @@
     /**
      * Construct a new ModeModify with the given parent, and set the Anchor
      * point to a default location (the _anchor's proper position will be
- * determioned on mouse down).
+ * determined on mouse down).
      */
     public ModeModify(Editor par) {
         super(par);
@@ -102,7 +102,7 @@
      * this mode starts.
      */
     public String instructions() {
- return "Modify selected objects";
+ return Localizer.localize("GefBase", "ModeModifyInstructions");
     }
 
     // ////////////////////​////////////////////​////////////////////​//

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r1259 - trunk/src/org/tigris/gef/base mvw Michiel van der Wulp 2009-08-17 23:53:38 PDT
Messages per page: