2 * Jalview - A Sequence Alignment Editor and Viewer
3 * Copyright (C) 2006 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
23 import java.awt.event.ActionListener;
24 import java.awt.event.ActionEvent;
26 public class EPSOptions
30 public boolean cancelled = false;
44 ButtonGroup bg = new ButtonGroup();
48 JOptionPane pane = new JOptionPane(null,
49 JOptionPane.DEFAULT_OPTION, JOptionPane.DEFAULT_OPTION,
50 null, new Object[]{this});
52 dialog = pane.createDialog(Desktop.desktop, "EPS Rendering options");
53 dialog.setVisible(true);
60 lineart.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
61 lineart.setSelected(true);
62 lineart.setText("Lineart");
63 text.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
65 askAgain.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
66 askAgain.setText("Don\'t ask me again");
68 ok.addActionListener(new ActionListener()
70 public void actionPerformed(ActionEvent e)
72 ok_actionPerformed(e);
75 cancel.setText("Cancel");
76 cancel.addActionListener(new ActionListener()
78 public void actionPerformed(ActionEvent e)
80 cancel_actionPerformed(e);
83 jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
84 jLabel1.setText("Select EPS character rendering style");
85 this.setLayout(borderLayout1);
86 jPanel3.setBorder(BorderFactory.createEtchedBorder());
89 jPanel2.add(askAgain);
94 this.add(jPanel3, java.awt.BorderLayout.CENTER);
95 this.add(jPanel1, java.awt.BorderLayout.SOUTH);
98 JRadioButton lineart = new JRadioButton();
99 JRadioButton text = new JRadioButton();
100 JCheckBox askAgain = new JCheckBox();
101 JButton ok = new JButton();
102 JButton cancel = new JButton();
103 JPanel jPanel1 = new JPanel();
104 JLabel jLabel1 = new JLabel();
105 JPanel jPanel2 = new JPanel();
106 JPanel jPanel3 = new JPanel();
107 BorderLayout borderLayout1 = new BorderLayout();
109 public void ok_actionPerformed(ActionEvent e)
111 if (lineart.isSelected())
116 if (!askAgain.isSelected())
118 jalview.bin.Cache.applicationProperties.remove("EPS_RENDERING");
122 jalview.bin.Cache.setProperty("EPS_RENDERING", value);
125 dialog.setVisible(false);
128 public void cancel_actionPerformed(ActionEvent e)
131 dialog.setVisible(false);
134 public String getValue()