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-2698 Cached PDB Entries -> Cached Structures in UI and help doc
[jalview.git]
/
src
/
jalview
/
gui
/
AlignmentPanel.java
diff --git
a/src/jalview/gui/AlignmentPanel.java
b/src/jalview/gui/AlignmentPanel.java
index
c8a0e1a
..
3a1dbe8
100644
(file)
--- a/
src/jalview/gui/AlignmentPanel.java
+++ b/
src/jalview/gui/AlignmentPanel.java
@@
-95,9
+95,6
@@
public class AlignmentPanel extends GAlignmentPanel implements
private AnnotationLabels alabels;
private AnnotationLabels alabels;
- // this value is set false when selection area being dragged
- boolean fastPaint = true;
-
private int hextent = 0;
private int vextent = 0;
private int hextent = 0;
private int vextent = 0;
@@
-212,7
+209,8
@@
public class AlignmentPanel extends GAlignmentPanel implements
alignFrame.updateEditMenuBar();
alignFrame.updateEditMenuBar();
- paintAlignment(true);
+ // no idea if we need to update structure
+ paintAlignment(true, true);
}
}
@@
-241,11
+239,6
@@
public class AlignmentPanel extends GAlignmentPanel implements
getIdPanel().getIdCanvas().setPreferredSize(d);
hscrollFillerPanel.setPreferredSize(d);
getIdPanel().getIdCanvas().setPreferredSize(d);
hscrollFillerPanel.setPreferredSize(d);
- if (this.alignFrame.getSplitViewContainer() != null)
- {
- ((SplitFrame) this.alignFrame.getSplitViewContainer()).adjustLayout();
- }
-
repaint();
}
repaint();
}
@@
-485,7
+478,7
@@
public class AlignmentPanel extends GAlignmentPanel implements
scrollNeeded = ranges.scrollToWrappedVisible(start);
}
scrollNeeded = ranges.scrollToWrappedVisible(start);
}
- paintAlignment(redrawOverview);
+ paintAlignment(redrawOverview, false);
return scrollNeeded;
}
return scrollNeeded;
}
@@
-542,7
+535,9
@@
public class AlignmentPanel extends GAlignmentPanel implements
}
validateAnnotationDimensions(true);
addNotify();
}
validateAnnotationDimensions(true);
addNotify();
- paintAlignment(true);
+ // TODO: many places call this method and also paintAlignment with various
+ // different settings. this means multiple redraws are triggered...
+ paintAlignment(true, false);
}
/**
}
/**
@@
-637,9
+632,9
@@
public class AlignmentPanel extends GAlignmentPanel implements
}
else
{
}
else
{
- int widthInRes = (canvasWidth / av.getCharWidth()) - 1;
+ int widthInRes = (canvasWidth / av.getCharWidth());
int heightInSeq = (getSeqPanel().seqCanvas.getHeight()
int heightInSeq = (getSeqPanel().seqCanvas.getHeight()
- / av.getCharHeight()) - 1;
+ / av.getCharHeight());
ranges.setViewportWidth(widthInRes);
ranges.setViewportHeight(heightInSeq);
ranges.setViewportWidth(widthInRes);
ranges.setViewportHeight(heightInSeq);
@@
-775,10
+770,7
@@
public class AlignmentPanel extends GAlignmentPanel implements
}
ranges.setViewportStartAndHeight(y, height);
}
}
ranges.setViewportStartAndHeight(y, height);
}
- if (!fastPaint)
- {
- repaint();
- }
+ repaint();
}
/**
}
/**
@@
-846,12
+838,12
@@
public class AlignmentPanel extends GAlignmentPanel implements
repaint();
}
repaint();
}
- /**
- * Repaint the alignment including the annotations and overview panels (if
- * shown).
+ /* (non-Javadoc)
+ * @see jalview.api.AlignmentViewPanel#paintAlignment(boolean)
*/
@Override
*/
@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());
@@
-859,10
+851,12
@@
public class AlignmentPanel extends GAlignmentPanel implements
av.getSortAnnotationsBy());
repaint();
av.getSortAnnotationsBy());
repaint();
- if (updateOverview)
+ if (updateStructures)
{
{
- // TODO: determine if this paintAlignment changed structure colours
av.getStructureSelectionManager().sequenceColoursChanged(this);
av.getStructureSelectionManager().sequenceColoursChanged(this);
+ }
+ if (updateOverview)
+ {
if (overviewPanel != null)
{
if (overviewPanel != null)
{
@@
-1616,6
+1610,7
@@
public class AlignmentPanel extends GAlignmentPanel implements
if (annotationPanel != null)
{
annotationPanel.dispose();
if (annotationPanel != null)
{
annotationPanel.dispose();
+ annotationPanel = null;
}
if (av != null)
}
if (av != null)
@@
-1645,9
+1640,15
@@
public class AlignmentPanel extends GAlignmentPanel implements
*/
protected void closeChildFrames()
{
*/
protected void closeChildFrames()
{
+ if (overviewPanel != null)
+ {
+ overviewPanel.dispose();
+ overviewPanel = null;
+ }
if (calculationDialog != null)
{
calculationDialog.closeFrame();
if (calculationDialog != null)
{
calculationDialog.closeFrame();
+ calculationDialog = null;
}
}
}
}
@@
-1877,7
+1878,7
@@
public class AlignmentPanel extends GAlignmentPanel implements
if (adjustHeight)
{
// sort, repaint, update overview
if (adjustHeight)
{
// sort, repaint, update overview
- paintAlignment(true);
+ paintAlignment(true, false);
}
else
{
}
else
{