X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fviewmodel%2FAlignmentViewport.java;h=b62c61c9cffe688064c0fce22f56256aafadf286;hb=79631ef84a124bfefa84c24b85dc77883366ad4a;hp=54215e103d43ebfb909a99ec350f5471588ba10f;hpb=0a5ce6145bb76fc7eb8a5cc2670e20453fbedd29;p=jalview.git diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index 54215e1..b62c61c 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -36,15 +36,15 @@ import jalview.datamodel.Annotation; import jalview.datamodel.CigarArray; import jalview.datamodel.ColumnSelection; import jalview.datamodel.HiddenSequences; -import jalview.datamodel.Profile; -import jalview.datamodel.SearchResults; +import jalview.datamodel.ProfilesI; +import jalview.datamodel.SearchResultsI; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceCollectionI; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; -import jalview.schemes.Blosum62ColourScheme; +import jalview.renderer.ResidueShader; +import jalview.renderer.ResidueShaderI; import jalview.schemes.ColourSchemeI; -import jalview.schemes.PIDColourScheme; import jalview.structure.CommandListener; import jalview.structure.StructureSelectionManager; import jalview.structure.VamsasSource; @@ -78,6 +78,8 @@ import java.util.Map; public abstract class AlignmentViewport implements AlignViewportI, CommandListener, VamsasSource { + protected ViewportPositionProps posProps; + protected ViewStyleI viewStyle = new ViewStyle(); /** @@ -587,9 +589,9 @@ public abstract class AlignmentViewport implements AlignViewportI, return isDataset; } - private Map hiddenRepSequences; - protected ColumnSelection colSel = new ColumnSelection(); + + // protected ColumnSelection colSel = new ColumnSelection(); public boolean autoCalculateConsensus = true; @@ -597,7 +599,7 @@ public abstract class AlignmentViewport implements AlignViewportI, protected boolean ignoreGapsInConsensusCalculation = false; - protected ColourSchemeI globalColourScheme = null; + protected ResidueShaderI residueShading; @Override public void setGlobalColourScheme(ColourSchemeI cs) @@ -605,74 +607,52 @@ public abstract class AlignmentViewport implements AlignViewportI, // TODO: logic refactored from AlignFrame changeColour - // TODO: autorecalc stuff should be changed to rely on the worker system // check to see if we should implement a changeColour(cs) method rather than - // put th logic in here + // put the logic in here // - means that caller decides if they want to just modify state and defer // calculation till later or to do all calculations in thread. // via changecolour - globalColourScheme = cs; - boolean recalc = false; + + /* + * only instantiate alignment colouring once, thereafter update it; + * this means that any conservation or PID threshold settings + * persist when the alignment colour scheme is changed + */ + if (residueShading == null) + { + residueShading = new ResidueShader(viewStyle); + } + residueShading.setColourScheme(cs); + + // TODO: do threshold and increment belong in ViewStyle or ResidueShader? + // ...problem: groups need these, but do not currently have a ViewStyle + if (cs != null) { - recalc = getConservationSelected(); - if (getAbovePIDThreshold() || cs instanceof PIDColourScheme - || cs instanceof Blosum62ColourScheme) - { - recalc = true; - cs.setThreshold(viewStyle.getThreshold(), - ignoreGapsInConsensusCalculation); - } - else - { - cs.setThreshold(0, ignoreGapsInConsensusCalculation); - } - if (recalc) + if (getConservationSelected()) { - cs.setConsensus(hconsensus); - cs.setConservation(hconservation); + residueShading.setConservation(hconservation); } - cs.setConservationApplied(getConservationSelected()); - cs.alignmentChanged(alignment, hiddenRepSequences); + residueShading.alignmentChanged(alignment, getHiddenRepSequences()); } + + /* + * if 'apply colour to all groups' is selected... do so + * (but don't transfer any colour threshold settings to groups) + */ if (getColourAppliesToAllGroups()) { for (SequenceGroup sg : getAlignment().getGroups()) { - if (cs == null) + /* + * retain any colour thresholds per group while + * changing choice of colour scheme (JAL-2386) + */ + sg.setColourScheme(cs); + if (cs != null) { - sg.cs = null; - continue; - } - sg.cs = cs.applyTo(sg, getHiddenRepSequences()); - sg.setConsPercGaps(ConsPercGaps); - if (getAbovePIDThreshold() || cs instanceof PIDColourScheme - || cs instanceof Blosum62ColourScheme) - { - sg.cs.setThreshold(viewStyle.getThreshold(), - isIgnoreGapsConsensus()); - recalc = true; - } - else - { - sg.cs.setThreshold(0, isIgnoreGapsConsensus()); - } - - if (getConservationSelected()) - { - sg.cs.setConservationApplied(true); - recalc = true; - } - else - { - sg.cs.setConservation(null); - // sg.cs.setThreshold(0, getIgnoreGapsConsensus()); - } - if (recalc) - { - sg.recalcConservation(); - } - else - { - sg.cs.alignmentChanged(sg, hiddenRepSequences); + sg.getGroupColourScheme() +.alignmentChanged(sg, + getHiddenRepSequences()); } } } @@ -681,7 +661,14 @@ public abstract class AlignmentViewport implements AlignViewportI, @Override public ColourSchemeI getGlobalColourScheme() { - return globalColourScheme; + return residueShading == null ? null : residueShading + .getColourScheme(); + } + + @Override + public ResidueShaderI getResidueShading() + { + return residueShading; } protected AlignmentAnnotation consensus; @@ -701,7 +688,7 @@ public abstract class AlignmentViewport implements AlignViewportI, /** * results of alignment consensus analysis for visible portion of view */ - protected Profile[] hconsensus = null; + protected ProfilesI hconsensus = null; /** * results of cDNA complement consensus visible portion of view @@ -735,7 +722,7 @@ public abstract class AlignmentViewport implements AlignViewportI, } @Override - public void setSequenceConsensusHash(Profile[] hconsensus) + public void setSequenceConsensusHash(ProfilesI hconsensus) { this.hconsensus = hconsensus; } @@ -747,7 +734,7 @@ public abstract class AlignmentViewport implements AlignViewportI, } @Override - public Profile[] getSequenceConsensusHash() + public ProfilesI getSequenceConsensusHash() { return hconsensus; } @@ -941,7 +928,7 @@ public abstract class AlignmentViewport implements AlignViewportI, hconsensus = null; hcomplementConsensus = null; // colour scheme may hold reference to consensus - globalColourScheme = null; + residueShading = null; // TODO remove listeners from changeSupport? changeSupport = null; setAlignment(null); @@ -1089,7 +1076,8 @@ public abstract class AlignmentViewport implements AlignViewportI, } /** - * Set the selection group for this window. + * Set the selection group for this window. Also sets the current alignment as + * the context for the group, if it does not already have one. * * @param sg * - group holding references to sequences in this alignment view @@ -1099,28 +1087,35 @@ public abstract class AlignmentViewport implements AlignViewportI, public void setSelectionGroup(SequenceGroup sg) { selectionGroup = sg; + if (sg != null && sg.getContext() == null) + { + sg.setContext(alignment); + } } public void setHiddenColumns(ColumnSelection colsel) { - this.colSel = colsel; + posProps.setHiddenColumns(colsel); + // this.colSel = colsel; } @Override public ColumnSelection getColumnSelection() { - return colSel; + return posProps.getColumnSelection(); + // return colSel; } @Override public void setColumnSelection(ColumnSelection colSel) { - this.colSel = colSel; + posProps.setColumnSelection(colSel); + /*this.colSel = colSel; if (colSel != null) { updateHiddenColumns(); } - isColSelChanged(true); + isColSelChanged(true);*/ } /** @@ -1130,14 +1125,14 @@ public abstract class AlignmentViewport implements AlignViewportI, @Override public Map getHiddenRepSequences() { - return hiddenRepSequences; + return posProps.getHiddenRepSequences(); } @Override public void setHiddenRepSequences( Map hiddenRepSequences) { - this.hiddenRepSequences = hiddenRepSequences; + posProps.getHiddenRepSequences(); } @Override @@ -1150,7 +1145,8 @@ public abstract class AlignmentViewport implements AlignViewportI, @Override public boolean hasHiddenColumns() { - return colSel != null && colSel.hasHiddenColumns(); + return posProps.hasHiddenColumns(); + // return colSel != null && colSel.hasHiddenColumns(); } public void updateHiddenColumns() @@ -1211,16 +1207,16 @@ public abstract class AlignmentViewport implements AlignViewportI, if (ap != null) { updateConsensus(ap); - if (globalColourScheme != null) + if (residueShading != null) { - globalColourScheme.setThreshold(globalColourScheme.getThreshold(), + residueShading.setThreshold(residueShading.getThreshold(), ignoreGapsInConsensusCalculation); } } } - private long sgrouphash = -1, colselhash = -1; + private long sgrouphash = -1; /** * checks current SelectionGroup against record of last hash value, and @@ -1256,7 +1252,8 @@ public abstract class AlignmentViewport implements AlignViewportI, */ public boolean isColSelChanged(boolean b) { - int hc = (colSel == null || colSel.isEmpty()) ? -1 : colSel.hashCode(); + return posProps.isColSelChanged(b); + /*int hc = (colSel == null || colSel.isEmpty()) ? -1 : colSel.hashCode(); if (hc != -1 && hc != colselhash) { if (b) @@ -1265,7 +1262,7 @@ public abstract class AlignmentViewport implements AlignViewportI, } return true; } - return false; + return false;*/ } @Override @@ -1296,14 +1293,13 @@ public abstract class AlignmentViewport implements AlignViewportI, */ private boolean followHighlight = true; - // TODO private with getters and setters? - public int startRes; + /*private int startRes; - public int endRes; + private int endRes; - public int startSeq; + private int startSeq; - public int endSeq; + private int endSeq;*/ /** * Property change listener for changes in alignment @@ -1347,6 +1343,21 @@ public abstract class AlignmentViewport implements AlignViewportI, // common hide/show column stuff + public void hideColumns(int start, int end) + { + posProps.hideColumns(start, end); + } + + public void showColumn(int col) + { + posProps.showColumn(col); + } + + public void showAllHiddenColumns() + { + posProps.showAllHiddenColumns(); + } + public void hideSelectedColumns() { if (colSel.isEmpty()) @@ -1359,61 +1370,41 @@ public abstract class AlignmentViewport implements AlignViewportI, isColSelChanged(true); } - public void hideColumns(int start, int end) - { - if (start == end) - { - colSel.hideColumns(start); - } - else - { - colSel.hideColumns(start, end); - } - isColSelChanged(true); - } - - public void showColumn(int col) - { - colSel.revealHiddenColumns(col); - isColSelChanged(true); - } - public void showAllHiddenColumns() - { - colSel.revealAllHiddenColumns(); - isColSelChanged(true); - } // common hide/show seq stuff public void showAllHiddenSeqs() { - if (alignment.getHiddenSequences().getSize() > 0) - { - if (selectionGroup == null) - { - selectionGroup = new SequenceGroup(); - selectionGroup.setEndRes(alignment.getWidth() - 1); - } - List tmp = alignment.getHiddenSequences().showAll( - hiddenRepSequences); - for (SequenceI seq : tmp) - { - selectionGroup.addSequence(seq, false); - setSequenceAnnotationsVisible(seq, true); - } + selectionGroup = posProps.showAllHiddenSeqs(selectionGroup); + + /* if (alignment.getHiddenSequences().getSize() > 0) + { + if (selectionGroup == null) + { + selectionGroup = new SequenceGroup(); + selectionGroup.setEndRes(alignment.getWidth() - 1); + } + List tmp = alignment.getHiddenSequences().showAll( + hiddenRepSequences); + for (SequenceI seq : tmp) + { + selectionGroup.addSequence(seq, false); + setSequenceAnnotationsVisible(seq, true); + } - hiddenRepSequences = null; + hiddenRepSequences = null; - firePropertyChange("alignment", null, alignment.getSequences()); - // used to set hasHiddenRows/hiddenRepSequences here, after the property - // changed event - sendSelection(); - } + firePropertyChange("alignment", null, alignment.getSequences()); + // used to set hasHiddenRows/hiddenRepSequences here, after the property + // changed event + sendSelection(); + }*/ } public void showSequence(int index) { - List tmp = alignment.getHiddenSequences().showSequence( + posProps.showSequence(index, selectionGroup); + /*List tmp = alignment.getHiddenSequences().showSequence( index, hiddenRepSequences); if (tmp.size() > 0) { @@ -1430,12 +1421,13 @@ public abstract class AlignmentViewport implements AlignViewportI, } firePropertyChange("alignment", null, alignment.getSequences()); sendSelection(); - } + }*/ } public void hideAllSelectedSeqs() { - if (selectionGroup == null || selectionGroup.getSize() < 1) + posProps.hideAllSelectedSeqs(selectionGroup); + /*if (selectionGroup == null || selectionGroup.getSize() < 1) { return; } @@ -1444,12 +1436,13 @@ public abstract class AlignmentViewport implements AlignViewportI, hideSequence(seqs); - setSelectionGroup(null); + setSelectionGroup(null);*/ } public void hideSequence(SequenceI[] seq) { - if (seq != null) + posProps.hideSequence(seq); + /*if (seq != null) { for (int i = 0; i < seq.length; i++) { @@ -1457,7 +1450,7 @@ public abstract class AlignmentViewport implements AlignViewportI, setSequenceAnnotationsVisible(seq[i], false); } firePropertyChange("alignment", null, alignment.getSequences()); - } + }*/ } /** @@ -1471,7 +1464,8 @@ public abstract class AlignmentViewport implements AlignViewportI, */ public void hideSequences(SequenceI sequence, boolean representGroup) { - if (selectionGroup == null || selectionGroup.getSize() < 1) + posProps.hideSequences(sequence, representGroup, selectionGroup); + /*if (selectionGroup == null || selectionGroup.getSize() < 1) { hideSequence(new SequenceI[] { sequence }); return; @@ -1490,33 +1484,14 @@ public abstract class AlignmentViewport implements AlignViewportI, hideSequence(hseqs); setSelectionGroup(null); - sendSelection(); + sendSelection();*/ } - /** - * Set visibility for any annotations for the given sequence. - * - * @param sequenceI - */ - protected void setSequenceAnnotationsVisible(SequenceI sequenceI, - boolean visible) - { - AlignmentAnnotation[] anns = alignment.getAlignmentAnnotation(); - if (anns != null) - { - for (AlignmentAnnotation ann : anns) - { - if (ann.sequenceRef == sequenceI) - { - ann.visible = visible; - } - } - } - } public void hideRepSequences(SequenceI repSequence, SequenceGroup sg) { - int sSize = sg.getSize(); + posProps.hideRepSequences(repSequence, sg); + /*int sSize = sg.getSize(); if (sSize < 2) { return; @@ -1546,7 +1521,7 @@ public abstract class AlignmentViewport implements AlignViewportI, } sg.setSeqrep(repSequence); // note: not done in 2.7applet sg.setHidereps(true); // note: not done in 2.7applet - hideSequence(seqs); + hideSequence(seqs);*/ } @@ -1576,8 +1551,9 @@ public abstract class AlignmentViewport implements AlignViewportI, */ public boolean isHiddenRepSequence(SequenceI seq) { - return (hiddenRepSequences != null && hiddenRepSequences - .containsKey(seq)); + return posProps.isHiddenRepSequence(seq); + // return (hiddenRepSequences != null && hiddenRepSequences + // .containsKey(seq)); } /** @@ -1588,21 +1564,24 @@ public abstract class AlignmentViewport implements AlignViewportI, */ public SequenceGroup getRepresentedSequences(SequenceI seq) { - return (SequenceGroup) (hiddenRepSequences == null ? null - : hiddenRepSequences.get(seq)); + return posProps.getRepresentedSequences(seq); + // return (SequenceGroup) (hiddenRepSequences == null ? null + // : hiddenRepSequences.get(seq)); } @Override public int adjustForHiddenSeqs(int alignmentIndex) { - return alignment.getHiddenSequences().adjustForHiddenSeqs( - alignmentIndex); + return posProps.adjustForHiddenSeqs(alignmentIndex); + // return alignment.getHiddenSequences().adjustForHiddenSeqs( + // alignmentIndex); } @Override public void invertColumnSelection() { - colSel.invertColumnSelection(0, alignment.getWidth()); + posProps.invertColumnSelection(); + // colSel.invertColumnSelection(0, alignment.getWidth()); } @Override @@ -1650,7 +1629,7 @@ public abstract class AlignmentViewport implements AlignViewportI, @Override public CigarArray getViewAsCigars(boolean selectedRegionOnly) { - return new CigarArray(alignment, colSel, + return new CigarArray(alignment, posProps.getColumnSelection(), (selectedRegionOnly ? selectionGroup : null)); } @@ -1665,8 +1644,8 @@ public abstract class AlignmentViewport implements AlignViewportI, public jalview.datamodel.AlignmentView getAlignmentView( boolean selectedOnly, boolean markGroups) { - return new AlignmentView(alignment, colSel, selectionGroup, - colSel != null && colSel.hasHiddenColumns(), selectedOnly, + return new AlignmentView(alignment, posProps.getColumnSelection(), + selectionGroup, posProps.hasHiddenColumns(), selectedOnly, markGroups); } @@ -1710,9 +1689,9 @@ public abstract class AlignmentViewport implements AlignViewportI, } selection = new String[iSize]; - if (colSel != null && colSel.hasHiddenColumns()) + if (posProps.hasHiddenColumns()) { - selection = colSel.getVisibleSequenceStrings(start, end, seqs); + selection = posProps.getVisibleSequenceStrings(start, end, seqs); } else { @@ -1728,49 +1707,52 @@ public abstract class AlignmentViewport implements AlignViewportI, @Override public List getVisibleRegionBoundaries(int min, int max) { - ArrayList regions = new ArrayList(); - int start = min; - int end = max; + return posProps.getVisibleRegionBoundaries(min, max); + /* ArrayList regions = new ArrayList(); + int start = min; + int end = max; - do - { - if (colSel != null && colSel.hasHiddenColumns()) - { - if (start == 0) + do { - start = colSel.adjustForHiddenColumns(start); - } - - end = colSel.getHiddenBoundaryRight(start); - if (start == end) - { - end = max; - } - if (end > max) - { - end = max; - } - } + if (colSel != null && colSel.hasHiddenColumns()) + { + if (start == 0) + { + start = colSel.adjustForHiddenColumns(start); + } + + end = colSel.getHiddenBoundaryRight(start); + if (start == end) + { + end = max; + } + if (end > max) + { + end = max; + } + } - regions.add(new int[] { start, end }); + regions.add(new int[] { start, end }); - if (colSel != null && colSel.hasHiddenColumns()) - { - start = colSel.adjustForHiddenColumns(end); - start = colSel.getHiddenBoundaryLeft(start) + 1; - } - } while (end < max); + if (posProps.hasHiddenColumns()) + { + start = colSel.adjustForHiddenColumns(end); + start = colSel.getHiddenBoundaryLeft(start) + 1; + } + } while (end < max); - int[][] startEnd = new int[regions.size()][2]; + int[][] startEnd = new int[regions.size()][2]; - return regions; + return regions;*/ } @Override public List getVisibleAlignmentAnnotation( boolean selectedOnly) { - ArrayList ala = new ArrayList(); + return posProps.getVisibleAlignmentAnnotation(selectedOnly, + selectionGroup); + /*ArrayList ala = new ArrayList(); AlignmentAnnotation[] aa; if ((aa = alignment.getAlignmentAnnotation()) != null) { @@ -1789,7 +1771,7 @@ public abstract class AlignmentViewport implements AlignViewportI, ala.add(clone); } } - return ala; + return ala;*/ } @Override @@ -1849,7 +1831,7 @@ public abstract class AlignmentViewport implements AlignViewportI, selectionGroup.setEndRes(alWidth - 1); } - resetAllColourSchemes(); + updateAllColourSchemes(); calculator.restartWorkers(); // alignment.adjustSequenceAnnotations(); } @@ -1857,17 +1839,17 @@ public abstract class AlignmentViewport implements AlignViewportI, /** * reset scope and do calculations for all applied colourschemes on alignment */ - void resetAllColourSchemes() + void updateAllColourSchemes() { - ColourSchemeI cs = globalColourScheme; - if (cs != null) + ResidueShaderI rs = residueShading; + if (rs != null) { - cs.alignmentChanged(alignment, hiddenRepSequences); + rs.alignmentChanged(alignment, posProps.getHiddenRepSequences()); - cs.setConsensus(hconsensus); - if (cs.conservationApplied()) + rs.setConsensus(hconsensus); + if (rs.conservationApplied()) { - cs.setConservation(Conservation.calculateConservation("All", 3, + rs.setConservation(Conservation.calculateConservation("All", alignment.getSequences(), 0, alignment.getWidth(), false, getConsPercGaps(), false)); } @@ -1877,7 +1859,7 @@ public abstract class AlignmentViewport implements AlignViewportI, { if (sg.cs != null) { - sg.cs.alignmentChanged(sg, hiddenRepSequences); + sg.cs.alignmentChanged(sg, posProps.getHiddenRepSequences()); } sg.recalcConservation(); } @@ -2441,6 +2423,11 @@ public abstract class AlignmentViewport implements AlignViewportI, public void setViewStyle(ViewStyleI settingsForView) { viewStyle = new ViewStyle(settingsForView); + if (residueShading != null) + { + residueShading.setConservationApplied(settingsForView + .isConservationColourSelected()); + } } @Override @@ -2651,35 +2638,46 @@ public abstract class AlignmentViewport implements AlignViewportI, this.followHighlight = b; } + @Override + public ViewportPositionProps getPosProps() + { + return posProps; + } + + @Override public int getStartRes() { - return startRes; + return posProps.getStartRes(); } @Override public int getEndRes() { - return endRes; + return posProps.getEndRes(); } + @Override public int getStartSeq() { - return startSeq; + return posProps.getStartSeq(); } public void setStartRes(int res) { - this.startRes = res; + posProps.setStartRes(res); + // this.startRes = res; } public void setStartSeq(int seq) { - this.startSeq = seq; + posProps.setStartSeq(seq); + // this.startSeq = seq; } public void setEndRes(int res) { - if (res > alignment.getWidth() - 1) + posProps.setEndRes(res); + /*if (res > alignment.getWidth() - 1) { // log.System.out.println(" Corrected res from " + res + " to maximum " + // (alignment.getWidth()-1)); @@ -2689,12 +2687,13 @@ public abstract class AlignmentViewport implements AlignViewportI, { res = 0; } - this.endRes = res; + this.endRes = res;*/ } public void setEndSeq(int seq) { - if (seq > alignment.getHeight()) + posProps.setEndSeq(seq); + /*if (seq > alignment.getHeight()) { seq = alignment.getHeight(); } @@ -2702,12 +2701,14 @@ public abstract class AlignmentViewport implements AlignViewportI, { seq = 0; } - this.endSeq = seq; + this.endSeq = seq;*/ } + @Override public int getEndSeq() { - return endSeq; + return posProps.getEndSeq(); + // return endSeq; } /** @@ -2718,7 +2719,7 @@ public abstract class AlignmentViewport implements AlignViewportI, * the SearchResults to add to * @return the offset (below top of visible region) of the matched sequence */ - protected int findComplementScrollTarget(SearchResults sr) + protected int findComplementScrollTarget(SearchResultsI sr) { final AlignViewportI complement = getCodingComplement(); if (complement == null || !complement.isFollowHighlight()) @@ -2799,7 +2800,11 @@ public abstract class AlignmentViewport implements AlignViewportI, */ public void expandColSelection(SequenceGroup sg, boolean wholewidth) { - int sgs, sge; + if (!this.hasSelectedColumns()) + { + posProps.expandColSelection(sg, wholewidth); + } + /*int sgs, sge; if (sg != null && (sgs = sg.getStartRes()) >= 0 && sg.getStartRes() <= (sge = sg.getEndRes()) && !this.hasSelectedColumns()) @@ -2817,7 +2822,7 @@ public abstract class AlignmentViewport implements AlignViewportI, { colSel.addElement(cspos); } - } + }*/ } /** @@ -2825,6 +2830,7 @@ public abstract class AlignmentViewport implements AlignViewportI, */ private boolean selectionIsDefinedGroup = false; + @Override public boolean isSelectionDefinedGroup() { @@ -2848,4 +2854,27 @@ public abstract class AlignmentViewport implements AlignViewportI, return selectionGroup.getContext() == alignment || selectionIsDefinedGroup; } + + /** + * null, or currently highlighted results on this view + */ + private SearchResultsI searchResults = null; + + @Override + public boolean hasSearchResults() + { + return searchResults != null; + } + + @Override + public void setSearchResults(SearchResultsI results) + { + searchResults = results; + } + + @Override + public SearchResultsI getSearchResults() + { + return searchResults; + } }