X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGStructureChooser.java;h=ec12b262e08852219a6d6e656142322071bae022;hp=1348e5991b0e3295f396fb8b1687a917f8cd5279;hb=33c24a4b371cef971d8728295a24e87fbf6bb5a8;hpb=73fd64da56448bcb2a7771cc174d9d9c62da87ad diff --git a/src/jalview/jbgui/GStructureChooser.java b/src/jalview/jbgui/GStructureChooser.java index 1348e59..ec12b26 100644 --- a/src/jalview/jbgui/GStructureChooser.java +++ b/src/jalview/jbgui/GStructureChooser.java @@ -166,7 +166,7 @@ public abstract class GStructureChooser extends JPanel implements protected JScrollPane scrl_localPDB = new JScrollPane(tbl_local_pdb); - private JTabbedPane pnl_filter = new JTabbedPane(); + protected JTabbedPane pnl_filter = new JTabbedPane(); protected FTSDataColumnPreferences pdbDocFieldPrefs = new FTSDataColumnPreferences( PreferenceSource.STRUCTURE_CHOOSER, @@ -414,7 +414,7 @@ public abstract class GStructureChooser extends JPanel implements @Override public void actionPerformed(ActionEvent e) { - closeAction(); + closeAction(pnl_filter.getHeight()); } }); btn_cancel.addKeyListener(new KeyAdapter() @@ -424,7 +424,7 @@ public abstract class GStructureChooser extends JPanel implements { if (evt.getKeyCode() == KeyEvent.VK_ENTER) { - closeAction(); + closeAction(pnl_filter.getHeight()); } } }); @@ -577,7 +577,7 @@ public abstract class GStructureChooser extends JPanel implements @Override public void internalFrameClosing(InternalFrameEvent e) { - closeAction(); + closeAction(pnl_filter.getHeight()); } }); mainFrame.setVisible(true); @@ -592,7 +592,7 @@ public abstract class GStructureChooser extends JPanel implements Desktop.addInternalFrame(mainFrame, frameTitle, width, height); } - protected void closeAction() + protected void closeAction(int preferredHeight) { // System.out.println(">>>>>>>>>> closing internal frame!!!"); // System.out.println("width : " + mainFrame.getWidth()); @@ -600,11 +600,12 @@ public abstract class GStructureChooser extends JPanel implements // System.out.println("x : " + mainFrame.getX()); // System.out.println("y : " + mainFrame.getY()); tempUserPrefs.put("structureChooser.width", pnl_filter.getWidth()); - tempUserPrefs.put("structureChooser.height", pnl_filter.getHeight()); + tempUserPrefs.put("structureChooser.height", preferredHeight); tempUserPrefs.put("structureChooser.x", mainFrame.getX()); tempUserPrefs.put("structureChooser.y", mainFrame.getY()); mainFrame.dispose(); } + public boolean wantedFieldsUpdated() { if (previousWantedFields == null)