From 4663ab6ec8142df859d031bff618d78809e22082 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 6 Feb 2015 10:37:52 +0000 Subject: [PATCH] JAL-1640 JAL-966 is for boolean getter on AlignViewportI --- src/jalview/api/AlignViewportI.java | 2 +- src/jalview/appletgui/APopupMenu.java | 4 ++-- src/jalview/appletgui/AnnotationLabels.java | 2 +- src/jalview/appletgui/SliderPanel.java | 2 +- src/jalview/appletgui/TreeCanvas.java | 2 +- src/jalview/appletgui/UserDefinedColours.java | 2 +- src/jalview/gui/AlignFrame.java | 8 ++++---- src/jalview/gui/AlignViewport.java | 2 +- src/jalview/gui/AnnotationLabels.java | 2 +- src/jalview/gui/Jalview2XML.java | 2 +- src/jalview/gui/PopupMenu.java | 4 ++-- src/jalview/gui/SliderPanel.java | 4 +++- src/jalview/gui/TreeCanvas.java | 2 +- src/jalview/gui/UserDefinedColours.java | 2 +- src/jalview/renderer/AnnotationRenderer.java | 2 +- src/jalview/viewmodel/AlignmentViewport.java | 6 +++--- src/jalview/workers/ConsensusThread.java | 2 +- src/jalview/workers/StrucConsensusThread.java | 2 +- 18 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/jalview/api/AlignViewportI.java b/src/jalview/api/AlignViewportI.java index 5d3f89d..fe49488 100644 --- a/src/jalview/api/AlignViewportI.java +++ b/src/jalview/api/AlignViewportI.java @@ -77,9 +77,9 @@ public interface AlignViewportI Hashtable[] getRnaStructureConsensusHash(); - boolean getIgnoreGapsConsensus(); boolean getCentreColumnLabels(); + boolean isIgnoreGapsConsensus(); boolean isCalculationInProgress(AlignmentAnnotation alignmentAnnotation); diff --git a/src/jalview/appletgui/APopupMenu.java b/src/jalview/appletgui/APopupMenu.java index e688177..3b37b62 100644 --- a/src/jalview/appletgui/APopupMenu.java +++ b/src/jalview/appletgui/APopupMenu.java @@ -1023,7 +1023,7 @@ public class APopupMenu extends java.awt.PopupMenu implements int threshold = SliderPanel.setPIDSliderSource(ap, sg.cs, getGroup() .getName()); - sg.cs.setThreshold(threshold, ap.av.getIgnoreGapsConsensus()); + sg.cs.setThreshold(threshold, ap.av.isIgnoreGapsConsensus()); SliderPanel.showPIDSlider(); @@ -1031,7 +1031,7 @@ public class APopupMenu extends java.awt.PopupMenu implements else // remove PIDColouring { - sg.cs.setThreshold(0, ap.av.getIgnoreGapsConsensus()); + sg.cs.setThreshold(0, ap.av.isIgnoreGapsConsensus()); } refresh(); diff --git a/src/jalview/appletgui/AnnotationLabels.java b/src/jalview/appletgui/AnnotationLabels.java index 566be33..fdbf1ff 100755 --- a/src/jalview/appletgui/AnnotationLabels.java +++ b/src/jalview/appletgui/AnnotationLabels.java @@ -482,7 +482,7 @@ public class AnnotationLabels extends Panel implements ActionListener, MessageManager.getString("label.ignore_gaps_consensus"), (aa[selectedRow].groupRef != null) ? aa[selectedRow].groupRef .getIgnoreGapsConsensus() : ap.av - .getIgnoreGapsConsensus()); + .isIgnoreGapsConsensus()); final AlignmentAnnotation aaa = aa[selectedRow]; cbmi.addItemListener(new ItemListener() { diff --git a/src/jalview/appletgui/SliderPanel.java b/src/jalview/appletgui/SliderPanel.java index 220a7fb..2a4d582 100644 --- a/src/jalview/appletgui/SliderPanel.java +++ b/src/jalview/appletgui/SliderPanel.java @@ -215,7 +215,7 @@ public class SliderPanel extends Panel implements ActionListener, } else { - toChange.setThreshold(i, ap.av.getIgnoreGapsConsensus()); + toChange.setThreshold(i, ap.av.isIgnoreGapsConsensus()); } if (allGroups != null && allGroups.hasNext()) { diff --git a/src/jalview/appletgui/TreeCanvas.java b/src/jalview/appletgui/TreeCanvas.java index 745520b..da8f91e 100755 --- a/src/jalview/appletgui/TreeCanvas.java +++ b/src/jalview/appletgui/TreeCanvas.java @@ -639,7 +639,7 @@ public class TreeCanvas extends Panel implements MouseListener, if (cs != null) { cs.setThreshold(av.getGlobalColourScheme().getThreshold(), - av.getIgnoreGapsConsensus()); + av.isIgnoreGapsConsensus()); } } // TODO: cs used to be initialized with a sequence collection and diff --git a/src/jalview/appletgui/UserDefinedColours.java b/src/jalview/appletgui/UserDefinedColours.java index afa6419..6d8933c 100644 --- a/src/jalview/appletgui/UserDefinedColours.java +++ b/src/jalview/appletgui/UserDefinedColours.java @@ -489,7 +489,7 @@ public class UserDefinedColours extends Panel implements ActionListener, UserColourScheme ucs = new UserColourScheme(newColours); if (ap != null) { - ucs.setThreshold(0, ap.av.getIgnoreGapsConsensus()); + ucs.setThreshold(0, ap.av.isIgnoreGapsConsensus()); } if (ap != null) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 974dbad..2b6795b 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -3361,11 +3361,11 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { threshold = SliderPanel.setPIDSliderSource(alignPanel, cs, "Background"); - cs.setThreshold(threshold, viewport.getIgnoreGapsConsensus()); + cs.setThreshold(threshold, viewport.isIgnoreGapsConsensus()); } else { - cs.setThreshold(0, viewport.getIgnoreGapsConsensus()); + cs.setThreshold(0, viewport.isIgnoreGapsConsensus()); } if (viewport.getConservationSelected()) @@ -3428,7 +3428,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, || cs instanceof PIDColourScheme || cs instanceof Blosum62ColourScheme) { - sg.cs.setThreshold(threshold, viewport.getIgnoreGapsConsensus()); + sg.cs.setThreshold(threshold, viewport.isIgnoreGapsConsensus()); sg.cs.setConsensus(AAFrequency.calculate( sg.getSequences(viewport.getHiddenRepSequences()), @@ -3436,7 +3436,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } else { - sg.cs.setThreshold(0, viewport.getIgnoreGapsConsensus()); + sg.cs.setThreshold(0, viewport.isIgnoreGapsConsensus()); } if (viewport.getConservationSelected()) diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index d6bfaf3..a54f9e8 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -296,7 +296,7 @@ public class AlignViewport extends AlignmentViewport implements { globalColourScheme = UserDefinedColours.loadDefaultColours(); ((UserColourScheme) globalColourScheme).setThreshold(0, - getIgnoreGapsConsensus()); + isIgnoreGapsConsensus()); } if (globalColourScheme != null) diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 49ff2e0..f9a9e7e 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -686,7 +686,7 @@ public class AnnotationLabels extends JPanel implements MouseListener, MessageManager.getString("label.ignore_gaps_consensus"), (aa[selectedRow].groupRef != null) ? aa[selectedRow].groupRef .getIgnoreGapsConsensus() : ap.av - .getIgnoreGapsConsensus()); + .isIgnoreGapsConsensus()); final AlignmentAnnotation aaa = aa[selectedRow]; cbmi.addActionListener(new ActionListener() { diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index ce2dd81..1d59ce0 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -1119,7 +1119,7 @@ public class Jalview2XML view.setShowDbRefTooltip(av.isShowDbRefs()); view.setFollowHighlight(av.followHighlight); view.setFollowSelection(av.followSelection); - view.setIgnoreGapsinConsensus(av.getIgnoreGapsConsensus()); + view.setIgnoreGapsinConsensus(av.isIgnoreGapsConsensus()); if (av.getFeaturesDisplayed() != null) { jalview.schemabinding.version2.FeatureSettings fs = new jalview.schemabinding.version2.FeatureSettings(); diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index 8565f9f..bccbf8c 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -2190,14 +2190,14 @@ public class PopupMenu extends JPopupMenu int threshold = SliderPanel.setPIDSliderSource(ap, sg.cs, getGroup() .getName()); - sg.cs.setThreshold(threshold, ap.av.getIgnoreGapsConsensus()); + sg.cs.setThreshold(threshold, ap.av.isIgnoreGapsConsensus()); SliderPanel.showPIDSlider(); } else // remove PIDColouring { - sg.cs.setThreshold(0, ap.av.getIgnoreGapsConsensus()); + sg.cs.setThreshold(0, ap.av.isIgnoreGapsConsensus()); } refresh(); diff --git a/src/jalview/gui/SliderPanel.java b/src/jalview/gui/SliderPanel.java index cbd0d58..f536efc 100755 --- a/src/jalview/gui/SliderPanel.java +++ b/src/jalview/gui/SliderPanel.java @@ -286,13 +286,15 @@ public class SliderPanel extends GSliderPanel } else { - toChange.setThreshold(i, ap.av.getIgnoreGapsConsensus()); + toChange.setThreshold(i, ap.av.isIgnoreGapsConsensus()); } if (allGroups != null && allGroups.hasNext()) { while ((toChange = allGroups.next().cs) == null && allGroups.hasNext()) + { ; + } } else { diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index c5650f5..d921ba4 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -916,7 +916,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, if (cs != null) { cs.setThreshold(av.getGlobalColourScheme().getThreshold(), - av.getIgnoreGapsConsensus()); + av.isIgnoreGapsConsensus()); } } sg.cs = cs; diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index 37824fe..44a633b 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -556,7 +556,7 @@ public class UserDefinedColours extends GUserDefinedColours implements if (ap != null) { - ucs.setThreshold(0, ap.av.getIgnoreGapsConsensus()); + ucs.setThreshold(0, ap.av.isIgnoreGapsConsensus()); } return ucs; diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index d5b2f49..f4e9b1f 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -302,7 +302,7 @@ public class AnnotationRenderer columnSelection = av.getColumnSelection(); hconsensus = av.getSequenceConsensusHash();// hconsensus; hStrucConsensus = av.getRnaStructureConsensusHash(); // hStrucConsensus; - av_ignoreGapsConsensus = av.getIgnoreGapsConsensus(); + av_ignoreGapsConsensus = av.isIgnoreGapsConsensus(); } public int[] getProfileFor(AlignmentAnnotation aa, int column) diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index d94fa5d..152f155 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -530,12 +530,12 @@ public abstract class AlignmentViewport implements AlignViewportI, || cs instanceof Blosum62ColourScheme) { sg.cs.setThreshold(viewStyle.getThreshold(), - getIgnoreGapsConsensus()); + isIgnoreGapsConsensus()); recalc = true; } else { - sg.cs.setThreshold(0, getIgnoreGapsConsensus()); + sg.cs.setThreshold(0, isIgnoreGapsConsensus()); } if (getConservationSelected()) @@ -1055,7 +1055,7 @@ public abstract class AlignmentViewport implements AlignViewportI, } @Override - public boolean getIgnoreGapsConsensus() + public boolean isIgnoreGapsConsensus() { return ignoreGapsInConsensusCalculation; } diff --git a/src/jalview/workers/ConsensusThread.java b/src/jalview/workers/ConsensusThread.java index c754ee3..f940450 100644 --- a/src/jalview/workers/ConsensusThread.java +++ b/src/jalview/workers/ConsensusThread.java @@ -158,7 +158,7 @@ public class ConsensusThread extends AlignCalcWorker implements && hconsensus != null) { AAFrequency.completeConsensus(consensus, hconsensus, 0, - hconsensus.length, alignViewport.getIgnoreGapsConsensus(), + hconsensus.length, alignViewport.isIgnoreGapsConsensus(), alignViewport.isShowSequenceLogo(), nseq); } } diff --git a/src/jalview/workers/StrucConsensusThread.java b/src/jalview/workers/StrucConsensusThread.java index 3230a36..2249081 100644 --- a/src/jalview/workers/StrucConsensusThread.java +++ b/src/jalview/workers/StrucConsensusThread.java @@ -166,7 +166,7 @@ public class StrucConsensusThread extends AlignCalcWorker implements { StructureFrequency.completeConsensus(strucConsensus, hStrucConsensus, 0, hStrucConsensus.length, - alignViewport.getIgnoreGapsConsensus(), + alignViewport.isIgnoreGapsConsensus(), alignViewport.isShowSequenceLogo(), nseq); } } -- 1.7.10.2