git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2131bbe
)
JAL-2778 tidy
author
kiramt
<k.mourao@dundee.ac.uk>
Mon, 6 Nov 2017 09:25:18 +0000
(09:25 +0000)
committer
kiramt
<k.mourao@dundee.ac.uk>
Mon, 6 Nov 2017 09:25:18 +0000
(09:25 +0000)
src/jalview/gui/AnnotationPanel.java
patch
|
blob
|
history
src/jalview/gui/IdCanvas.java
patch
|
blob
|
history
src/jalview/gui/ScalePanel.java
patch
|
blob
|
history
src/jalview/gui/SeqCanvas.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/AnnotationPanel.java
b/src/jalview/gui/AnnotationPanel.java
index
0d86b07
..
cf51781
100755
(executable)
--- a/
src/jalview/gui/AnnotationPanel.java
+++ b/
src/jalview/gui/AnnotationPanel.java
@@
-1015,7
+1015,10
@@
public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
fastPaint = true;
fastPaint = true;
- av.getAlignPanel().alignFrame.repaint();
+ // Call repaint on alignment panel so that repaints from other alignment
+ // panel components can be aggregated. Otherwise performance of the overview
+ // window and others may be adversely affected.
+ av.getAlignPanel().repaint();
}
private volatile boolean lastImageGood = false;
}
private volatile boolean lastImageGood = false;
diff --git
a/src/jalview/gui/IdCanvas.java
b/src/jalview/gui/IdCanvas.java
index
1ee281a
..
6c309a2
100755
(executable)
--- a/
src/jalview/gui/IdCanvas.java
+++ b/
src/jalview/gui/IdCanvas.java
@@
-83,7
+83,7
@@
public class IdCanvas extends JPanel implements ViewportListenerI
this.av = av;
PaintRefresher.Register(this, av.getSequenceSetId());
av.getRanges().addPropertyChangeListener(this);
this.av = av;
PaintRefresher.Register(this, av.getSequenceSetId());
av.getRanges().addPropertyChangeListener(this);
- }
+ }
/**
* DOCUMENT ME!
/**
* DOCUMENT ME!
@@
-205,7
+205,10
@@
public class IdCanvas extends JPanel implements ViewportListenerI
fastPaint = true;
fastPaint = true;
- av.getAlignPanel().alignFrame.repaint();
+ // Call repaint on alignment panel so that repaints from other alignment
+ // panel components can be aggregated. Otherwise performance of the overview
+ // window and others may be adversely affected.
+ av.getAlignPanel().repaint();
}
/**
}
/**
@@
-242,8
+245,8
@@
public class IdCanvas extends JPanel implements ViewportListenerI
if (oldHeight != imgHeight || image.getWidth(this) != getWidth())
{
if (oldHeight != imgHeight || image.getWidth(this) != getWidth())
{
- image = new BufferedImage(getWidth(), imgHeight,
- BufferedImage.TYPE_INT_RGB);
+ image = new BufferedImage(getWidth(), imgHeight,
+ BufferedImage.TYPE_INT_RGB);
}
gg = (Graphics2D) image.getGraphics();
}
gg = (Graphics2D) image.getGraphics();
diff --git
a/src/jalview/gui/ScalePanel.java
b/src/jalview/gui/ScalePanel.java
index
e9cb04f
..
b135fc1
100755
(executable)
--- a/
src/jalview/gui/ScalePanel.java
+++ b/
src/jalview/gui/ScalePanel.java
@@
-555,7
+555,11
@@
public class ScalePanel extends JPanel
|| evt.getPropertyName().equals(ViewportRanges.STARTRESANDSEQ))
{
// scroll event, repaint panel
|| evt.getPropertyName().equals(ViewportRanges.STARTRESANDSEQ))
{
// scroll event, repaint panel
- av.getAlignPanel().alignFrame.repaint();
+
+ // Call repaint on alignment panel so that repaints from other alignment
+ // panel components can be aggregated. Otherwise performance of the overview
+ // window and others may be adversely affected.
+ av.getAlignPanel().repaint();
}
}
}
}
diff --git
a/src/jalview/gui/SeqCanvas.java
b/src/jalview/gui/SeqCanvas.java
index
a717a17
..
ce835a3
100755
(executable)
--- a/
src/jalview/gui/SeqCanvas.java
+++ b/
src/jalview/gui/SeqCanvas.java
@@
-40,6
+40,7
@@
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
+import java.awt.Transparency;
import java.awt.image.BufferedImage;
import java.beans.PropertyChangeEvent;
import java.util.List;
import java.awt.image.BufferedImage;
import java.beans.PropertyChangeEvent;
import java.util.List;
@@
-295,7
+296,7
@@
public class SeqCanvas extends JComponent implements ViewportListenerI
int endSeq = ranges.getEndSeq();
int transX = 0;
int transY = 0;
int endSeq = ranges.getEndSeq();
int transX = 0;
int transY = 0;
-
+
gg.copyArea(horizontal * charWidth, vertical * charHeight,
img.getWidth(), img.getHeight(), -horizontal * charWidth,
-vertical * charHeight);
gg.copyArea(horizontal * charWidth, vertical * charHeight,
img.getWidth(), img.getHeight(), -horizontal * charWidth,
-vertical * charHeight);
@@
-337,7
+338,11
@@
public class SeqCanvas extends JComponent implements ViewportListenerI
drawPanel(gg, startRes, endRes, startSeq, endSeq, 0);
gg.translate(-transX, -transY);
drawPanel(gg, startRes, endRes, startSeq, endSeq, 0);
gg.translate(-transX, -transY);
- av.getAlignPanel().alignFrame.repaint();
+ // Call repaint on alignment panel so that repaints from other alignment
+ // panel components can be aggregated. Otherwise performance of the
+ // overview
+ // window and others may be adversely affected.
+ av.getAlignPanel().repaint();
} finally
{
fastpainting = false;
} finally
{
fastpainting = false;
@@
-497,8
+502,11
@@
public class SeqCanvas extends JComponent implements ViewportListenerI
private BufferedImage buildLocalImage(BufferedImage selectImage)
{
// clone the cached image
private BufferedImage buildLocalImage(BufferedImage selectImage)
{
// clone the cached image
- BufferedImage lcimg = new BufferedImage(img.getWidth(), img.getHeight(),
- img.getType());
+ BufferedImage lcimg = new BufferedImage(img.getWidth(), img.getHeight(),
+ img.getType());
+
+ // BufferedImage lcimg = new BufferedImage(img.getWidth(), img.getHeight(),
+ // img.getType());
Graphics2D g2d = lcimg.createGraphics();
g2d.drawImage(img, 0, 0, null);
Graphics2D g2d = lcimg.createGraphics();
g2d.drawImage(img, 0, 0, null);
@@
-537,8
+545,8
@@
public class SeqCanvas extends JComponent implements ViewportListenerI
try
{
try
{
- lcimg = new BufferedImage(width, height,
- BufferedImage.TYPE_INT_ARGB); // ARGB so alpha compositing works
+ lcimg = new BufferedImage(width, height,
+ BufferedImage.TYPE_INT_ARGB); // ARGB so alpha compositing works
} catch (OutOfMemoryError er)
{
System.gc();
} catch (OutOfMemoryError er)
{
System.gc();
@@
-1702,7
+1710,7
@@
public class SeqCanvas extends JComponent implements ViewportListenerI
}
else
{
}
else
{
- fastPaint(scrollX, 0);
+ fastPaint(scrollX, 0);
}
}
else if (eventName.equals(ViewportRanges.STARTSEQ))
}
}
else if (eventName.equals(ViewportRanges.STARTSEQ))