Merge branch 'develop' into trialMerge
[jalview.git] / src / jalview / jbgui / GStructureChooser.java
index 1348e59..3a064d2 100644 (file)
@@ -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,21 +600,21 @@ 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)
     {
       return true;
     }
-    
+
     FTSDataColumnI[] currentWantedFields = pdbDocFieldPrefs
-            .getStructureSummaryFields()
-            .toArray(new FTSDataColumnI[0]);
+            .getStructureSummaryFields().toArray(new FTSDataColumnI[0]);
     return Arrays.equals(currentWantedFields, previousWantedFields) ? false
             : true;
 
@@ -794,6 +794,7 @@ public abstract class GStructureChooser extends JPanel implements
   {
     return tbl_summary;
   }
+
   public JComboBox<FilterOption> getCmbFilterOption()
   {
     return cmb_filterOption;
@@ -801,10 +802,6 @@ public abstract class GStructureChooser extends JPanel implements
 
   protected abstract void stateChanged(ItemEvent e);
 
-  protected abstract void updateCurrentView();
-
-  protected abstract void populateFilterComboBox();
-
   protected abstract void ok_ActionPerformed();
 
   protected abstract void pdbFromFile_actionPerformed();