JAL-1690 scaleProteinAsCdna new optional attribute on Viewport in
[jalview.git] / src / jalview / appletgui / AnnotationColumnChooser.java
index 496d4a4..0375de2 100644 (file)
@@ -2,7 +2,6 @@ package jalview.appletgui;
 
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.ColumnSelection;
-import jalview.gui.JvSwingUtils;
 import jalview.schemes.AnnotationColourGradient;
 import jalview.util.MessageManager;
 import jalview.viewmodel.annotationfilter.AnnotationFilterParameter;
@@ -30,7 +29,9 @@ import java.awt.event.TextListener;
 import java.util.Iterator;
 import java.util.Vector;
 
-import net.miginfocom.swing.MigLayout;
+import javax.swing.JPanel;
+
+//import net.miginfocom.swing.MigLayout;
 
 public class AnnotationColumnChooser extends AnnotationRowFilter implements
         ActionListener, AdjustmentListener, ItemListener, MouseListener
@@ -55,6 +56,10 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
 
   private BorderLayout borderLayout1 = new BorderLayout();
 
+  private BorderLayout gBorderLayout = new BorderLayout();
+
+  private BorderLayout ngBorderLayout = new BorderLayout();
+
   private Choice threshold = new Choice();
 
   private StructureFilterPanel gStructureFilterPanel;
@@ -186,20 +191,20 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
     slider.setPreferredSize(new Dimension(100, 32));
 
     thresholdPanel.setBackground(Color.white);
-    thresholdPanel.setFont(JvSwingUtils.getLabelFont());
-    thresholdPanel.setLayout(new MigLayout("", "[left][right]", "[][]"));
+    // thresholdPanel.setFont(JvSwingUtils.getLabelFont());
+    // thresholdPanel.setLayout(new MigLayout("", "[left][right]", "[][]"));
 
     actionPanel.setBackground(Color.white);
-    actionPanel.setFont(JvSwingUtils.getLabelFont());
+    // actionPanel.setFont(JvSwingUtils.getLabelFont());
 
-    graphFilterView.setLayout(new MigLayout("", "[left][right]", "[][]"));
+    graphFilterView.setLayout(gBorderLayout);
     graphFilterView.setBackground(Color.white);
 
-    noGraphFilterView.setLayout(new MigLayout("", "[left][right]", "[][]"));
+    noGraphFilterView.setLayout(ngBorderLayout);
     noGraphFilterView.setBackground(Color.white);
 
     annotationComboBoxPanel.setBackground(Color.white);
-    annotationComboBoxPanel.setFont(JvSwingUtils.getLabelFont());
+    // annotationComboBoxPanel.setFont(JvSwingUtils.getLabelFont());
 
     gSearchPanel = new SearchPanel(this);
     ngSearchPanel = new SearchPanel(this);
@@ -209,21 +214,29 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
     ngStructureFilterPanel = new StructureFilterPanel(this);
 
     thresholdPanel.setTitle("Threshold Filter");
-    thresholdPanel.add(getThreshold(), "grow");
-    thresholdPanel.add(thresholdValue, "grow, wrap");
-    thresholdPanel.add(slider, "grow, span, wrap");
+    thresholdPanel.add(getThreshold());
+    thresholdPanel.add(slider);
+    thresholdPanel.add(thresholdValue);
 
     actionPanel.add(ok);
     actionPanel.add(cancel);
 
-    graphFilterView.add(gSearchPanel, "grow, span, wrap");
-    graphFilterView.add(gStructureFilterPanel, "grow, span, wrap");
-    graphFilterView.add(thresholdPanel, "grow, span, wrap");
-    graphFilterView.add(gFurtherActionPanel);
+    JPanel staticPanel = new JPanel();
+    staticPanel.setLayout(new BorderLayout());
+    staticPanel.setBackground(Color.white);
+
+    staticPanel.add(gSearchPanel, java.awt.BorderLayout.NORTH);
+    staticPanel.add(gStructureFilterPanel, java.awt.BorderLayout.SOUTH);
 
-    noGraphFilterView.add(ngSearchPanel, "grow, span, wrap");
-    noGraphFilterView.add(ngStructureFilterPanel, "grow, span, wrap");
-    noGraphFilterView.add(ngFurtherActionPanel);
+    graphFilterView.add(staticPanel, java.awt.BorderLayout.NORTH);
+    graphFilterView.add(thresholdPanel, java.awt.BorderLayout.CENTER);
+    graphFilterView.add(gFurtherActionPanel, java.awt.BorderLayout.SOUTH);
+
+    noGraphFilterView.add(ngSearchPanel, java.awt.BorderLayout.PAGE_START);
+    noGraphFilterView.add(ngStructureFilterPanel,
+            java.awt.BorderLayout.CENTER);
+    noGraphFilterView.add(ngFurtherActionPanel,
+            java.awt.BorderLayout.CENTER);
 
     annotationComboBoxPanel.add(getAnnotations());
     switchableViewsPanel.add(noGraphFilterView,
@@ -643,7 +656,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
 
       this.setBackground(Color.white);
       this.setTitle("Structure Filter");
-      this.setFont(JvSwingUtils.getLabelFont());
+      // this.setFont(JvSwingUtils.getLabelFont());
 
       this.add(all);
       this.add(alphaHelix);
@@ -778,7 +791,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
       description.setEnabled(false);
       description.addItemListener(this);
       this.setTitle("Search Filter");
-      this.setFont(JvSwingUtils.getLabelFont());
+      // this.setFont(JvSwingUtils.getLabelFont());
 
       syncState();
       this.add(searchBox);