+/*\r
+ * Jalview - A Sequence Alignment Editor and Viewer\r
+ * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\r
+ */\r
package jalview.gui;\r
\r
-import javax.swing.*;\r
import java.awt.*;\r
-import java.awt.event.ActionListener;\r
-import java.awt.event.ActionEvent;\r
+import java.awt.event.*;\r
+import javax.swing.*;\r
\r
public class EPSOptions\r
extends JPanel\r
{\r
JDialog dialog;\r
- boolean cancelled = false;\r
+ public boolean cancelled = false;\r
String value;\r
\r
public EPSOptions()\r
bg.add(text);\r
\r
JOptionPane pane = new JOptionPane(null,\r
- JOptionPane.DEFAULT_OPTION, JOptionPane.DEFAULT_OPTION,\r
- null, new Object[]{this});\r
+ JOptionPane.DEFAULT_OPTION,\r
+ JOptionPane.DEFAULT_OPTION,\r
+ null, new Object[]\r
+ {this});\r
\r
dialog = pane.createDialog(Desktop.desktop, "EPS Rendering options");\r
- dialog.show();\r
+ dialog.setVisible(true);\r
\r
}\r
\r
throws Exception\r
{\r
lineart.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
- lineart.setSelected(true);\r
lineart.setText("Lineart");\r
text.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
text.setText("Text");\r
+ text.setSelected(true);\r
askAgain.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
askAgain.setText("Don\'t ask me again");\r
ok.setText("OK");\r
}\r
});\r
jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
- jLabel1.setText("Select EPS Character rendering style");\r
+ jLabel1.setText("Select EPS character rendering style");\r
this.setLayout(borderLayout1);\r
jPanel3.setBorder(BorderFactory.createEtchedBorder());\r
- jPanel2.add(lineart);\r
jPanel2.add(text);\r
+ jPanel2.add(lineart);\r
jPanel2.add(askAgain);\r
jPanel1.add(ok);\r
jPanel1.add(cancel);\r
public void ok_actionPerformed(ActionEvent e)\r
{\r
if (lineart.isSelected())\r
+ {\r
value = "Lineart";\r
+ }\r
else\r
+ {\r
value = "Text";\r
+ }\r
\r
if (!askAgain.isSelected())\r
{\r
jalview.bin.Cache.setProperty("EPS_RENDERING", value);\r
}\r
\r
- dialog.hide();\r
+ dialog.setVisible(false);\r
}\r
\r
public void cancel_actionPerformed(ActionEvent e)\r
{\r
cancelled = true;\r
- dialog.hide();\r
+ dialog.setVisible(false);\r
}\r
\r
public String getValue()\r