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
Don't parse input id, leave it as it is
[jalview.git]
/
src
/
jalview
/
gui
/
SeqCanvas.java
diff --git
a/src/jalview/gui/SeqCanvas.java
b/src/jalview/gui/SeqCanvas.java
index
fd19721
..
42424d9
100755
(executable)
--- a/
src/jalview/gui/SeqCanvas.java
+++ b/
src/jalview/gui/SeqCanvas.java
@@
-48,8
+48,6
@@
public class SeqCanvas extends JComponent
int LABEL_WEST;
\r
int LABEL_EAST;
\r
\r
int LABEL_WEST;
\r
int LABEL_EAST;
\r
\r
- boolean isOverview = false;
\r
-
\r
/**
\r
* Creates a new SeqCanvas object.
\r
*
\r
/**
\r
* Creates a new SeqCanvas object.
\r
*
\r
@@
-65,11
+63,28
@@
public class SeqCanvas extends JComponent
setBackground(Color.white);
\r
}
\r
\r
setBackground(Color.white);
\r
}
\r
\r
+ MCview.PDBCanvas pdbCanvas;
\r
+ public SequenceRenderer getSequenceRenderer()
\r
+ {
\r
+ return sr;
\r
+ }
\r
+
\r
public FeatureRenderer getFeatureRenderer()
\r
{
\r
return fr;
\r
}
\r
\r
public FeatureRenderer getFeatureRenderer()
\r
{
\r
return fr;
\r
}
\r
\r
+ public void setPDBCanvas(MCview.PDBCanvas pc)
\r
+ {
\r
+ pdbCanvas = pc;
\r
+ }
\r
+
\r
+ public AlignViewport getViewport()
\r
+ {
\r
+ return av;
\r
+ }
\r
+
\r
+
\r
/**
\r
* DOCUMENT ME!
\r
*
\r
/**
\r
* DOCUMENT ME!
\r
*
\r
@@
-264,18
+279,20
@@
public class SeqCanvas extends JComponent
// Set this to false to force a full panel paint
\r
public void paintComponent(Graphics g)
\r
{
\r
// Set this to false to force a full panel paint
\r
public void paintComponent(Graphics g)
\r
{
\r
+ super.paintComponent(g);
\r
+
\r
sr.renderGaps(av.renderGaps);
\r
\r
sr.renderGaps(av.renderGaps);
\r
\r
- if ((img != null) &&
\r
- (fastPaint || (getWidth() != g.getClipBounds().width) ||
\r
- (getHeight() != g.getClipBounds().height)))
\r
+ if ( img != null && (fastPaint
\r
+ || (getVisibleRect().width != g.getClipBounds().width)
\r
+ || (getVisibleRect().height != g.getClipBounds().height)))
\r
{
\r
g.drawImage(img, 0, 0, this);
\r
fastPaint = false;
\r
{
\r
g.drawImage(img, 0, 0, this);
\r
fastPaint = false;
\r
-
\r
return;
\r
}
\r
\r
return;
\r
}
\r
\r
+
\r
// this draws the whole of the alignment
\r
imgWidth = getWidth();
\r
imgHeight = getHeight();
\r
// this draws the whole of the alignment
\r
imgWidth = getWidth();
\r
imgHeight = getHeight();
\r
@@
-288,7
+305,6
@@
public class SeqCanvas extends JComponent
return;
\r
}
\r
\r
return;
\r
}
\r
\r
-
\r
img = new BufferedImage(imgWidth, imgHeight, BufferedImage.TYPE_INT_RGB);
\r
gg = (Graphics2D) img.getGraphics();
\r
gg.setFont(av.getFont());
\r
img = new BufferedImage(imgWidth, imgHeight, BufferedImage.TYPE_INT_RGB);
\r
gg = (Graphics2D) img.getGraphics();
\r
gg.setFont(av.getFont());
\r
@@
-310,6
+326,12
@@
public class SeqCanvas extends JComponent
}
\r
\r
g.drawImage(img, 0, 0, this);
\r
}
\r
\r
g.drawImage(img, 0, 0, this);
\r
+
\r
+ if (pdbCanvas != null)
\r
+ {
\r
+ pdbCanvas.updateSeqColours();
\r
+ }
\r
+
\r
}
\r
\r
/**
\r
}
\r
\r
/**
\r
@@
-516,6
+538,7
@@
public class SeqCanvas extends JComponent
repaint();
\r
}
\r
\r
repaint();
\r
}
\r
\r
+
\r
synchronized public void drawPanel(Graphics g1, int x1, int x2, int y1,
\r
int y2, int startx, int starty, int offset)
\r
{
\r
synchronized public void drawPanel(Graphics g1, int x1, int x2, int y1,
\r
int y2, int startx, int starty, int offset)
\r
{
\r
@@
-577,7
+600,6
@@
public class SeqCanvas extends JComponent
offset + ( (i - starty) * av.charHeight), av.charWidth,
\r
aaHeight);
\r
\r
offset + ( (i - starty) * av.charHeight), av.charWidth,
\r
aaHeight);
\r
\r
-
\r
/* if(av.getShowTranslation())
\r
{
\r
av.setGlobalColourScheme(new NucleotideColourScheme());
\r
/* if(av.getShowTranslation())
\r
{
\r
av.setGlobalColourScheme(new NucleotideColourScheme());
\r
@@
-592,8
+614,7
@@
public class SeqCanvas extends JComponent
\r
if (av.showSequenceFeatures)
\r
{
\r
\r
if (av.showSequenceFeatures)
\r
{
\r
- fr.drawSequence(g, nextSeq,
\r
- av.alignment.findAllGroups(nextSeq), x1, x2,
\r
+ fr.drawSequence(g, nextSeq, x1, x2,
\r
(x1 - startx) * av.charWidth,
\r
offset + ((i - starty) * av.charHeight), av.charWidth,
\r
av.charHeight);
\r
(x1 - startx) * av.charWidth,
\r
offset + ((i - starty) * av.charHeight), av.charWidth,
\r
av.charHeight);
\r
@@
-617,7
+638,7
@@
public class SeqCanvas extends JComponent
groupIndex = 0;
\r
}
\r
\r
groupIndex = 0;
\r
}
\r
\r
- if (group != null && !isOverview)
\r
+ if (group != null)
\r
{
\r
do
\r
{
\r
{
\r
do
\r
{
\r