JAL-1640 JAL-1551 formatting/imports/remove dead code
authorJim Procter <jprocter@dundee.ac.uk>
Mon, 2 Feb 2015 11:56:54 +0000 (11:56 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Mon, 2 Feb 2015 11:56:54 +0000 (11:56 +0000)
src/jalview/appletgui/AnnotationPanel.java
src/jalview/appletgui/IdCanvas.java
src/jalview/appletgui/IdPanel.java
src/jalview/appletgui/ScalePanel.java
src/jalview/appletgui/SequenceRenderer.java
src/jalview/gui/AlignmentPanel.java
src/jalview/gui/IdCanvas.java
src/jalview/gui/OverviewPanel.java
src/jalview/gui/SequenceRenderer.java
src/jalview/gui/TextColourChooser.java

index 167dd09..1b4c8c4 100755 (executable)
  */
 package jalview.appletgui;
 
-import java.util.*;
-
-import java.awt.*;
-import java.awt.event.*;
-
-import jalview.datamodel.*;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.Annotation;
 import jalview.renderer.AnnotationRenderer;
 import jalview.renderer.AwtRenderPanelI;
 import jalview.util.MessageManager;
 
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Image;
+import java.awt.MenuItem;
+import java.awt.Panel;
+import java.awt.PopupMenu;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.AdjustmentEvent;
+import java.awt.event.AdjustmentListener;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+
 public class AnnotationPanel extends Panel implements AwtRenderPanelI,
         AdjustmentListener, ActionListener, MouseListener,
         MouseMotionListener
@@ -40,8 +54,6 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
 
   int activeRow = -1;
 
-  Vector activeRes;
-
   final String HELIX = "Helix";
 
   final String SHEET = "Sheet";
@@ -140,7 +152,9 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
     if (av.getColumnSelection() != null
             && av.getColumnSelection().size() > 0
             && anot[av.getColumnSelection().getMin()] != null)
+    {
       label = anot[av.getColumnSelection().getMin()].displayCharacter;
+    }
 
     if (evt.getActionCommand().equals(REMOVE))
     {
@@ -168,7 +182,9 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
         int index = av.getColumnSelection().columnAt(i);
 
         if (!av.getColumnSelection().isVisible(index))
+        {
           continue;
+        }
 
         if (anot[index] == null)
         {
@@ -190,7 +206,9 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
         int index = av.getColumnSelection().columnAt(i);
 
         if (!av.getColumnSelection().isVisible(index))
+        {
           continue;
+        }
 
         if (anot[index] == null)
         {
@@ -249,14 +267,15 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
         int index = av.getColumnSelection().columnAt(i);
 
         if (!av.getColumnSelection().isVisible(index))
+        {
           continue;
+        }
 
         if (anot[index] == null)
         {
           anot[index] = new Annotation(label, "", type, 0);
         }
 
-        
         anot[index].secondaryStructure = type != 'S' ? type : label
                 .length() == 0 ? ' ' : label.charAt(0);
         anot[index].displayCharacter = label;
@@ -278,9 +297,13 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
             ap.alignFrame, "Enter Label", 400, 200, true);
 
     if (dialog.accept)
+    {
       return dialog.getName();
+    }
     else
+    {
       return null;
+    }
   }
 
   @Override
@@ -363,11 +386,6 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
       return;
     }
 
-    if (aa == null)
-    {
-      return;
-    }
-
     ap.scalePanel.mousePressed(evt);
   }
 
@@ -513,15 +531,6 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
         }
       }
     }
-
-    if (activeRes == null)
-    {
-      activeRes = new Vector();
-      activeRes.addElement(String.valueOf(i));
-      return;
-    }
-
-    activeRes.addElement(String.valueOf(i));
   }
 
   @Override
@@ -684,6 +693,8 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
       return bounds;
     }
     else
+    {
       return null;
+    }
   }
 }
index 83b69eb..9e7373c 100755 (executable)
  */
 package jalview.appletgui;
 
-import java.awt.*;
-import java.util.List;
+import jalview.datamodel.SequenceI;
 
-import jalview.datamodel.*;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Image;
+import java.awt.Panel;
+import java.util.List;
 
 public class IdCanvas extends Panel
 {
index 547a4f9..958f49a 100755 (executable)
  */
 package jalview.appletgui;
 
-import java.awt.*;
-import java.awt.event.*;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.util.UrlLink;
+
+import java.awt.BorderLayout;
+import java.awt.Panel;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
 import java.util.List;
 import java.util.Vector;
 
-import jalview.datamodel.*;
-import jalview.util.UrlLink;
-
 public class IdPanel extends Panel implements MouseListener,
         MouseMotionListener
 {
index a8090a1..b5241a6 100755 (executable)
@@ -362,7 +362,6 @@ public class ScalePanel extends Panel implements MouseMotionListener,
           int height)
   {
     gg.setFont(av.getFont());
-
     // Fill in the background
     gg.setColor(Color.white);
     gg.fillRect(0, 0, width, height);
index d9a0d2a..19b038a 100755 (executable)
@@ -21,7 +21,6 @@
 package jalview.appletgui;
 
 import jalview.api.FeatureRenderer;
-import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
 import jalview.schemes.ColourSchemeI;
index 0508f44..add0460 100644 (file)
@@ -1015,7 +1015,6 @@ public class AlignmentPanel extends GAlignmentPanel implements
   public int printWrappedAlignment(Graphics pg, int pwidth, int pheight,
           int pi) throws PrinterException
   {
-
     int annotationHeight = 0;
     AnnotationLabels labels = null;
     if (av.isShowAnnotation())
index 5801423..c174a0e 100755 (executable)
  */
 package jalview.gui;
 
-import java.awt.*;
-import java.awt.image.*;
+import jalview.datamodel.SequenceI;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.image.BufferedImage;
 import java.util.List;
 
-import javax.swing.*;
-
-import jalview.datamodel.*;
+import javax.swing.JPanel;
 
 /**
  * DOCUMENT ME!
index c30fcd6..3ae3cb0 100755 (executable)
@@ -22,10 +22,17 @@ package jalview.gui;
 
 import jalview.renderer.AnnotationRenderer;
 
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
-import javax.swing.*;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.event.ComponentAdapter;
+import java.awt.event.ComponentEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseMotionAdapter;
+import java.awt.image.BufferedImage;
+
+import javax.swing.JPanel;
 
 /**
  * DOCUMENT ME!
index 767858d..be02717 100755 (executable)
@@ -21,7 +21,6 @@
 package jalview.gui;
 
 import jalview.api.FeatureRenderer;
-import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
 import jalview.schemes.ColourSchemeI;
index 75b4c67..f88ef5b 100644 (file)
  */
 package jalview.gui;
 
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.event.*;
-
-import jalview.datamodel.*;
+import jalview.datamodel.SequenceGroup;
 import jalview.util.MessageManager;
 
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+import javax.swing.BorderFactory;
+import javax.swing.JColorChooser;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JSlider;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
 public class TextColourChooser
 {
   AlignmentPanel ap;