3 import java.awt.event.ActionEvent;
5 import javax.swing.JDialog;
6 import javax.swing.JInternalFrame;
7 import javax.swing.JOptionPane;
9 import jalview.api.AlignExportSettingI;
10 import jalview.jbgui.GAlignExportSettings;
12 @SuppressWarnings("serial")
13 public class AlignExportSettings extends GAlignExportSettings implements
16 protected JInternalFrame frame;
18 boolean cancelled = false;
20 private int width = 450;
22 private int height = 200;
26 public AlignExportSettings(boolean hasHiddenSeq, boolean hasHiddenCols,
27 String alignFileFormat)
29 super(hasHiddenSeq, hasHiddenCols, alignFileFormat);
31 // frame = new JInternalFrame();
32 // frame.setContentPane(this);
33 // frame.setLayer(JLayeredPane.PALETTE_LAYER);
34 // Desktop.addInternalFrame(frame, "Export Settings", width, height);
36 JOptionPane pane = new JOptionPane(null, JOptionPane.DEFAULT_OPTION,
37 JOptionPane.DEFAULT_OPTION, null, new Object[]
39 dialog = pane.createDialog(Desktop.desktop, "Export Settings");
41 // dialog = new JDialog(Desktop.instance, true);
42 // dialog.setTitle("Export Settings");
45 dialog.setVisible(true);
47 dialog.setContentPane(this);
52 // public static void main(String[] args)
54 // new AlignExportSettings(false, false, false);
57 // public void cancel_actionPerformed(ActionEvent e)
61 // frame.setClosed(true);
62 // } catch (Exception ex)
67 public void ok_actionPerformed(ActionEvent e)
70 dialog.setVisible(false);
73 public void cancel_actionPerformed(ActionEvent e)
76 dialog.setVisible(false);
80 public boolean isExportHiddenSequences()
82 return chkHiddenSeqs.isSelected();
86 public boolean isExportHiddenColumns()
88 return chkHiddenCols.isSelected();
92 public boolean isExportAnnotations()
94 return chkExportAnnots.isSelected();
98 public boolean isExportFeatures()
100 return chkExportFeats.isSelected();
104 public boolean isExportGroups()
106 return chkExportGrps.isSelected();
110 public boolean isCancelled()