[Pixelle-commit] SF.net SVN: pixelle: [80] trunk/pixelle/src/com/mebigfatguy/pixelle
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2008-06-26 02:28:26
|
Revision: 80
http://pixelle.svn.sourceforge.net/pixelle/?rev=80&view=rev
Author: dbrosius
Date: 2008-06-25 19:28:34 -0700 (Wed, 25 Jun 2008)
Log Message:
-----------
add reset button
Modified Paths:
--------------
trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleBundle.java
trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/PixelleExpressionDialog.java
trunk/pixelle/src/com/mebigfatguy/pixelle/pixelle.properties
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleBundle.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleBundle.java 2008-06-25 05:11:27 UTC (rev 79)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleBundle.java 2008-06-26 02:28:34 UTC (rev 80)
@@ -27,6 +27,7 @@
public static final String OK = "ok";
public static final String CANCEL = "cancel";
+ public static final String RESET = "reset";
public static final String TITLE = "pixelle.title";
public static final String FILE_MENU = "menu.file.title";
public static final String NEW_ITEM = "menu.file.new";
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/PixelleExpressionDialog.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/PixelleExpressionDialog.java 2008-06-25 05:11:27 UTC (rev 79)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/PixelleExpressionDialog.java 2008-06-26 02:28:34 UTC (rev 80)
@@ -59,11 +59,11 @@
private final JTextField editor[] =
{
- new JTextField(PixelleBundle.getString(PixelleBundle.RED_FORMULA), 80),
- new JTextField(PixelleBundle.getString(PixelleBundle.GREEN_FORMULA), 80),
- new JTextField(PixelleBundle.getString(PixelleBundle.BLUE_FORMULA), 80),
- new JTextField(PixelleBundle.getString(PixelleBundle.TRANSPARENCY_FORMULA), 80),
- new JTextField(PixelleBundle.getString(PixelleBundle.SELECTION_FORMULA), 80)
+ new JTextField(PixelleBundle.getString(PixelleBundle.RED_FORMULA), 50),
+ new JTextField(PixelleBundle.getString(PixelleBundle.GREEN_FORMULA), 50),
+ new JTextField(PixelleBundle.getString(PixelleBundle.BLUE_FORMULA), 50),
+ new JTextField(PixelleBundle.getString(PixelleBundle.TRANSPARENCY_FORMULA), 50),
+ new JTextField(PixelleBundle.getString(PixelleBundle.SELECTION_FORMULA), 50)
};
private final JLabel labels[] =
@@ -77,6 +77,7 @@
JButton ok;
JButton cancel;
+ JButton reset;
boolean clickedOK = false;
public PixelleExpressionDialog(PixelleFrame owner) {
@@ -119,15 +120,18 @@
ok = new JButton(PixelleBundle.getString(PixelleBundle.OK));
cancel = new JButton(PixelleBundle.getString(PixelleBundle.CANCEL));
- GuiUtils.sizeUniformly(GuiUtils.Sizing.Both, new JComponent[] {ok, cancel});
+ reset = new JButton(PixelleBundle.getString(PixelleBundle.RESET));
+ GuiUtils.sizeUniformly(GuiUtils.Sizing.Both, new JComponent[] {ok, cancel, reset});
JPanel p = new JPanel();
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
+ p.add(Box.createHorizontalStrut(10));
+ p.add(reset);
p.add(Box.createHorizontalGlue());
p.add(ok);
p.add(Box.createHorizontalStrut(10));
p.add(cancel);
- p.add(Box.createHorizontalGlue());
+ p.add(Box.createHorizontalStrut(10));
p.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
cp.add(p);
pack();
@@ -147,6 +151,15 @@
}
});
+ reset.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent ae) {
+ editor[0].setText(PixelleBundle.getString(PixelleBundle.RED_FORMULA));
+ editor[1].setText(PixelleBundle.getString(PixelleBundle.GREEN_FORMULA));
+ editor[2].setText(PixelleBundle.getString(PixelleBundle.BLUE_FORMULA));
+ editor[3].setText(PixelleBundle.getString(PixelleBundle.TRANSPARENCY_FORMULA));
+ editor[4].setText(PixelleBundle.getString(PixelleBundle.SELECTION_FORMULA));
+ }
+ });
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
}
}
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/pixelle.properties
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/pixelle.properties 2008-06-25 05:11:27 UTC (rev 79)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/pixelle.properties 2008-06-26 02:28:34 UTC (rev 80)
@@ -19,6 +19,7 @@
ok = OK
cancel = CANCEL
+reset = RESET
pixelle.title = Pixelle
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|