*/
package jalview.gui;
-import jalview.api.RotatableCanvasI;
-import jalview.datamodel.Point;
-import jalview.datamodel.SequenceGroup;
-import jalview.datamodel.SequenceI;
-import jalview.datamodel.SequencePoint;
-import jalview.math.RotatableMatrix;
-import jalview.math.RotatableMatrix.Axis;
-import jalview.util.ColorUtils;
-import jalview.util.MessageManager;
-import jalview.viewmodel.AlignmentViewport;
-
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import javax.swing.JPanel;
import javax.swing.ToolTipManager;
+import jalview.api.RotatableCanvasI;
+import jalview.datamodel.Point;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.datamodel.SequencePoint;
+import jalview.math.RotatableMatrix;
+import jalview.math.RotatableMatrix.Axis;
+import jalview.util.ColorUtils;
+import jalview.util.MessageManager;
+import jalview.viewmodel.AlignmentViewport;
+
/**
* Models a Panel on which a set of points, and optionally x/y/z axes, can be
* drawn, and rotated or zoomed with the mouse
int midX = getWidth() / 2;
int midY = getHeight() / 2;
- float maxWidth = Math.max(Math.abs(seqMax[0] - seqMin[0]),
- Math.abs(seqMax[1] - seqMin[1]));
+ // float maxWidth = Math.max(Math.abs(seqMax[0] - seqMin[0]),
+ // Math.abs(seqMax[1] - seqMin[1]));
int pix = Math.min(getWidth(), getHeight());
- float scaleBy = pix * getScaleFactor() / (2f * maxWidth);
+ float scaleBy = pix * getScaleFactor() / (2f);
for (int i = 0; i < DIMS; i++)
{
g.drawLine(midX, midY,
- midX + (int) (getAxisEndPoints()[i].x * scaleBy * seqMax[0]),
- midY + (int) (getAxisEndPoints()[i].y * scaleBy * seqMax[1]));
+ midX + (int) (getAxisEndPoints()[i].x * scaleBy * 0.25),
+ midY + (int) (getAxisEndPoints()[i].y * scaleBy * 0.25));
}
}