2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
3 * Copyright (C) 2008 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
29 public boolean cancelled = false;
43 ButtonGroup bg = new ButtonGroup();
47 JOptionPane pane = new JOptionPane(null,
48 JOptionPane.DEFAULT_OPTION,
49 JOptionPane.DEFAULT_OPTION,
53 dialog = pane.createDialog(Desktop.desktop, "EPS Rendering options");
54 dialog.setVisible(true);
61 lineart.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
62 lineart.setText("Lineart");
63 text.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
65 text.setSelected(true);
66 askAgain.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
67 askAgain.setText("Don\'t ask me again");
69 ok.addActionListener(new ActionListener()
71 public void actionPerformed(ActionEvent e)
73 ok_actionPerformed(e);
76 cancel.setText("Cancel");
77 cancel.addActionListener(new ActionListener()
79 public void actionPerformed(ActionEvent e)
81 cancel_actionPerformed(e);
84 jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
85 jLabel1.setText("Select EPS character rendering style");
86 this.setLayout(borderLayout1);
87 jPanel3.setBorder(BorderFactory.createEtchedBorder());
90 jPanel2.add(askAgain);
95 this.add(jPanel3, java.awt.BorderLayout.CENTER);
96 this.add(jPanel1, java.awt.BorderLayout.SOUTH);
99 JRadioButton lineart = new JRadioButton();
100 JRadioButton text = new JRadioButton();
101 JCheckBox askAgain = new JCheckBox();
102 JButton ok = new JButton();
103 JButton cancel = new JButton();
104 JPanel jPanel1 = new JPanel();
105 JLabel jLabel1 = new JLabel();
106 JPanel jPanel2 = new JPanel();
107 JPanel jPanel3 = new JPanel();
108 BorderLayout borderLayout1 = new BorderLayout();
110 public void ok_actionPerformed(ActionEvent e)
112 if (lineart.isSelected())
121 if (!askAgain.isSelected())
123 jalview.bin.Cache.applicationProperties.remove("EPS_RENDERING");
127 jalview.bin.Cache.setProperty("EPS_RENDERING", value);
130 dialog.setVisible(false);
133 public void cancel_actionPerformed(ActionEvent e)
136 dialog.setVisible(false);
139 public String getValue()