2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
3 * Copyright (C) 2014 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 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/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 import jalview.util.MessageManager;
24 import java.awt.event.*;
27 public class EPSOptions extends JPanel
31 public boolean cancelled = false;
40 } catch (Exception ex)
45 ButtonGroup bg = new ButtonGroup();
49 JOptionPane pane = new JOptionPane(null, JOptionPane.DEFAULT_OPTION,
50 JOptionPane.DEFAULT_OPTION, null, new Object[]
53 dialog = pane.createDialog(Desktop.desktop, "EPS Rendering options");
54 dialog.setVisible(true);
58 private void jbInit() throws Exception
60 lineart.setFont(JvSwingUtils.getLabelFont());
61 lineart.setText(MessageManager.getString("label.lineart"));
62 text.setFont(JvSwingUtils.getLabelFont());
63 text.setText(MessageManager.getString("action.text"));
64 text.setSelected(true);
65 askAgain.setFont(JvSwingUtils.getLabelFont());
66 askAgain.setText(MessageManager.getString("label.dont_ask_me_again"));
67 ok.setText(MessageManager.getString("action.ok"));
68 ok.addActionListener(new ActionListener()
70 public void actionPerformed(ActionEvent e)
72 ok_actionPerformed(e);
75 cancel.setText(MessageManager.getString("action.cancel"));
76 cancel.addActionListener(new ActionListener()
78 public void actionPerformed(ActionEvent e)
80 cancel_actionPerformed(e);
83 jLabel1.setFont(JvSwingUtils.getLabelFont());
84 jLabel1.setText(MessageManager.getString("label.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();
100 JRadioButton text = new JRadioButton();
102 JCheckBox askAgain = new JCheckBox();
104 JButton ok = new JButton();
106 JButton cancel = new JButton();
108 JPanel jPanel1 = new JPanel();
110 JLabel jLabel1 = new JLabel();
112 JPanel jPanel2 = new JPanel();
114 JPanel jPanel3 = new JPanel();
116 BorderLayout borderLayout1 = new BorderLayout();
118 public void ok_actionPerformed(ActionEvent e)
120 if (lineart.isSelected())
129 if (!askAgain.isSelected())
131 jalview.bin.Cache.applicationProperties.remove("EPS_RENDERING");
135 jalview.bin.Cache.setProperty("EPS_RENDERING", value);
138 dialog.setVisible(false);
141 public void cancel_actionPerformed(ActionEvent e)
144 dialog.setVisible(false);
147 public String getValue()