{
if (av.isSeqNameItalics())
{
- setIdfont(new Font(av.getFont().getName(), Font.ITALIC, av.getFont()
- .getSize()));
+ setIdfont(new Font(av.getFont().getName(), Font.ITALIC,
+ av.getFont().getSize()));
}
else
{
currentColor = Color.black;
currentTextColor = Color.white;
}
- else if ((av.getSelectionGroup() != null)
- && av.getSelectionGroup().getSequences(null)
- .contains(sequence))
+ else if ((av.getSelectionGroup() != null) && av.getSelectionGroup()
+ .getSequences(null).contains(sequence))
{
currentColor = Color.lightGray;
currentTextColor = Color.black;
ViewportRanges ranges = av.getRanges();
- int rowSize = ranges.getEndRes() - ranges.getStartRes();
+ int rowSize = ranges.getViewportWidth();
/*
* draw repeating sequence ids until out of sequence data or
* out of visible space, whichever comes first
*/
int ypos = hgap;
- for (int row = ranges.getStartRes(); (ypos <= getHeight())
- && (row < maxwidth);)
+ int row = ranges.getStartRes();
+ while ((ypos <= getHeight()) && (row < maxwidth))
{
for (int i = starty; i < alheight; i++)
{
void drawMarker(int i, int starty, int yoffset)
{
- SequenceI[] hseqs = av.getAlignment().getHiddenSequences().hiddenSequences;
+ SequenceI[] hseqs = av.getAlignment()
+ .getHiddenSequences().hiddenSequences;
// Use this method here instead of calling hiddenSeq adjust
// 3 times.
int hSize = hseqs.length;
if (below)
{
gg.fillPolygon(
- new int[] { getWidth() - av.getCharHeight(),
+ new int[]
+ { getWidth() - av.getCharHeight(),
getWidth() - av.getCharHeight(), getWidth() },
- new int[] {
- (i - starty) * av.getCharHeight() + yoffset,
+ new int[]
+ { (i - starty) * av.getCharHeight() + yoffset,
(i - starty) * av.getCharHeight() + yoffset
+ av.getCharHeight() / 4,
- (i - starty) * av.getCharHeight() + yoffset }, 3);
+ (i - starty) * av.getCharHeight() + yoffset },
+ 3);
}
if (above)
{
gg.fillPolygon(
- new int[] { getWidth() - av.getCharHeight(),
+ new int[]
+ { getWidth() - av.getCharHeight(),
getWidth() - av.getCharHeight(), getWidth() },
- new int[] {
- (i - starty + 1) * av.getCharHeight() + yoffset,
+ new int[]
+ { (i - starty + 1) * av.getCharHeight() + yoffset,
(i - starty + 1) * av.getCharHeight() + yoffset
- av.getCharHeight() / 4,
- (i - starty + 1) * av.getCharHeight() + yoffset }, 3);
+ (i - starty + 1) * av.getCharHeight() + yoffset },
+ 3);
}
}
void setHiddenFont(SequenceI seq)
{
- Font bold = new Font(av.getFont().getName(), Font.BOLD, av.getFont()
- .getSize());
+ Font bold = new Font(av.getFont().getName(), Font.BOLD,
+ av.getFont().getSize());
if (av.isReferenceSeq(seq) || av.isHiddenRepSequence(seq))
{
{
String propertyName = evt.getPropertyName();
if (propertyName.equals(ViewportRanges.STARTSEQ)
- || (av.getWrapAlignment() && propertyName
- .equals(ViewportRanges.STARTRES)))
+ || (av.getWrapAlignment()
+ && propertyName.equals(ViewportRanges.STARTRES)))
{
fastPaint((int) evt.getNewValue() - (int) evt.getOldValue());
}
+ else if (propertyName.equals(ViewportRanges.STARTRESANDSEQ))
+ {
+ fastPaint(((int[]) evt.getNewValue())[1]
+ - ((int[]) evt.getOldValue())[1]);
+ }
+ else if (propertyName.equals(ViewportRanges.MOVE_VIEWPORT))
+ {
+ repaint();
+ }
}
}