formatting
[jalview.git] / src / jalview / appletgui / AnnotationLabels.java
index 03b4ed1..963efee 100755 (executable)
@@ -107,7 +107,8 @@ public class AnnotationLabels extends Panel implements ActionListener,
   int getSelectedRow(int y)
   {
     int row = -2;
-    AlignmentAnnotation[] aa = ap.av.getAlignment().getAlignmentAnnotation();
+    AlignmentAnnotation[] aa = ap.av.getAlignment()
+            .getAlignmentAnnotation();
 
     if (aa == null)
     {
@@ -228,7 +229,10 @@ public class AnnotationLabels extends Panel implements ActionListener,
 
     if (row > -1)
     {
-      ParseHtmlBodyAndLinks phb = new ParseHtmlBodyAndLinks(av.getAlignment().getAlignmentAnnotation()[row].getDescription(true), true, "\n");
+      ParseHtmlBodyAndLinks phb = new ParseHtmlBodyAndLinks(
+              av.getAlignment().getAlignmentAnnotation()[row]
+                      .getDescription(true),
+              true, "\n");
       if (tooltip == null)
       {
         tooltip = new Tooltip(phb.getNonHtmlContent(), this);
@@ -334,7 +338,7 @@ public class AnnotationLabels extends Panel implements ActionListener,
 
       int end = getSelectedRow(evt.getY() + scrollOffset);
 
-      if (start>-1 && start != end)
+      if (start > -1 && start != end)
       {
         // Swap these annotations
         AlignmentAnnotation startAA = ap.av.getAlignment()
@@ -391,11 +395,12 @@ public class AnnotationLabels extends Panel implements ActionListener,
     {
       return;
     }
-    dragCancelled=false;
+    dragCancelled = false;
     // todo: move below to mouseClicked ?
     selectedRow = getSelectedRow(evt.getY() + scrollOffset);
 
-    AlignmentAnnotation[] aa = ap.av.getAlignment().getAlignmentAnnotation();
+    AlignmentAnnotation[] aa = ap.av.getAlignment()
+            .getAlignmentAnnotation();
 
     // DETECT RIGHT MOUSE BUTTON IN AWT
     if ((evt.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
@@ -505,10 +510,11 @@ public class AnnotationLabels extends Panel implements ActionListener,
                   // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
                 }
               });
-              
+
               popup.add(cprofl);
               final CheckboxMenuItem cprofn = new CheckboxMenuItem(
-                      "Normalise Group Logo", aa[selectedRow].groupRef.isNormaliseSequenceLogo());
+                      "Normalise Group Logo",
+                      aa[selectedRow].groupRef.isNormaliseSequenceLogo());
               cprofn.addItemListener(new ItemListener()
               {
                 public void itemStateChanged(ItemEvent e)
@@ -542,7 +548,10 @@ public class AnnotationLabels extends Panel implements ActionListener,
                   // can be
                   // updated.
                   av.setShowConsensusHistogram(chist.getState());
-                  ap.alignFrame.showConsensusHistogram.setState(chist.getState()); // TODO: implement ap.updateGUI()/alignFrame.updateGUI for applet
+                  ap.alignFrame.showConsensusHistogram.setState(chist
+                          .getState()); // TODO: implement
+                                        // ap.updateGUI()/alignFrame.updateGUI
+                                        // for applet
                   ap.repaint();
                   // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
                 }
@@ -561,7 +570,11 @@ public class AnnotationLabels extends Panel implements ActionListener,
                   // can be
                   // updated.
                   av.setShowSequenceLogo(cprof.getState());
-                  ap.alignFrame.showSequenceLogo.setState(cprof.getState()); // TODO: implement ap.updateGUI()/alignFrame.updateGUI for applet
+                  ap.alignFrame.showSequenceLogo.setState(cprof.getState()); // TODO:
+                                                                             // implement
+                                                                             // ap.updateGUI()/alignFrame.updateGUI
+                                                                             // for
+                                                                             // applet
                   ap.repaint();
                   // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
                 }
@@ -580,7 +593,11 @@ public class AnnotationLabels extends Panel implements ActionListener,
                   // can be
                   // updated.
                   av.setShowSequenceLogo(true);
-                  ap.alignFrame.normSequenceLogo.setState(cprofn.getState()); // TODO: implement ap.updateGUI()/alignFrame.updateGUI for applet
+                  ap.alignFrame.normSequenceLogo.setState(cprofn.getState()); // TODO:
+                                                                              // implement
+                                                                              // ap.updateGUI()/alignFrame.updateGUI
+                                                                              // for
+                                                                              // applet
                   av.setNormaliseSequenceLogo(cprofn.getState());
                   ap.repaint();
                   // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
@@ -688,7 +705,8 @@ public class AnnotationLabels extends Panel implements ActionListener,
   {
     int w = getSize().width;
     int h = getSize().height;
-    if (image == null || w != image.getWidth(this) || h!=image.getHeight(this) )
+    if (image == null || w != image.getWidth(this)
+            || h != image.getHeight(this))
     {
       image = createImage(w, ap.annotationPanel.getSize().height);
     }