(JAL-969) refactored alignmentViewport base class to own package and pulled up most...
[jalview.git] / src / jalview / appletgui / AnnotationPanel.java
index f068a3c..d533498 100755 (executable)
@@ -113,7 +113,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
    */
   public void actionPerformed(ActionEvent evt)
   {
-    AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();
+    AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
     if (aa == null)
     {
       return;
@@ -129,8 +129,8 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
     }
 
     String label = "";
-    if (av.colSel != null && av.colSel.size() > 0
-            && anot[av.colSel.getMin()] != null)
+    if (av.getColumnSelection() != null && av.getColumnSelection().size() > 0
+            && anot[av.getColumnSelection().getMin()] != null)
       label = anot[av.getColumnSelection().getMin()].displayCharacter;
 
     if (evt.getActionCommand().equals(REMOVE))
@@ -158,7 +158,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
       {
         int index = av.getColumnSelection().columnAt(i);
 
-        if (!av.colSel.isVisible(index))
+        if (!av.getColumnSelection().isVisible(index))
           continue;
 
         if (anot[index] == null)
@@ -180,7 +180,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
       {
         int index = av.getColumnSelection().columnAt(i);
 
-        if (!av.colSel.isVisible(index))
+        if (!av.getColumnSelection().isVisible(index))
           continue;
 
         if (anot[index] == null)
@@ -228,7 +228,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
       {
         int index = av.getColumnSelection().columnAt(i);
 
-        if (!av.colSel.isVisible(index))
+        if (!av.getColumnSelection().isVisible(index))
           continue;
 
         if (anot[index] == null)
@@ -260,7 +260,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
 
   public void mousePressed(MouseEvent evt)
   {
-    AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();
+    AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
     if (aa == null)
     {
       return;
@@ -354,11 +354,11 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
   {
     if (graphStretch > -1)
     {
-      av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight += graphStretchY
+      av.getAlignment().getAlignmentAnnotation()[graphStretch].graphHeight += graphStretchY
               - evt.getY();
-      if (av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight < 0)
+      if (av.getAlignment().getAlignmentAnnotation()[graphStretch].graphHeight < 0)
       {
-        av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight = 0;
+        av.getAlignment().getAlignmentAnnotation()[graphStretch].graphHeight = 0;
       }
       graphStretchY = evt.getY();
       calcPanelHeight();
@@ -373,7 +373,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
 
   public void mouseMoved(MouseEvent evt)
   {
-    AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();
+    AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
     if (aa == null)
     {
       return;
@@ -398,7 +398,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
 
     int res = evt.getX() / av.getCharWidth() + av.getStartRes();
 
-    if (av.hasHiddenColumns)
+    if (av.hasHiddenColumns())
     {
       res = av.getColumnSelection().adjustForHiddenColumns(res);
     }
@@ -448,7 +448,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
   public int calcPanelHeight()
   {
     // setHeight of panels
-    AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();
+    AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
     int height = 0;
 
     if (aa != null)
@@ -498,7 +498,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
   {
     if (activeRow == -1)
     {
-      AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();
+      AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
       if (aa == null)
       {
         return;
@@ -563,8 +563,8 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
 
   public void fastPaint(int horizontal)
   {
-    if (horizontal == 0 || av.alignment.getAlignmentAnnotation() == null
-            || av.alignment.getAlignmentAnnotation().length < 1)
+    if (horizontal == 0 || av.getAlignment().getAlignmentAnnotation() == null
+            || av.getAlignment().getAlignmentAnnotation().length < 1)
     {
       repaint();
       return;
@@ -617,8 +617,8 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen
       fm = g.getFontMetrics();
     }
 
-    if ((av.alignment.getAlignmentAnnotation() == null)
-            || (av.alignment.getAlignmentAnnotation().length < 1))
+    if ((av.getAlignment().getAlignmentAnnotation() == null)
+            || (av.getAlignment().getAlignmentAnnotation().length < 1))
     {
       g.setColor(Color.white);
       g.fillRect(0, 0, getSize().width, getSize().height);