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.api.AlignExportSettingI;
24 import jalview.bin.Jalview;
25 import jalview.io.FileFormatI;
26 import jalview.jbgui.GAlignExportSettings;
27 import jalview.util.MessageManager;
29 import java.awt.event.ActionEvent;
30 import java.awt.event.WindowAdapter;
31 import java.awt.event.WindowEvent;
33 import javax.swing.JDialog;
34 import javax.swing.JOptionPane;
36 @SuppressWarnings("serial")
37 public class AlignExportSettings extends GAlignExportSettings implements
40 boolean cancelled = false;
44 public AlignExportSettings(boolean hasHiddenSeq, boolean hasHiddenCols,
47 super(hasHiddenSeq, hasHiddenCols, format);
48 if (!Jalview.isHeadlessMode() && isShowDialog())
51 JOptionPane pane = new JOptionPane(null, JOptionPane.DEFAULT_OPTION,
52 JvOptionPane.DEFAULT_OPTION, null, new Object[] { this });
53 dialog = pane.createDialog(Desktop.desktop,
54 MessageManager.getString("label.export_settings"));
55 dialog.addWindowListener(new WindowAdapter()
58 public void windowClosing(WindowEvent e)
64 dialog.setVisible(true);
65 dialog.setContentPane(this);
72 public void ok_actionPerformed(ActionEvent e)
75 dialog.setVisible(false);
80 public void cancel_actionPerformed(ActionEvent e)
83 dialog.setVisible(false);
88 public boolean isExportHiddenSequences()
90 return chkHiddenSeqs.isSelected();
94 public boolean isExportHiddenColumns()
96 return chkHiddenCols.isSelected();
100 public boolean isExportAnnotations()
102 return chkExportAnnots.isSelected();
106 public boolean isExportFeatures()
108 return chkExportFeats.isSelected();
112 public boolean isExportGroups()
114 return chkExportGrps.isSelected();
118 public boolean isCancelled()