2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 import jalview.util.MessageManager;
26 import java.awt.event.*;
29 public class EPSOptions extends JPanel
33 public boolean cancelled = false;
42 } catch (Exception ex)
47 ButtonGroup bg = new ButtonGroup();
51 JOptionPane pane = new JOptionPane(null, JOptionPane.DEFAULT_OPTION,
52 JOptionPane.DEFAULT_OPTION, null, new Object[]
55 dialog = pane.createDialog(Desktop.desktop, "EPS Rendering options");
56 dialog.setVisible(true);
60 private void jbInit() throws Exception
62 lineart.setFont(JvSwingUtils.getLabelFont());
63 lineart.setText(MessageManager.getString("label.lineart"));
64 text.setFont(JvSwingUtils.getLabelFont());
65 text.setText(MessageManager.getString("action.text"));
66 text.setSelected(true);
67 askAgain.setFont(JvSwingUtils.getLabelFont());
68 askAgain.setText(MessageManager.getString("label.dont_ask_me_again"));
69 ok.setText(MessageManager.getString("action.ok"));
70 ok.addActionListener(new ActionListener()
72 public void actionPerformed(ActionEvent e)
74 ok_actionPerformed(e);
77 cancel.setText(MessageManager.getString("action.cancel"));
78 cancel.addActionListener(new ActionListener()
80 public void actionPerformed(ActionEvent e)
82 cancel_actionPerformed(e);
85 jLabel1.setFont(JvSwingUtils.getLabelFont());
86 jLabel1.setText(MessageManager
87 .getString("label.select_eps_character_rendering_style"));
88 this.setLayout(borderLayout1);
89 jPanel3.setBorder(BorderFactory.createEtchedBorder());
92 jPanel2.add(askAgain);
97 this.add(jPanel3, java.awt.BorderLayout.CENTER);
98 this.add(jPanel1, java.awt.BorderLayout.SOUTH);
101 JRadioButton lineart = new JRadioButton();
103 JRadioButton text = new JRadioButton();
105 JCheckBox askAgain = new JCheckBox();
107 JButton ok = new JButton();
109 JButton cancel = new JButton();
111 JPanel jPanel1 = new JPanel();
113 JLabel jLabel1 = new JLabel();
115 JPanel jPanel2 = new JPanel();
117 JPanel jPanel3 = new JPanel();
119 BorderLayout borderLayout1 = new BorderLayout();
121 public void ok_actionPerformed(ActionEvent e)
123 if (lineart.isSelected())
132 if (!askAgain.isSelected())
134 jalview.bin.Cache.applicationProperties.remove("EPS_RENDERING");
138 jalview.bin.Cache.setProperty("EPS_RENDERING", value);
141 dialog.setVisible(false);
144 public void cancel_actionPerformed(ActionEvent e)
147 dialog.setVisible(false);
150 public String getValue()