git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2587 Progress bar sizing tweaks
[jalview.git]
/
src
/
jalview
/
gui
/
OverviewCanvas.java
diff --git
a/src/jalview/gui/OverviewCanvas.java
b/src/jalview/gui/OverviewCanvas.java
index
536301e
..
997d214
100644
(file)
--- a/
src/jalview/gui/OverviewCanvas.java
+++ b/
src/jalview/gui/OverviewCanvas.java
@@
-26,7
+26,6
@@
import jalview.viewmodel.OverviewDimensions;
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.AlphaComposite;
import java.awt.Color;
-import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
@@
-169,11
+168,6
@@
public class OverviewCanvas extends JComponent
public void draw(boolean showSequenceFeatures, boolean showAnnotation,
FeatureRenderer transferRenderer)
{
public void draw(boolean showSequenceFeatures, boolean showAnnotation,
FeatureRenderer transferRenderer)
{
- System.out.println(this.getHeight());
- //od.setHeight(this.getHeight());
- //od.setWidth(this.getWidth());
- setPreferredSize(new Dimension(od.getWidth(), od.getHeight()));
-
miniMe = null;
veryLastMiniMe = lastMiniMe;
miniMe = null;
veryLastMiniMe = lastMiniMe;
@@
-217,7
+211,6
@@
public class OverviewCanvas extends JComponent
@Override
public void paintComponent(Graphics g)
{
@Override
public void paintComponent(Graphics g)
{
-
if (restart)
{
if (lastMiniMe == null)
if (restart)
{
if (lastMiniMe == null)
@@
-234,12
+227,12
@@
public class OverviewCanvas extends JComponent
}
else if (lastMiniMe != null)
{
}
else if (lastMiniMe != null)
{
+ // is this a resize?
if ((getWidth() > 0) && (getHeight() > 0)
&& ((getWidth() != od.getWidth())
|| (getHeight() != od.getHeight())))
{
if ((getWidth() > 0) && (getHeight() > 0)
&& ((getWidth() != od.getWidth())
|| (getHeight() != od.getHeight())))
{
- // scale the alignment and annotation separately *** if there is
- // annotation ***
+ // if there is annotation, scale the alignment and annotation separately
if (od.getGraphHeight() > 0)
{
BufferedImage topImage = lastMiniMe.getSubimage(0, 0,
if (od.getGraphHeight() > 0)
{
BufferedImage topImage = lastMiniMe.getSubimage(0, 0,
@@
-277,7
+270,7
@@
public class OverviewCanvas extends JComponent
od.setBoxPosition(av.getAlignment().getHiddenSequences(),
av.getAlignment().getHiddenColumns());
}
od.setBoxPosition(av.getAlignment().getHiddenSequences(),
av.getAlignment().getHiddenColumns());
}
- else
+ else // not a resize
{
if (alpha != 0) // this is a timer triggered dissolve
{
{
if (alpha != 0) // this is a timer triggered dissolve
{
@@
-293,20
+286,12
@@
public class OverviewCanvas extends JComponent
g2d.dispose();
}
g2d.dispose();
}
- /* else if (lastMiniMe != miniMe)
- {
- g.drawImage(lastMiniMe, 0, 0, getWidth(), getHeight(), this);
- g.setColor(TRANS_GREY);
- g.fillRect(0, 0, getWidth(), getHeight());
- }*/
else
{
// fall back to normal behaviour
g.drawImage(lastMiniMe, 0, 0, getWidth(), getHeight(), this);
}
else
{
// fall back to normal behaviour
g.drawImage(lastMiniMe, 0, 0, getWidth(), getHeight(), this);
}
-
}
}
-
}
// draw the box
}
// draw the box