JAL-2611 First pass, not thrilled with hidden column behaviour
[jalview.git] / src / jalview / viewmodel / OverviewDimensions.java
index 68318ee..c63fb3c 100644 (file)
@@ -58,6 +58,10 @@ public abstract class OverviewDimensions
 
   protected int alheight;
 
+  protected int transX;
+
+  protected int transY;
+
   /**
    * Create an OverviewDimensions object
    * 
@@ -191,6 +195,15 @@ public abstract class OverviewDimensions
   public abstract void updateViewportFromMouse(int mousex, int mousey,
           HiddenSequences hiddenSeqs, HiddenColumns hiddenCols);
 
+  public abstract void adjustViewportFromMouse(int mousex, int mousey,
+          HiddenSequences hiddenSeqs, HiddenColumns hiddenCols);
+
+  public abstract void setDragPoint(int x, int y,
+          HiddenSequences hiddenSeqs, HiddenColumns hiddenCols);
+
+  protected abstract void updateViewportFromTopLeft(int mousex, int mousey,
+          HiddenSequences hiddenSeqs, HiddenColumns hiddenCols);
+
   /**
    * Set the overview panel's box position to match the viewport
    * 
@@ -239,6 +252,8 @@ public abstract class OverviewDimensions
 
     // boxHeight is the height in sequences translated to pixels
     boxHeight = Math.round((float) vpheight * sequencesHeight / alheight);
+
+    System.out.println("Update box: x: " + boxX);
   }
 
   /**
@@ -252,13 +267,8 @@ public abstract class OverviewDimensions
    */
   public boolean isPositionInBox(int x, int y)
   {
-    return (x > boxX && y > boxY && boxX + x < boxWidth
-            && boxY + y < boxHeight);
-  }
-
-  public void setMousePosition(int x, int y)
-  {
-
+    return (x > boxX && y > boxY && x < boxX + boxWidth
+            && y < boxY + boxHeight);
   }
 
   protected abstract int getLeftXFromCentreX(int mousex, HiddenColumns hidden);