3 import jalview.api.AlignExportSettingI;
4 import jalview.bin.Jalview;
5 import jalview.jbgui.GAlignExportSettings;
6 import jalview.util.MessageManager;
8 import java.awt.event.ActionEvent;
9 import java.awt.event.WindowAdapter;
10 import java.awt.event.WindowEvent;
12 import javax.swing.JDialog;
13 import javax.swing.JOptionPane;
15 @SuppressWarnings("serial")
16 public class AlignExportSettings extends GAlignExportSettings implements
19 boolean cancelled = false;
23 public AlignExportSettings(boolean hasHiddenSeq, boolean hasHiddenCols,
24 String alignFileFormat)
26 super(hasHiddenSeq, hasHiddenCols, alignFileFormat);
27 if (!Jalview.isHeadlessMode() && isShowDialog())
30 JOptionPane pane = new JOptionPane(null, JOptionPane.DEFAULT_OPTION,
31 JOptionPane.DEFAULT_OPTION, null, new Object[]
33 dialog = pane.createDialog(Desktop.desktop,
34 MessageManager.getString("label.export_settings"));
35 dialog.addWindowListener(new WindowAdapter()
37 public void windowClosing(WindowEvent e)
43 dialog.setVisible(true);
44 dialog.setContentPane(this);
51 public void ok_actionPerformed(ActionEvent e)
54 dialog.setVisible(false);
58 public void cancel_actionPerformed(ActionEvent e)
61 dialog.setVisible(false);
66 public boolean isExportHiddenSequences()
68 return chkHiddenSeqs.isSelected();
72 public boolean isExportHiddenColumns()
74 return chkHiddenCols.isSelected();
78 public boolean isExportAnnotations()
80 return chkExportAnnots.isSelected();
84 public boolean isExportFeatures()
86 return chkExportFeats.isSelected();
90 public boolean isExportGroups()
92 return chkExportGrps.isSelected();
95 public boolean isCancelled()