[Pixelle-commit] SF.net SVN: pixelle:[275] trunk/pixelle/src/com/mebigfatguy/pixelle
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-07-18 18:57:36
|
Revision: 275
http://pixelle.svn.sourceforge.net/pixelle/?rev=275&view=rev
Author: dbrosius
Date: 2009-07-18 18:57:35 +0000 (Sat, 18 Jul 2009)
Log Message:
-----------
add pixel specifications to short cut menu
Modified Paths:
--------------
trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleBundle.java
trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/AlgorithmEditor.java
trunk/pixelle/src/com/mebigfatguy/pixelle/resources/pixelle.properties
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleBundle.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleBundle.java 2009-07-18 18:49:24 UTC (rev 274)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleBundle.java 2009-07-18 18:57:35 UTC (rev 275)
@@ -24,7 +24,7 @@
* manages the resource bundle using in the program
*/
public class PixelleBundle {
-
+
public static final String OK = "ok";
public static final String CANCEL = "cancel";
public static final String RESET = "reset";
@@ -102,6 +102,7 @@
public static final String OUTPUT_PROPERTIES = "label.output_properties";
public static final String PICK_SOURCE_LABEL = "label.pick_source";
public static final String SHORTCUTS = "label.shortcuts";
+ public static final String PIXEL_SPECIFICATION = "label.pixelspecs";
public static final String POSITIONS = "label.positions";
public static final String LEFT = "label.left";
public static final String TOP = "label.top";
@@ -109,13 +110,13 @@
public static final String BOTTOM = "label.bottom";
public static final String CENTERX= "label.centerx";
public static final String CENTERY= "label.centerx";
-
+
private static ResourceBundle rb = ResourceBundle.getBundle("com/mebigfatguy/pixelle/resources/pixelle");
-
+
private PixelleBundle()
{
}
-
+
/**
* returns a localized string from a given key
*
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/AlgorithmEditor.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/AlgorithmEditor.java 2009-07-18 18:49:24 UTC (rev 274)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/AlgorithmEditor.java 2009-07-18 18:57:35 UTC (rev 275)
@@ -148,6 +148,21 @@
shortcuts = new JPopupMenu(PixelleBundle.getString(PixelleBundle.SHORTCUTS));
+ JMenu specMenu = new JMenu(PixelleBundle.getString(PixelleBundle.PIXEL_SPECIFICATION));
+ JMenuItem redSpecItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.RED_ALGORITHM));
+ JMenuItem greenSpecItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.GREEN_ALGORITHM));
+ JMenuItem blueSpecItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.BLUE_ALGORITHM));
+ JMenuItem blackSpecItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.BLACK_ALGORITHM));
+ JMenuItem transparentSpecItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.TRANSPARENCY_ALGORITHM));
+ JMenuItem selectionSpecItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.SELECTION_ALGORITHM));
+ specMenu.add(redSpecItem);
+ specMenu.add(greenSpecItem);
+ specMenu.add(blueSpecItem);
+ specMenu.add(blackSpecItem);
+ specMenu.add(transparentSpecItem);
+ specMenu.add(selectionSpecItem);
+ shortcuts.add(specMenu);
+
JMenu posMenu = new JMenu(PixelleBundle.getString(PixelleBundle.POSITIONS));
JMenuItem leftItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.LEFT));
JMenuItem topItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.TOP));
@@ -163,6 +178,13 @@
posMenu.add(centerYItem);
shortcuts.add(posMenu);
+ addSimpleShortCutListener(redSpecItem, "p[x,y].r");
+ addSimpleShortCutListener(greenSpecItem, "p[x,y].g");
+ addSimpleShortCutListener(blueSpecItem, "p[x,y].b");
+ addSimpleShortCutListener(blackSpecItem, "p[x,y].k");
+ addSimpleShortCutListener(transparentSpecItem, "p[x,y].t");
+ addSimpleShortCutListener(selectionSpecItem, "p[x,y].s");
+
addSimpleShortCutListener(leftItem, "0");
addSimpleShortCutListener(topItem, "0");
addSimpleShortCutListener(rightItem, "width");
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/resources/pixelle.properties
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/resources/pixelle.properties 2009-07-18 18:49:24 UTC (rev 274)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/resources/pixelle.properties 2009-07-18 18:57:35 UTC (rev 275)
@@ -112,6 +112,8 @@
label.pick_source = Select the input source window to use in the transformation
label.shortcuts = ShortCuts
+label.pixelspecs = Pixel Specifications
+
label.positions = Positions
label.left = Left
label.top = Top
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|