[Pixelle-commit] SF.net SVN: pixelle:[273] trunk/pixelle/src/com/mebigfatguy/pixelle
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-07-18 18:42:05
|
Revision: 273
http://pixelle.svn.sourceforge.net/pixelle/?rev=273&view=rev
Author: dbrosius
Date: 2009-07-18 18:42:04 +0000 (Sat, 18 Jul 2009)
Log Message:
-----------
add items to shortcuts 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
trunk/pixelle/src/com/mebigfatguy/pixelle/resources/pixelle_de.properties
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleBundle.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleBundle.java 2009-07-18 03:59:06 UTC (rev 272)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleBundle.java 2009-07-18 18:42:04 UTC (rev 273)
@@ -102,6 +102,13 @@
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 POSITIONS = "label.positions";
+ public static final String LEFT = "label.left";
+ public static final String TOP = "label.top";
+ public static final String RIGHT = "label.right";
+ 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");
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/AlgorithmEditor.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/AlgorithmEditor.java 2009-07-18 03:59:06 UTC (rev 272)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/AlgorithmEditor.java 2009-07-18 18:42:04 UTC (rev 273)
@@ -35,6 +35,7 @@
import javax.swing.JEditorPane;
import javax.swing.JLabel;
import javax.swing.JMenu;
+import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
@@ -126,22 +127,11 @@
}
});
- shortcutTrigger.addMouseListener(new MouseAdapter() {
- public void mousePressed(MouseEvent e) {
- maybeShowPopup(e);
- }
-
- public void mouseReleased(MouseEvent e) {
- maybeShowPopup(e);
- }
-
- private void maybeShowPopup(MouseEvent e) {
- if (e.isPopupTrigger()) {
- shortcuts.show(e.getComponent(), e.getX(), e.getY());
- }
- }
-
-
+ shortcutTrigger.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mouseClicked(MouseEvent e) {
+ shortcuts.show(e.getComponent(), e.getX(), e.getY());
+ }
});
}
@@ -153,7 +143,20 @@
{
JPopupMenu menu = new JPopupMenu(PixelleBundle.getString(PixelleBundle.SHORTCUTS));
- menu.add(new JMenu("Positions"));
+ JMenu posMenu = new JMenu(PixelleBundle.getString(PixelleBundle.POSITIONS));
+ JMenuItem leftItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.LEFT));
+ JMenuItem topItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.TOP));
+ JMenuItem rightItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.RIGHT));
+ JMenuItem bottomItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.BOTTOM));
+ JMenuItem centerXItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.CENTERX));
+ JMenuItem centerYItem = new JMenuItem(PixelleBundle.getString(PixelleBundle.CENTERY));
+ posMenu.add(leftItem);
+ posMenu.add(topItem);
+ posMenu.add(rightItem);
+ posMenu.add(bottomItem);
+ posMenu.add(centerXItem);
+ posMenu.add(centerYItem);
+ menu.add(posMenu);
return menu;
}
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/resources/pixelle.properties
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/resources/pixelle.properties 2009-07-18 03:59:06 UTC (rev 272)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/resources/pixelle.properties 2009-07-18 18:42:04 UTC (rev 273)
@@ -110,4 +110,12 @@
label.output_properties = Output Properties
label.pick_source = Select the input source window to use in the transformation
-label.shortcuts = ShortCuts
\ No newline at end of file
+label.shortcuts = ShortCuts
+
+label.positions = Positions
+label.left = Left
+label.top = Top
+label.right = Right
+label.bottom = Bottom
+label.centerx = Center.X
+label.centery = Center.Y
\ No newline at end of file
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/resources/pixelle_de.properties
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/resources/pixelle_de.properties 2009-07-18 03:59:06 UTC (rev 272)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/resources/pixelle_de.properties 2009-07-18 18:42:04 UTC (rev 273)
@@ -110,4 +110,12 @@
label.output_properties = Output-Eigenschaften
label.pick_source = W\xE4hlen Sie die Eingangsquelle Fenster zur Verwendung in der Transformation
-label.shortcuts = Schnellzugriffe
\ No newline at end of file
+label.shortcuts = Schnellzugriffe
+
+label.positions = Positionen
+label.left = Verlie\xDF
+label.top = Spitze
+label.right = Richtig
+label.bottom = Boden
+label.centerx = Center.X
+label.centery = Center.Y
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|