JAL-2939 field/method naming more consistent
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 30 Mar 2018 14:40:18 +0000 (15:40 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 30 Mar 2018 14:40:18 +0000 (15:40 +0100)
src/jalview/datamodel/SequenceGroup.java
src/jalview/gui/AlignViewport.java
src/jalview/gui/AnnotationLabels.java
src/jalview/viewmodel/AlignmentViewport.java

index 2f524c6..aebcbb3 100755 (executable)
@@ -134,7 +134,7 @@ public class SequenceGroup implements AnnotatedCollectionI
 
   private boolean hmmUseInfoLetterHeight;
 
-  private boolean showHMMSequenceLogo;
+  private boolean hmmShowSequenceLogo;
 
   private boolean hmmNormaliseSequenceLogo;
 
@@ -228,7 +228,7 @@ public class SequenceGroup implements AnnotatedCollectionI
       showSequenceLogo = seqsel.showSequenceLogo;
       normaliseSequenceLogo = seqsel.normaliseSequenceLogo;
       showConsensusHistogram = seqsel.showConsensusHistogram;
-      showHMMSequenceLogo = seqsel.showHMMSequenceLogo;
+      hmmShowSequenceLogo = seqsel.hmmShowSequenceLogo;
       hmmNormaliseSequenceLogo = seqsel.hmmNormaliseSequenceLogo;
       hmmShowHistogram = seqsel.hmmShowHistogram;
       idColour = seqsel.idColour;
@@ -1578,18 +1578,16 @@ public class SequenceGroup implements AnnotatedCollectionI
       // recalcConservation(); TODO don't know what to do here next
     }
     this.hmmShowHistogram = state;
-
   }
 
   public boolean isShowHMMSequenceLogo()
   {
-    return showHMMSequenceLogo;
+    return hmmShowSequenceLogo;
   }
 
-  public void setshowHMMSequenceLogo(boolean state)
+  public void setShowHMMSequenceLogo(boolean state)
   {
-    showHMMSequenceLogo = state;
-
+    hmmShowSequenceLogo = state;
   }
 
   public boolean isNormaliseHMMSequenceLogo()
@@ -1599,7 +1597,7 @@ public class SequenceGroup implements AnnotatedCollectionI
 
   public void setNormaliseHMMSequenceLogo(boolean state)
   {
-    normaliseSequenceLogo = state;
+    hmmNormaliseSequenceLogo = state;
   }
 
   @Override
index 63cbfbd..862c4fb 100644 (file)
@@ -279,6 +279,10 @@ public class AlignViewport extends AlignmentViewport
       showSequenceLogo = Cache.getDefault("SHOW_CONSENSUS_LOGO", false);
       normaliseSequenceLogo = Cache.getDefault("NORMALISE_CONSENSUS_LOGO",
               false);
+      // for now, use consensus options for Information till it gets its own
+      setShowHMMSequenceLogo(showSequenceLogo);
+      setNormaliseHMMSequenceLogo(normaliseSequenceLogo);
+      setShowInformationHistogram(showConsensusHistogram);
       showGroupConsensus = Cache.getDefault("SHOW_GROUP_CONSENSUS", false);
       showConsensus = Cache.getDefault("SHOW_IDENTITY", true);
 
index 2e70ca1..b1a8aff 100755 (executable)
@@ -457,13 +457,15 @@ public class AnnotationLabels extends JPanel
           if (!ann.groupRef.isUseInfoLetterHeight())
           {
             ann.groupRef.setIgnoreBelowBackground(cbmi.getState());
+            // todo and recompute group annotation
           }
         }
         else if (!ap.av.isInfoLetterHeight())
         {
           ap.av.setIgnoreBelowBackground(cbmi.getState(), ap);
+          // todo and recompute annotation
         }
-        ap.alignmentChanged();
+        ap.alignmentChanged(); // todo not like this
       }
     });
     pop.add(cbmi);
@@ -480,11 +482,13 @@ public class AnnotationLabels extends JPanel
         {
           ann.groupRef.setInfoLetterHeight((letterHeight.getState()));
           ann.groupRef.setIgnoreBelowBackground(true);
+          // todo and recompute group annotation
         }
         else
         {
           ap.av.setInfoLetterHeight(letterHeight.getState(), ap);
           ap.av.setIgnoreBelowBackground(true, ap);
+          // todo and recompute annotation
         }
         ap.alignmentChanged();
       }
@@ -513,7 +517,7 @@ public class AnnotationLabels extends JPanel
         @Override
         public void actionPerformed(ActionEvent e)
         {
-          ann.groupRef.setshowHMMSequenceLogo(cprofl.getState());
+          ann.groupRef.setShowHMMSequenceLogo(cprofl.getState());
           ap.repaint();
         }
       });
@@ -529,7 +533,7 @@ public class AnnotationLabels extends JPanel
           ann.groupRef
                   .setNormaliseHMMSequenceLogo(cproflnorm.getState());
           // automatically enable logo display if we're clicked
-          ann.groupRef.setshowHMMSequenceLogo(true);
+          ann.groupRef.setShowHMMSequenceLogo(true);
           ap.repaint();
         }
       });
index 7c0c045..18c2aed 100644 (file)
@@ -1028,17 +1028,17 @@ public abstract class AlignmentViewport
   /**
    * should hmm profile be rendered by default
    */
-  protected boolean showHMMSequenceLogo = false;
+  protected boolean hmmShowSequenceLogo = false;
 
   /**
    * should hmm profile be rendered normalised to row height
    */
-  protected boolean normaliseHMMSequenceLogo = false;
+  protected boolean hmmNormaliseSequenceLogo = false;
 
   /**
    * should information histograms be rendered by default
    */
-  protected boolean showInformationHistogram = true;
+  protected boolean hmmShowHistogram = true;
 
   /**
    * @return the showConsensusProfile
@@ -1055,7 +1055,7 @@ public abstract class AlignmentViewport
   @Override
   public boolean isShowHMMSequenceLogo()
   {
-    return showHMMSequenceLogo;
+    return hmmShowSequenceLogo;
   }
 
   /**
@@ -1078,14 +1078,14 @@ public abstract class AlignmentViewport
 
   public void setShowHMMSequenceLogo(boolean showHMMSequenceLogo)
   {
-    if (showHMMSequenceLogo != this.showHMMSequenceLogo)
+    if (showHMMSequenceLogo != this.hmmShowSequenceLogo)
     {
-      this.showHMMSequenceLogo = showHMMSequenceLogo;
+      this.hmmShowSequenceLogo = showHMMSequenceLogo;
       // TODO: updateAnnotation if description (tooltip) will show
       // profile in place of information content?
       // calculator.updateAnnotationFor(InformationThread.class);
     }
-    this.showHMMSequenceLogo = showHMMSequenceLogo;
+    this.hmmShowSequenceLogo = showHMMSequenceLogo;
   }
 
   /**
@@ -1099,11 +1099,10 @@ public abstract class AlignmentViewport
 
   /**
    * @param showInformationHistogram
-   *          the showInformationHistogram to set
    */
   public void setShowInformationHistogram(boolean showInformationHistogram)
   {
-    this.showInformationHistogram = showInformationHistogram;
+    this.hmmShowHistogram = showInformationHistogram;
   }
 
   /**
@@ -1159,7 +1158,7 @@ public abstract class AlignmentViewport
   @Override
   public boolean isShowInformationHistogram()
   {
-    return this.showInformationHistogram;
+    return this.hmmShowHistogram;
   }
 
   /**
@@ -2275,7 +2274,7 @@ public abstract class AlignmentViewport
           sg.setshowSequenceLogo(showprf);
           sg.setShowConsensusHistogram(showConsHist);
           sg.setNormaliseSequenceLogo(normLogo);
-          sg.setshowHMMSequenceLogo(showHMMPrf);
+          sg.setShowHMMSequenceLogo(showHMMPrf);
           sg.setShowInformationHistogram(showInfoHist);
           sg.setNormaliseHMMSequenceLogo(normHMMLogo);
         }
@@ -3077,11 +3076,11 @@ public abstract class AlignmentViewport
   @Override
   public boolean isNormaliseHMMSequenceLogo()
   {
-    return normaliseHMMSequenceLogo;
+    return hmmNormaliseSequenceLogo;
   }
 
   public void setNormaliseHMMSequenceLogo(boolean state)
   {
-    normaliseHMMSequenceLogo = state;
+    hmmNormaliseSequenceLogo = state;
   }
 }