From: hansonr Date: Mon, 13 May 2019 02:11:42 +0000 (-0500) Subject: VARNA fix for use of _border used by JSComponent (how to avoid this?) X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=425ed088d830fbb91f21782b9890c13cc55ce10a;p=jalview.git VARNA fix for use of _border used by JSComponent (how to avoid this?) --- diff --git a/libjs/VARNA-site.zip b/libjs/VARNA-site.zip index cf1c44c..14655e1 100644 Binary files a/libjs/VARNA-site.zip and b/libjs/VARNA-site.zip differ diff --git a/srcjar/fr/orsay/lri/varna/VARNAPanel.java b/srcjar/fr/orsay/lri/varna/VARNAPanel.java index 3ab14b7..4be4e97 100644 --- a/srcjar/fr/orsay/lri/varna/VARNAPanel.java +++ b/srcjar/fr/orsay/lri/varna/VARNAPanel.java @@ -2,7 +2,7 @@ VARNA is a tool for the automated drawing, visualization and annotation of the secondary structure of RNA, designed as a companion software for web servers and databases. Copyright (C) 2012 Kevin Darty, Alain Denise and Yann Ponty. electronic mail : Yann.Ponty@lri.fr - paper mail : LRI, bat 490 Université Paris-Sud 91405 Orsay Cedex France + paper mail : LRI, bat 490 Universit� Paris-Sud 91405 Orsay Cedex France This file is part of VARNA version 3.9. VARNA version 3.9 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -819,7 +819,7 @@ public class VARNAPanel extends JPanel implements PropertyChangeListener { private boolean _highlightAnnotation = false; private int _titleHeight; - private Dimension _border = new Dimension(0, 0); + private Dimension _myBorder = new Dimension(0, 0); private boolean _drawBBox = false; private boolean _drawBorder = false; @@ -2395,7 +2395,7 @@ public class VARNAPanel extends JPanel implements PropertyChangeListener { public void paintComponent(Graphics g, boolean transparentBackground) { if (_premierAffichage) { - // _border = new Dimension(0, 0); + // _myBorder = new Dimension(0, 0); _translation.x = 0; _translation.y = (int) (-getTitleHeight() / 2.0); _popup.buildPopupMenu(); @@ -2580,7 +2580,7 @@ public class VARNAPanel extends JPanel implements PropertyChangeListener { * The new border size */ public void setBorderSize(Dimension b) { - _border = b; + _myBorder = b; } /** @@ -2590,7 +2590,7 @@ public class VARNAPanel extends JPanel implements PropertyChangeListener { * @return The border size */ public Dimension getBorderSize() { - return _border; + return _myBorder; } /** @@ -3553,8 +3553,8 @@ public class VARNAPanel extends JPanel implements PropertyChangeListener { * @return X-coordinate of the translation */ public int getLeftOffset() { - return _border.width - + ((this.getWidth() - 2 * _border.width) - this.getInnerWidth()) + return _myBorder.width + + ((this.getWidth() - 2 * _myBorder.width) - this.getInnerWidth()) / 2 + _translation.x; } @@ -3565,7 +3565,7 @@ public class VARNAPanel extends JPanel implements PropertyChangeListener { */ public int getInnerWidth() { // Largeur du dessin - return (int) Math.round((this.getWidth() - 2 * _border.width) + return (int) Math.round((this.getWidth() - 2 * _myBorder.width) * _conf._zoom); } @@ -3575,8 +3575,8 @@ public class VARNAPanel extends JPanel implements PropertyChangeListener { * @return Y-coordinate of the translation */ public int getTopOffset() { - return _border.height - + ((this.getHeight() - 2 * _border.height) - this + return _myBorder.height + + ((this.getHeight() - 2 * _myBorder.height) - this .getInnerHeight()) / 2 + _translation.y; } @@ -3588,7 +3588,7 @@ public class VARNAPanel extends JPanel implements PropertyChangeListener { public int getInnerHeight() { // Hauteur du dessin return (int) Math.round((this.getHeight()) * _conf._zoom - 2 - * _border.height - getTitleHeight()); + * _myBorder.height - getTitleHeight()); } /**