X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FStructureViewerBase.java;fp=src%2Fjalview%2Fgui%2FStructureViewerBase.java;h=31c20ed098d55338973deabb3724e2a01d5f000c;hb=0efc6021e63ff62bb2e275501586c1900561b303;hp=3ba9947e5e2477fbbbf1a1f8220b5d34867bb880;hpb=771d1758a42abc6e3e330dd6c5117734acf0067f;p=jalview.git diff --git a/src/jalview/gui/StructureViewerBase.java b/src/jalview/gui/StructureViewerBase.java index 3ba9947..31c20ed 100644 --- a/src/jalview/gui/StructureViewerBase.java +++ b/src/jalview/gui/StructureViewerBase.java @@ -83,18 +83,18 @@ public abstract class StructureViewerBase extends GStructureViewer /** * list of sequenceSet ids associated with the view */ - protected List _aps = new ArrayList(); + protected List _aps = new ArrayList<>(); /** * list of alignment panels to use for superposition */ - protected Vector _alignwith = new Vector(); + protected Vector _alignwith = new Vector<>(); /** * list of alignment panels that are used for colouring structures by aligned * sequences */ - protected Vector _colourwith = new Vector(); + protected Vector _colourwith = new Vector<>(); private String viewId = null; @@ -170,7 +170,7 @@ public abstract class StructureViewerBase extends GStructureViewer { if (_alignwith == null) { - _alignwith = new Vector(); + _alignwith = new Vector<>(); } if (_alignwith.size() == 0 && ap != null) { @@ -310,6 +310,8 @@ public abstract class StructureViewerBase extends GStructureViewer public abstract ViewerType getViewerType(); + protected abstract IProgressIndicator getIProgressIndicator(); + /** * add a new structure (with associated sequences and chains) to this viewer, * retrieving it if necessary first. @@ -460,7 +462,7 @@ public abstract class StructureViewerBase extends GStructureViewer * create the mappings */ apanel.getStructureSelectionManager().setMapping(seq, chains, - pdbFilename, DataSourceType.FILE); + pdbFilename, DataSourceType.FILE, getIProgressIndicator()); /* * alert the FeatureRenderer to show new (PDB RESNUM) features @@ -468,7 +470,9 @@ public abstract class StructureViewerBase extends GStructureViewer if (apanel.getSeqPanel().seqCanvas.fr != null) { apanel.getSeqPanel().seqCanvas.fr.featuresAdded(); - apanel.paintAlignment(true); + // note - we don't do a refresh for structure here because we do it + // explicitly for all panels later on + apanel.paintAlignment(true, false); } /* @@ -717,11 +721,11 @@ public abstract class StructureViewerBase extends GStructureViewer if (_colourwith == null) { - _colourwith = new Vector(); + _colourwith = new Vector<>(); } if (_alignwith == null) { - _alignwith = new Vector(); + _alignwith = new Vector<>(); } ViewSelectionMenu seqColourBy = new ViewSelectionMenu( @@ -888,7 +892,7 @@ public abstract class StructureViewerBase extends GStructureViewer binding.setColourBySequence(seqColour.isSelected()); if (_colourwith == null) { - _colourwith = new Vector(); + _colourwith = new Vector<>(); } if (binding.isColourBySequence()) {