2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
3 * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 import java.awt.event.*;
25 public class EPSOptions extends JPanel
29 public boolean cancelled = false;
38 } catch (Exception ex)
43 ButtonGroup bg = new ButtonGroup();
47 JOptionPane pane = new JOptionPane(null, JOptionPane.DEFAULT_OPTION,
48 JOptionPane.DEFAULT_OPTION, null, new Object[]
51 dialog = pane.createDialog(Desktop.desktop, "EPS Rendering options");
52 dialog.setVisible(true);
56 private void jbInit() throws Exception
58 lineart.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
59 lineart.setText("Lineart");
60 text.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
62 text.setSelected(true);
63 askAgain.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
64 askAgain.setText("Don\'t ask me again");
66 ok.addActionListener(new ActionListener()
68 public void actionPerformed(ActionEvent e)
70 ok_actionPerformed(e);
73 cancel.setText("Cancel");
74 cancel.addActionListener(new ActionListener()
76 public void actionPerformed(ActionEvent e)
78 cancel_actionPerformed(e);
81 jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
82 jLabel1.setText("Select EPS character rendering style");
83 this.setLayout(borderLayout1);
84 jPanel3.setBorder(BorderFactory.createEtchedBorder());
87 jPanel2.add(askAgain);
92 this.add(jPanel3, java.awt.BorderLayout.CENTER);
93 this.add(jPanel1, java.awt.BorderLayout.SOUTH);
96 JRadioButton lineart = new JRadioButton();
98 JRadioButton text = new JRadioButton();
100 JCheckBox askAgain = new JCheckBox();
102 JButton ok = new JButton();
104 JButton cancel = new JButton();
106 JPanel jPanel1 = new JPanel();
108 JLabel jLabel1 = new JLabel();
110 JPanel jPanel2 = new JPanel();
112 JPanel jPanel3 = new JPanel();
114 BorderLayout borderLayout1 = new BorderLayout();
116 public void ok_actionPerformed(ActionEvent e)
118 if (lineart.isSelected())
127 if (!askAgain.isSelected())
129 jalview.bin.Cache.applicationProperties.remove("EPS_RENDERING");
133 jalview.bin.Cache.setProperty("EPS_RENDERING", value);
136 dialog.setVisible(false);
139 public void cancel_actionPerformed(ActionEvent e)
142 dialog.setVisible(false);
145 public String getValue()