int imgWidth = 0;
boolean fastPaint = false;
+ //Used For mouse Dragging and resizing graphs
+ int graphStretch = -1;
+ int graphStretchY = -1;
+
+ boolean mouseDragging=false;
+
public static int GRAPH_HEIGHT = 40;
boolean MAC = false;
{
activeRow = i;
}
+ else if (aa[i].graph > 0)
+ {
+ // Stretch Graph
+ graphStretch = i;
+ graphStretchY = evt.getY();
+ }
+
break;
}
public void mouseReleased(MouseEvent evt)
{
+ graphStretch = -1;
+ graphStretchY = -1;
+ mouseDragging = false;
ap.scalePanel.mouseReleased(evt);
}
public void mouseDragged(MouseEvent evt)
{
- ap.scalePanel.mouseDragged(evt);
+ if (graphStretch > -1)
+ {
+ av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight += graphStretchY
+ - evt.getY();
+ if (av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight < 0)
+ {
+ av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight = 0;
+ }
+ graphStretchY = evt.getY();
+ adjustPanelHeight();
+ ap.paintAlignment(true);
+ }
+ else
+ {
+ ap.scalePanel.mouseDragged(evt);
+ }
}
public void mouseMoved(MouseEvent evt)