JAL-1807 explicit imports (MCview)
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 10 Jul 2015 05:18:16 +0000 (06:18 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 10 Jul 2015 05:18:16 +0000 (06:18 +0100)
src/MCview/AppletPDBCanvas.java
src/MCview/AppletPDBViewer.java
src/MCview/PDBCanvas.java
src/MCview/PDBChain.java
src/MCview/PDBViewer.java
src/MCview/PDBfile.java

index dc69f43..1dfbac0 100644 (file)
  */
 package MCview;
 
+import jalview.analysis.AlignSeq;
+import jalview.appletgui.AlignmentPanel;
+import jalview.appletgui.FeatureRenderer;
+import jalview.appletgui.SequenceRenderer;
+import jalview.datamodel.PDBEntry;
+import jalview.datamodel.SequenceI;
+import jalview.io.AppletFormatAdapter;
+import jalview.schemes.ColourSchemeI;
+import jalview.structure.AtomSpec;
+import jalview.structure.StructureListener;
+import jalview.structure.StructureMapping;
+import jalview.structure.StructureSelectionManager;
+import jalview.util.MessageManager;
+
 import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.Event;
@@ -37,18 +51,6 @@ import java.io.PrintStream;
 import java.util.List;
 import java.util.Vector;
 
-import jalview.analysis.AlignSeq;
-import jalview.appletgui.AlignmentPanel;
-import jalview.appletgui.FeatureRenderer;
-import jalview.appletgui.SequenceRenderer;
-import jalview.datamodel.PDBEntry;
-import jalview.datamodel.SequenceI;
-import jalview.structure.AtomSpec;
-import jalview.structure.StructureListener;
-import jalview.structure.StructureMapping;
-import jalview.structure.StructureSelectionManager;
-import jalview.util.MessageManager;
-
 public class AppletPDBCanvas extends Panel implements MouseListener,
         MouseMotionListener, StructureListener
 {
@@ -158,7 +160,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener,
     {
       pdb = ssm.setMapping(seq, chains, pdbentry.getFile(), protocol);
 
-      if (protocol.equals(jalview.io.AppletFormatAdapter.PASTE))
+      if (protocol.equals(AppletFormatAdapter.PASTE))
       {
         pdbentry.setFile("INLINE" + pdb.id);
       }
@@ -543,7 +545,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener,
     drawLabels(ig);
   }
 
-  public void setColours(jalview.schemes.ColourSchemeI cs)
+  public void setColours(ColourSchemeI cs)
   {
     bysequence = false;
     pdb.setColours(cs);
index ed13578..90a79b0 100644 (file)
  */
 package MCview;
 
-import java.awt.*;
-import java.awt.event.*;
-
-import jalview.appletgui.*;
-import jalview.datamodel.*;
-import jalview.schemes.*;
+import jalview.appletgui.AlignmentPanel;
+import jalview.appletgui.CutAndPasteTransfer;
+import jalview.appletgui.EmbmenuFrame;
+import jalview.bin.JalviewLite;
+import jalview.datamodel.PDBEntry;
+import jalview.datamodel.SequenceI;
+import jalview.schemes.BuriedColourScheme;
+import jalview.schemes.HelixColourScheme;
+import jalview.schemes.HydrophobicColourScheme;
+import jalview.schemes.StrandColourScheme;
+import jalview.schemes.TaylorColourScheme;
+import jalview.schemes.TurnColourScheme;
+import jalview.schemes.ZappoColourScheme;
 import jalview.util.MessageManager;
 
+import java.awt.BorderLayout;
+import java.awt.CheckboxGroup;
+import java.awt.CheckboxMenuItem;
+import java.awt.Frame;
+import java.awt.Menu;
+import java.awt.MenuBar;
+import java.awt.MenuItem;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+
 public class AppletPDBViewer extends EmbmenuFrame implements
         ActionListener, ItemListener
 {
@@ -52,7 +71,7 @@ public class AppletPDBViewer extends EmbmenuFrame implements
     StringBuffer title = new StringBuffer(seq[0].getName() + ":"
             + pdbcanvas.pdbentry.getFile());
 
-    jalview.bin.JalviewLite.addFrame(this, title.toString(), 400, 400);
+    JalviewLite.addFrame(this, title.toString(), 400, 400);
 
   }
 
@@ -60,11 +79,10 @@ public class AppletPDBViewer extends EmbmenuFrame implements
   {
     if (evt.getSource() == mapping)
     {
-      jalview.appletgui.CutAndPasteTransfer cap = new jalview.appletgui.CutAndPasteTransfer(
-              false, null);
+      CutAndPasteTransfer cap = new CutAndPasteTransfer(false, null);
       Frame frame = new Frame();
       frame.add(cap);
-      jalview.bin.JalviewLite.addFrame(frame,
+      JalviewLite.addFrame(frame,
               MessageManager.getString("label.pdb_sequence_mapping"), 500,
               600);
       cap.setText(pdbcanvas.mappingDetails.toString());
index 406d9f1..9a7c3c2 100644 (file)
  */
 package MCview;
 
+import jalview.analysis.AlignSeq;
+import jalview.datamodel.PDBEntry;
+import jalview.datamodel.SequenceI;
+import jalview.gui.AlignmentPanel;
+import jalview.gui.FeatureRenderer;
+import jalview.gui.SeqCanvas;
+import jalview.gui.SequenceRenderer;
+import jalview.io.AppletFormatAdapter;
+import jalview.structure.AtomSpec;
+import jalview.structure.StructureListener;
+import jalview.structure.StructureMapping;
+import jalview.structure.StructureSelectionManager;
+
 import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.Event;
@@ -41,17 +54,6 @@ import java.util.Vector;
 import javax.swing.JPanel;
 import javax.swing.ToolTipManager;
 
-import jalview.analysis.AlignSeq;
-import jalview.datamodel.PDBEntry;
-import jalview.datamodel.SequenceI;
-import jalview.gui.AlignmentPanel;
-import jalview.gui.FeatureRenderer;
-import jalview.gui.SequenceRenderer;
-import jalview.structure.AtomSpec;
-import jalview.structure.StructureListener;
-import jalview.structure.StructureMapping;
-import jalview.structure.StructureSelectionManager;
-
 public class PDBCanvas extends JPanel implements MouseListener,
         MouseMotionListener, StructureListener
 {
@@ -115,7 +117,7 @@ public class PDBCanvas extends JPanel implements MouseListener,
 
   Font font = new Font("Helvetica", Font.PLAIN, 10);
 
-  jalview.gui.SeqCanvas seqcanvas;
+  SeqCanvas seqcanvas;
 
   public SequenceI[] sequence;
 
@@ -152,7 +154,7 @@ public class PDBCanvas extends JPanel implements MouseListener,
     {
       pdb = ssm.setMapping(seq, chains, pdbentry.getFile(), protocol);
 
-      if (protocol.equals(jalview.io.AppletFormatAdapter.PASTE))
+      if (protocol.equals(AppletFormatAdapter.PASTE))
       {
         pdbentry.setFile("INLINE" + pdb.id);
       }
index 0e486ac..4e5c96b 100755 (executable)
  */
 package MCview;
 
-import java.awt.Color;
-import java.util.List;
-import java.util.Vector;
-
 import jalview.analysis.AlignSeq;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.Annotation;
@@ -35,6 +31,10 @@ import jalview.schemes.ColourSchemeI;
 import jalview.schemes.ResidueProperties;
 import jalview.structure.StructureMapping;
 
+import java.awt.Color;
+import java.util.List;
+import java.util.Vector;
+
 public class PDBChain
 {
   /**
@@ -508,8 +508,8 @@ public class PDBChain
    * @param sqmpping
    *          - mapping between destination sequence and local chain
    */
-  public void transferResidueAnnotation(
-          StructureMapping mapping, jalview.datamodel.Mapping sqmpping)
+  public void transferResidueAnnotation(StructureMapping mapping,
+          Mapping sqmpping)
   {
     SequenceI sq = mapping.getSequence();
     SequenceI dsq = sq;
index f9c7602..a0fcacf 100755 (executable)
  */
 package MCview;
 
+import jalview.bin.Cache;
 import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceI;
 import jalview.gui.AlignmentPanel;
+import jalview.gui.CutAndPasteTransfer;
 import jalview.gui.Desktop;
 import jalview.gui.OOMWarning;
 import jalview.gui.UserDefinedColours;
+import jalview.io.AppletFormatAdapter;
 import jalview.io.JalviewFileChooser;
 import jalview.io.JalviewFileView;
 import jalview.schemes.BuriedColourScheme;
@@ -36,6 +39,7 @@ import jalview.schemes.TaylorColourScheme;
 import jalview.schemes.TurnColourScheme;
 import jalview.schemes.UserColourScheme;
 import jalview.schemes.ZappoColourScheme;
+import jalview.util.ImageMaker;
 import jalview.util.MessageManager;
 import jalview.ws.ebi.EBIFetchClient;
 
@@ -52,6 +56,7 @@ import java.io.File;
 import java.io.FileOutputStream;
 import java.io.FileReader;
 import java.io.PrintWriter;
+import java.util.Enumeration;
 
 import javax.swing.ButtonGroup;
 import javax.swing.JCheckBoxMenuItem;
@@ -114,7 +119,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
       {
         tmpPDBFile = pdbentry.getFile();
         PDBfile pdbfile = new PDBfile(false, false, false, tmpPDBFile,
-                jalview.io.AppletFormatAdapter.FILE);
+                AppletFormatAdapter.FILE);
 
         pdbcanvas.init(pdbentry, seq, chains, ap, protocol);
 
@@ -379,9 +384,9 @@ public class PDBViewer extends JInternalFrame implements Runnable
     bg.add(buried);
     bg.add(user);
 
-    if (jalview.gui.UserDefinedColours.getUserColourSchemes() != null)
+    if (UserDefinedColours.getUserColourSchemes() != null)
     {
-      java.util.Enumeration userColours = jalview.gui.UserDefinedColours
+      Enumeration userColours = UserDefinedColours
               .getUserColourSchemes().keys();
 
       while (userColours.hasMoreElements())
@@ -399,7 +404,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
               radioItem.removeActionListener(radioItem.getActionListeners()[0]);
 
               int option = JOptionPane.showInternalConfirmDialog(
-                      jalview.gui.Desktop.desktop,
+                      Desktop.desktop,
                       MessageManager
                               .getString("label.remove_from_default_list"),
                       MessageManager
@@ -407,7 +412,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
                       JOptionPane.YES_NO_OPTION);
               if (option == JOptionPane.YES_OPTION)
               {
-                jalview.gui.UserDefinedColours
+                UserDefinedColours
                         .removeColourFromDefaults(radioItem.getText());
                 coloursMenu.remove(radioItem);
               }
@@ -500,7 +505,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
    */
   public void eps_actionPerformed(ActionEvent e)
   {
-    makePDBImage(jalview.util.ImageMaker.TYPE.EPS);
+    makePDBImage(ImageMaker.TYPE.EPS);
   }
 
   /**
@@ -511,34 +516,32 @@ public class PDBViewer extends JInternalFrame implements Runnable
    */
   public void png_actionPerformed(ActionEvent e)
   {
-    makePDBImage(jalview.util.ImageMaker.TYPE.PNG);
+    makePDBImage(ImageMaker.TYPE.PNG);
   }
 
-  void makePDBImage(jalview.util.ImageMaker.TYPE type)
+  void makePDBImage(ImageMaker.TYPE type)
   {
     int width = pdbcanvas.getWidth();
     int height = pdbcanvas.getHeight();
 
-    jalview.util.ImageMaker im;
+    ImageMaker im;
 
-    if (type == jalview.util.ImageMaker.TYPE.PNG)
+    if (type == ImageMaker.TYPE.PNG)
     {
-      im = new jalview.util.ImageMaker(this,
-              jalview.util.ImageMaker.TYPE.PNG,
+      im = new ImageMaker(this, ImageMaker.TYPE.PNG,
               "Make PNG image from view", width, height, null, null);
     }
-    else if (type == jalview.util.ImageMaker.TYPE.EPS)
+    else if (type == ImageMaker.TYPE.EPS)
     {
-      im = new jalview.util.ImageMaker(this,
-              jalview.util.ImageMaker.TYPE.EPS,
+      im = new ImageMaker(this, ImageMaker.TYPE.EPS,
               "Make EPS file from view", width, height, null,
               this.getTitle());
     }
     else
     {
 
-      im = new jalview.util.ImageMaker(this,
-              jalview.util.ImageMaker.TYPE.SVG, "Make SVG file from PCA",
+      im = new ImageMaker(this, ImageMaker.TYPE.SVG,
+              "Make SVG file from PCA",
               width, height, null, this.getTitle());
     }
 
@@ -609,7 +612,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
 
   public void mapping_actionPerformed(ActionEvent e)
   {
-    jalview.gui.CutAndPasteTransfer cap = new jalview.gui.CutAndPasteTransfer();
+    CutAndPasteTransfer cap = new CutAndPasteTransfer();
     try
     {
       cap.setText(pdbcanvas.mappingDetails.toString());
@@ -711,7 +714,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
   public void savePDB_actionPerformed(ActionEvent e)
   {
     JalviewFileChooser chooser = new JalviewFileChooser(
-            jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
+            Cache.getProperty("LAST_DIRECTORY"));
 
     chooser.setFileView(new JalviewFileView());
     chooser.setDialogTitle(MessageManager.getString("label.save_pdb_file"));
index 7b7f4b0..f832fd6 100755 (executable)
@@ -26,7 +26,9 @@ import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceI;
+import jalview.io.AlignFile;
 import jalview.io.FileParse;
+import jalview.schemes.ColourSchemeI;
 import jalview.util.MessageManager;
 
 import java.awt.Color;
@@ -37,7 +39,7 @@ import java.util.Hashtable;
 import java.util.List;
 import java.util.Vector;
 
-public class PDBfile extends jalview.io.AlignFile
+public class PDBfile extends AlignFile
 {
   private static String CALC_ID_PREFIX = "JalviewPDB";
 
@@ -531,7 +533,7 @@ public class PDBfile extends jalview.io.AlignFile
     }
   }
 
-  public void setColours(jalview.schemes.ColourSchemeI cs)
+  public void setColours(ColourSchemeI cs)
   {
     for (int i = 0; i < chains.size(); i++)
     {