summaryrefslogtreecommitdiff
path: root/src/tesseract/newmenu/MenuItem.java
diff options
context:
space:
mode:
authorPhillip <pacardon@u.washington.edu>2011-02-23 22:25:49 +0000
committerPhillip <pacardon@u.washington.edu>2011-02-23 22:25:49 +0000
commit4245f4ac7475345162e484b79341cdff3b1710f4 (patch)
tree3ca32555f08e9919f08d49824f61206154ab7667 /src/tesseract/newmenu/MenuItem.java
parentd65550e3a82364d6c5048ac4628143dcd2168ea7 (diff)
Corrected issue causing Default Shape, Enter, and Color buttons multiple times to a parameter window.
Diffstat (limited to 'src/tesseract/newmenu/MenuItem.java')
-rw-r--r--src/tesseract/newmenu/MenuItem.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/tesseract/newmenu/MenuItem.java b/src/tesseract/newmenu/MenuItem.java
index da3cb54..c47aa2c 100644
--- a/src/tesseract/newmenu/MenuItem.java
+++ b/src/tesseract/newmenu/MenuItem.java
@@ -96,11 +96,6 @@ public abstract class MenuItem extends JMenuItem implements ActionListener {
private boolean useColorButton;
/**
- * Default constructor.
- */
- public MenuItem() { }
-
- /**
* Constructor.
* @param theWorld world parameter.
* @param theLabel for menu item.
@@ -129,9 +124,10 @@ public abstract class MenuItem extends JMenuItem implements ActionListener {
* @param theLabel for menu item.
* @param theColor use color button.
*/
- public MenuItem(final World theWorld, final String theLabel, boolean theColor) {
+ public MenuItem(final World theWorld, final String theLabel,
+ boolean theColorButton) {
this(theWorld, theLabel);
- useColorButton = theColor;
+ useColorButton = theColorButton;
}
/**
@@ -158,14 +154,14 @@ public abstract class MenuItem extends JMenuItem implements ActionListener {
protected void createParameterMenu() {
- myColorButton.addActionListener(new ActionListener(){
+ myColorButton.addActionListener(new ActionListener() {
@Override
- public void actionPerformed(ActionEvent arg0) {
+ public void actionPerformed(final ActionEvent arg0) {
myColor = JColorChooser.showDialog(null, "Particle Color",
Color.RED);
- }});
+ } });
Toolkit tk = Toolkit.getDefaultToolkit();
Dimension screenSize = tk.getScreenSize();
int screenHeight = screenSize.height;
@@ -204,8 +200,8 @@ public abstract class MenuItem extends JMenuItem implements ActionListener {
myParamFrame.setAlwaysOnTop(true);
- myParamFrame.pack();
- myParamFrame.setVisible(isVisible());
+ //myParamFrame.pack();
+ //myParamFrame.setVisible(isVisible());
}
/**