From: amwaterhouse Date: Fri, 1 Sep 2006 12:25:34 +0000 (+0000) Subject: MAC moved to viewport X-Git-Tag: Release_2_1_1~19 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=502eab512b790bcee60cefef90b0c46711a4264d;p=jalview.git MAC moved to viewport --- diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java index 18a4206..0013bc0 100755 --- a/src/jalview/appletgui/AlignViewport.java +++ b/src/jalview/appletgui/AlignViewport.java @@ -101,6 +101,8 @@ public class AlignViewport jalview.bin.JalviewLite applet; + boolean MAC = false; + public AlignViewport(AlignmentI al, JalviewLite applet) { this.applet = applet; @@ -111,6 +113,9 @@ public class AlignViewport this.endSeq = al.getHeight() - 1; setFont(font); + if(System.getProperty("os.name").startsWith("Mac")) + MAC = true; + if (applet != null) { String param = applet.getParameter("showFullId"); @@ -462,7 +467,7 @@ public class AlignViewport java.awt.FontMetrics fm = nullFrame.getGraphics().getFontMetrics(font); setCharHeight(fm.getHeight()); - setCharWidth(fm.charWidth('M')); + charWidth = fm.charWidth('M'); } public Font getFont() @@ -470,11 +475,6 @@ public class AlignViewport return font; } - public void setCharWidth(int w) - { - this.charWidth = w; - } - public int getCharWidth() { return charWidth; diff --git a/src/jalview/appletgui/AlignmentPanel.java b/src/jalview/appletgui/AlignmentPanel.java index dc6b0d5..bcdffa0 100755 --- a/src/jalview/appletgui/AlignmentPanel.java +++ b/src/jalview/appletgui/AlignmentPanel.java @@ -40,7 +40,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener // this value is set false when selection area being dragged boolean fastPaint = true; - boolean MAC = false; + public AlignmentPanel(AlignFrame af, final AlignViewport av) { @@ -53,8 +53,6 @@ public class AlignmentPanel extends Panel implements AdjustmentListener e.printStackTrace(); } - if(System.getProperty("os.name").startsWith("Mac")) - MAC = true; alignFrame = af; this.av = av; @@ -441,7 +439,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener int scrollX = av.startRes - oldX; int scrollY = av.startSeq - oldY; - if (av.getWrapAlignment() || !fastPaint || MAC) + if (av.getWrapAlignment() || !fastPaint || av.MAC) { repaint(); }