2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, 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/>.
20 import jalview.util.MessageManager;
23 import java.awt.event.*;
26 public class EPSOptions extends JPanel
30 public boolean cancelled = false;
39 } catch (Exception ex)
44 ButtonGroup bg = new ButtonGroup();
48 JOptionPane pane = new JOptionPane(null, JOptionPane.DEFAULT_OPTION,
49 JOptionPane.DEFAULT_OPTION, null, new Object[]
52 dialog = pane.createDialog(Desktop.desktop, "EPS Rendering options");
53 dialog.setVisible(true);
57 private void jbInit() throws Exception
59 lineart.setFont(JvSwingUtils.getLabelFont());
60 lineart.setText(MessageManager.getString("label.lineart"));
61 text.setFont(JvSwingUtils.getLabelFont());
62 text.setText(MessageManager.getString("action.text"));
63 text.setSelected(true);
64 askAgain.setFont(JvSwingUtils.getLabelFont());
65 askAgain.setText(MessageManager.getString("label.dont_ask_me_again"));
66 ok.setText(MessageManager.getString("action.ok"));
67 ok.addActionListener(new ActionListener()
69 public void actionPerformed(ActionEvent e)
71 ok_actionPerformed(e);
74 cancel.setText(MessageManager.getString("action.cancel"));
75 cancel.addActionListener(new ActionListener()
77 public void actionPerformed(ActionEvent e)
79 cancel_actionPerformed(e);
82 jLabel1.setFont(JvSwingUtils.getLabelFont());
83 jLabel1.setText(MessageManager.getString("label.select_eps_character_rendering_style"));
84 this.setLayout(borderLayout1);
85 jPanel3.setBorder(BorderFactory.createEtchedBorder());
88 jPanel2.add(askAgain);
93 this.add(jPanel3, java.awt.BorderLayout.CENTER);
94 this.add(jPanel1, java.awt.BorderLayout.SOUTH);
97 JRadioButton lineart = new JRadioButton();
99 JRadioButton text = new JRadioButton();
101 JCheckBox askAgain = new JCheckBox();
103 JButton ok = new JButton();
105 JButton cancel = new JButton();
107 JPanel jPanel1 = new JPanel();
109 JLabel jLabel1 = new JLabel();
111 JPanel jPanel2 = new JPanel();
113 JPanel jPanel3 = new JPanel();
115 BorderLayout borderLayout1 = new BorderLayout();
117 public void ok_actionPerformed(ActionEvent e)
119 if (lineart.isSelected())
128 if (!askAgain.isSelected())
130 jalview.bin.Cache.applicationProperties.remove("EPS_RENDERING");
134 jalview.bin.Cache.setProperty("EPS_RENDERING", value);
137 dialog.setVisible(false);
140 public void cancel_actionPerformed(ActionEvent e)
143 dialog.setVisible(false);
146 public String getValue()