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
Merge branch 'doc/JAL-4090_Release_2_11_3_0' into develop
[jalview.git]
/
src
/
jalview
/
appletgui
/
AlignmentPanel.java
diff --git
a/src/jalview/appletgui/AlignmentPanel.java
b/src/jalview/appletgui/AlignmentPanel.java
index
bb26caa
..
71ddcef
100644
(file)
--- a/
src/jalview/appletgui/AlignmentPanel.java
+++ b/
src/jalview/appletgui/AlignmentPanel.java
@@
-46,6
+46,7
@@
import java.awt.event.ComponentEvent;
import java.beans.PropertyChangeEvent;
import java.util.List;
import java.beans.PropertyChangeEvent;
import java.util.List;
+@SuppressWarnings("serial")
public class AlignmentPanel extends Panel
implements AdjustmentListener, AlignmentViewPanel, ViewportListenerI
{
public class AlignmentPanel extends Panel
implements AdjustmentListener, AlignmentViewPanel, ViewportListenerI
{
@@
-344,7
+345,7
@@
public class AlignmentPanel extends Panel
int verticalOffset, boolean redrawOverview, boolean centre)
{
// do we need to scroll the panel?
int verticalOffset, boolean redrawOverview, boolean centre)
{
// do we need to scroll the panel?
- if (results != null && results.getSize() > 0)
+ if (results != null && results.getCount() > 0)
{
AlignmentI alignment = av.getAlignment();
int seqIndex = alignment.findIndex(results);
{
AlignmentI alignment = av.getAlignment();
int seqIndex = alignment.findIndex(results);
@@
-362,7
+363,7
@@
public class AlignmentPanel extends Panel
{
if (JalviewLite.debug)
{// DEBUG
{
if (JalviewLite.debug)
{// DEBUG
- System.out.println(
+ jalview.bin.Console.outPrintln(
"DEBUG: scroll didn't happen - results not within alignment : "
+ seq.getStart() + "," + seq.getEnd());
}
"DEBUG: scroll didn't happen - results not within alignment : "
+ seq.getStart() + "," + seq.getEnd());
}
@@
-372,7
+373,7
@@
public class AlignmentPanel extends Panel
{
// DEBUG
/*
{
// DEBUG
/*
- * System.out.println("DEBUG: scroll: start=" + r[0] +
+ * jalview.bin.Console.outPrintln("DEBUG: scroll: start=" + r[0] +
* " av.getStartRes()=" + av.getStartRes() + " end=" + r[1] +
* " seq.end=" + seq.getEnd() + " av.getEndRes()=" + av.getEndRes() +
* " hextent=" + hextent);
* " av.getStartRes()=" + av.getStartRes() + " end=" + r[1] +
* " seq.end=" + seq.getEnd() + " av.getEndRes()=" + av.getEndRes() +
* " hextent=" + hextent);
@@
-415,14
+416,14
@@
public class AlignmentPanel extends Panel
public boolean scrollTo(int ostart, int end, int seqIndex,
boolean scrollToNearest, boolean redrawOverview)
{
public boolean scrollTo(int ostart, int end, int seqIndex,
boolean scrollToNearest, boolean redrawOverview)
{
- int startv, endv, starts, ends, width;
+ int startv, endv, starts, ends;// , width;
int start = -1;
if (av.hasHiddenColumns())
{
AlignmentI al = av.getAlignment();
int start = -1;
if (av.hasHiddenColumns())
{
AlignmentI al = av.getAlignment();
- start = al.getHiddenColumns().findColumnPosition(ostart);
- end = al.getHiddenColumns().findColumnPosition(end);
+ start = al.getHiddenColumns().absoluteToVisibleColumn(ostart);
+ end = al.getHiddenColumns().absoluteToVisibleColumn(end);
if (start == end)
{
if (!scrollToNearest && !al.getHiddenColumns().isVisible(ostart))
if (start == end)
{
if (!scrollToNearest && !al.getHiddenColumns().isVisible(ostart))
@@
-513,7
+514,7
@@
public class AlignmentPanel extends Panel
vpRanges.scrollToWrappedVisible(start);
}
vpRanges.scrollToWrappedVisible(start);
}
- paintAlignment(redrawOverview);
+ paintAlignment(redrawOverview, false);
return true;
}
return true;
}
@@
-554,7
+555,7
@@
public class AlignmentPanel extends Panel
// this is called after loading new annotation onto alignment
if (alignFrame.getSize().height == 0)
{
// this is called after loading new annotation onto alignment
if (alignFrame.getSize().height == 0)
{
- System.out.println(
+ jalview.bin.Console.outPrintln(
"adjustAnnotationHeight frame size zero NEEDS FIXING");
}
fontChanged();
"adjustAnnotationHeight frame size zero NEEDS FIXING");
}
fontChanged();
@@
-562,7
+563,7
@@
public class AlignmentPanel extends Panel
apvscroll.addNotify();
hscroll.addNotify();
validate();
apvscroll.addNotify();
hscroll.addNotify();
validate();
- paintAlignment(true);
+ paintAlignment(true, false);
}
/**
}
/**
@@
-669,14
+670,9
@@
public class AlignmentPanel extends Panel
}
else
{
}
else
{
- int width = av.getAlignment().getWidth();
+ int width = av.getAlignment().getVisibleWidth();
int height = av.getAlignment().getHeight();
int height = av.getAlignment().getHeight();
- if (av.hasHiddenColumns())
- {
- width = av.getAlignment().getHiddenColumns()
- .findColumnPosition(width);
- }
if (x < 0)
{
x = 0;
if (x < 0)
{
x = 0;
@@
-697,7
+693,7
@@
public class AlignmentPanel extends Panel
if ((hextent + x) > width)
{
if ((hextent + x) > width)
{
- System.err.println("hextent was " + hextent + " and x was " + x);
+ jalview.bin.Console.errPrintln("hextent was " + hextent + " and x was " + x);
x = width - hextent;
}
x = width - hextent;
}
@@
-714,7
+710,7
@@
public class AlignmentPanel extends Panel
if (x < 0)
{
if (x < 0)
{
- System.err.println("x was " + x);
+ jalview.bin.Console.errPrintln("x was " + x);
x = 0;
}
x = 0;
}
@@
-913,7
+909,8
@@
public class AlignmentPanel extends Panel
* Repaint the alignment and annotations, and, optionally, any overview window
*/
@Override
* Repaint the alignment and annotations, and, optionally, any overview window
*/
@Override
- public void paintAlignment(boolean updateOverview)
+ public void paintAlignment(boolean updateOverview,
+ boolean updateStructures)
{
final AnnotationSorter sorter = new AnnotationSorter(getAlignment(),
av.isShowAutocalculatedAbove());
{
final AnnotationSorter sorter = new AnnotationSorter(getAlignment(),
av.isShowAutocalculatedAbove());
@@
-921,13
+918,14
@@
public class AlignmentPanel extends Panel
av.getSortAnnotationsBy());
repaint();
av.getSortAnnotationsBy());
repaint();
- if (updateOverview)
+ if (updateStructures)
{
{
- // TODO: determine if this paintAlignment changed structure colours
jalview.structure.StructureSelectionManager
.getStructureSelectionManager(av.applet)
.sequenceColoursChanged(this);
jalview.structure.StructureSelectionManager
.getStructureSelectionManager(av.applet)
.sequenceColoursChanged(this);
-
+ }
+ if (updateOverview)
+ {
if (overviewPanel != null)
{
overviewPanel.updateOverviewImage();
if (overviewPanel != null)
{
overviewPanel.updateOverviewImage();
@@
-1113,7
+1111,7
@@
public class AlignmentPanel extends Panel
public void raiseOOMWarning(String string, OutOfMemoryError error)
{
// TODO: JAL-960
public void raiseOOMWarning(String string, OutOfMemoryError error)
{
// TODO: JAL-960
- System.err.println("Out of memory whilst '" + string + "'");
+ jalview.bin.Console.errPrintln("Out of memory whilst '" + string + "'");
error.printStackTrace();
}
error.printStackTrace();
}