2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
3 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
21 import java.awt.event.*;
24 public class EPSOptions extends JPanel
28 public boolean cancelled = false;
37 } catch (Exception ex)
42 ButtonGroup bg = new ButtonGroup();
46 JOptionPane pane = new JOptionPane(null, JOptionPane.DEFAULT_OPTION,
47 JOptionPane.DEFAULT_OPTION, null, new Object[]
50 dialog = pane.createDialog(Desktop.desktop, "EPS Rendering options");
51 dialog.setVisible(true);
55 private void jbInit() throws Exception
57 lineart.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
58 lineart.setText("Lineart");
59 text.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
61 text.setSelected(true);
62 askAgain.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
63 askAgain.setText("Don\'t ask me again");
65 ok.addActionListener(new ActionListener()
67 public void actionPerformed(ActionEvent e)
69 ok_actionPerformed(e);
72 cancel.setText("Cancel");
73 cancel.addActionListener(new ActionListener()
75 public void actionPerformed(ActionEvent e)
77 cancel_actionPerformed(e);
80 jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
81 jLabel1.setText("Select EPS character rendering style");
82 this.setLayout(borderLayout1);
83 jPanel3.setBorder(BorderFactory.createEtchedBorder());
86 jPanel2.add(askAgain);
91 this.add(jPanel3, java.awt.BorderLayout.CENTER);
92 this.add(jPanel1, java.awt.BorderLayout.SOUTH);
95 JRadioButton lineart = new JRadioButton();
97 JRadioButton text = new JRadioButton();
99 JCheckBox askAgain = new JCheckBox();
101 JButton ok = new JButton();
103 JButton cancel = new JButton();
105 JPanel jPanel1 = new JPanel();
107 JLabel jLabel1 = new JLabel();
109 JPanel jPanel2 = new JPanel();
111 JPanel jPanel3 = new JPanel();
113 BorderLayout borderLayout1 = new BorderLayout();
115 public void ok_actionPerformed(ActionEvent e)
117 if (lineart.isSelected())
126 if (!askAgain.isSelected())
128 jalview.bin.Cache.applicationProperties.remove("EPS_RENDERING");
132 jalview.bin.Cache.setProperty("EPS_RENDERING", value);
135 dialog.setVisible(false);
138 public void cancel_actionPerformed(ActionEvent e)
141 dialog.setVisible(false);
144 public String getValue()