From 15a454d6de78056c057ab64c5932dda788da979a Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 22 Jun 2015 18:26:23 +0100 Subject: [PATCH] JAL-653 JAL-1780 reorder imports --- src/MCview/PDBfile.java | 16 ++++---- src/jalview/appletgui/APopupMenu.java | 34 ++++++++--------- src/jalview/appletgui/CutAndPasteTransfer.java | 26 ++++++------- src/jalview/bin/JalviewLite.java | 48 ++++++++++++------------ src/jalview/gui/CutAndPasteTransfer.java | 28 +++++++------- src/jalview/gui/Desktop.java | 32 ++++++++-------- src/jalview/gui/SequenceFetcher.java | 25 ++++++------ src/jalview/ws/dbsources/Uniprot.java | 18 ++++----- test/jalview/analysis/AlignmentUtilsTests.java | 27 +++++++------ test/jalview/util/MappingUtilsTest.java | 21 +++++------ 10 files changed, 137 insertions(+), 138 deletions(-) diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index 4039cdd..3f47d9c 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -20,14 +20,6 @@ */ package MCview; -import java.awt.Color; -import java.io.IOException; -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.Hashtable; -import java.util.List; -import java.util.Vector; - import jalview.analysis.AlignSeq; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; @@ -37,6 +29,14 @@ import jalview.datamodel.SequenceI; import jalview.io.FileParse; import jalview.util.MessageManager; +import java.awt.Color; +import java.io.IOException; +import java.lang.reflect.Constructor; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.List; +import java.util.Vector; + public class PDBfile extends jalview.io.AlignFile { private static String CALC_ID_PREFIX = "JalviewPDB"; diff --git a/src/jalview/appletgui/APopupMenu.java b/src/jalview/appletgui/APopupMenu.java index d71fdd4..971630d 100644 --- a/src/jalview/appletgui/APopupMenu.java +++ b/src/jalview/appletgui/APopupMenu.java @@ -20,22 +20,6 @@ */ package jalview.appletgui; -import java.awt.CheckboxMenuItem; -import java.awt.Frame; -import java.awt.Menu; -import java.awt.MenuItem; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; -import java.util.Arrays; -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; -import java.util.Vector; - import jalview.analysis.AAFrequency; import jalview.analysis.AlignmentAnnotationUtils; import jalview.analysis.AlignmentUtils; @@ -67,6 +51,22 @@ import jalview.schemes.ZappoColourScheme; import jalview.util.MessageManager; import jalview.util.UrlLink; +import java.awt.CheckboxMenuItem; +import java.awt.Frame; +import java.awt.Menu; +import java.awt.MenuItem; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.Arrays; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; +import java.util.Vector; + public class APopupMenu extends java.awt.PopupMenu implements ActionListener, ItemListener { @@ -898,7 +898,7 @@ public class APopupMenu extends java.awt.PopupMenu implements { if (seq.getPDBId() != null) { - PDBEntry entry = (PDBEntry) seq.getPDBId().firstElement(); + PDBEntry entry = seq.getPDBId().firstElement(); if (ap.av.applet.jmolAvailable) { diff --git a/src/jalview/appletgui/CutAndPasteTransfer.java b/src/jalview/appletgui/CutAndPasteTransfer.java index bb2fa12..1fdbed8 100644 --- a/src/jalview/appletgui/CutAndPasteTransfer.java +++ b/src/jalview/appletgui/CutAndPasteTransfer.java @@ -20,19 +20,6 @@ */ package jalview.appletgui; -import java.awt.BorderLayout; -import java.awt.Button; -import java.awt.Dialog; -import java.awt.Font; -import java.awt.Frame; -import java.awt.Label; -import java.awt.Panel; -import java.awt.TextArea; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; - import jalview.analysis.AlignmentUtils; import jalview.api.ComplexAlignFile; import jalview.bin.JalviewLite; @@ -51,6 +38,19 @@ import jalview.schemes.ColourSchemeI; import jalview.schemes.TCoffeeColourScheme; import jalview.util.MessageManager; +import java.awt.BorderLayout; +import java.awt.Button; +import java.awt.Dialog; +import java.awt.Font; +import java.awt.Frame; +import java.awt.Label; +import java.awt.Panel; +import java.awt.TextArea; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; + public class CutAndPasteTransfer extends Panel implements ActionListener, MouseListener { diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index ebadb84..3d1e275 100644 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -20,30 +20,6 @@ */ package jalview.bin; -import java.applet.Applet; -import java.awt.Button; -import java.awt.Color; -import java.awt.Component; -import java.awt.EventQueue; -import java.awt.Font; -import java.awt.Frame; -import java.awt.Graphics; -import java.awt.event.ActionEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; -import java.util.Hashtable; -import java.util.List; -import java.util.StringTokenizer; -import java.util.Vector; - -import netscape.javascript.JSException; -import netscape.javascript.JSObject; - import jalview.api.StructureSelectionManagerProvider; import jalview.appletgui.AlignFrame; import jalview.appletgui.AlignViewport; @@ -72,6 +48,30 @@ import jalview.structure.SelectionListener; import jalview.structure.StructureSelectionManager; import jalview.util.MessageManager; +import java.applet.Applet; +import java.awt.Button; +import java.awt.Color; +import java.awt.Component; +import java.awt.EventQueue; +import java.awt.Font; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.event.ActionEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URL; +import java.util.Hashtable; +import java.util.List; +import java.util.StringTokenizer; +import java.util.Vector; + +import netscape.javascript.JSException; +import netscape.javascript.JSObject; + /** * Jalview Applet. Runs in Java 1.18 runtime * diff --git a/src/jalview/gui/CutAndPasteTransfer.java b/src/jalview/gui/CutAndPasteTransfer.java index f3c4d87..15e6818 100644 --- a/src/jalview/gui/CutAndPasteTransfer.java +++ b/src/jalview/gui/CutAndPasteTransfer.java @@ -20,6 +20,21 @@ */ package jalview.gui; +import jalview.api.AlignViewportI; +import jalview.api.AlignmentViewPanel; +import jalview.api.ComplexAlignFile; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.ColumnSelection; +import jalview.datamodel.SequenceI; +import jalview.io.FileParse; +import jalview.io.FormatAdapter; +import jalview.io.IdentifyFile; +import jalview.io.JalviewFileChooser; +import jalview.io.JalviewFileView; +import jalview.jbgui.GCutAndPasteTransfer; +import jalview.schemes.ColourSchemeI; +import jalview.util.MessageManager; + import java.awt.Toolkit; import java.awt.datatransfer.Clipboard; import java.awt.datatransfer.DataFlavor; @@ -34,19 +49,6 @@ import javax.swing.JOptionPane; import javax.swing.JPopupMenu; import javax.swing.SwingUtilities; -import jalview.api.ComplexAlignFile; -import jalview.datamodel.Alignment; -import jalview.datamodel.ColumnSelection; -import jalview.datamodel.SequenceI; -import jalview.io.FileParse; -import jalview.io.FormatAdapter; -import jalview.io.IdentifyFile; -import jalview.io.JalviewFileChooser; -import jalview.io.JalviewFileView; -import jalview.jbgui.GCutAndPasteTransfer; -import jalview.schemes.ColourSchemeI; -import jalview.util.MessageManager; - /** * Cut'n'paste files into the desktop See JAL-1105 * diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 9e84407..984dd98 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -20,6 +20,22 @@ */ package jalview.gui; +import jalview.api.AlignViewportI; +import jalview.api.AlignmentViewPanel; +import jalview.bin.Cache; +import jalview.io.FileLoader; +import jalview.io.FormatAdapter; +import jalview.io.IdentifyFile; +import jalview.io.JalviewFileChooser; +import jalview.io.JalviewFileView; +import jalview.jbgui.GSplitFrame; +import jalview.jbgui.GStructureViewer; +import jalview.structure.StructureSelectionManager; +import jalview.util.ImageMaker; +import jalview.util.MessageManager; +import jalview.viewmodel.AlignmentViewport; +import jalview.ws.params.ParamManager; + import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -84,22 +100,6 @@ import javax.swing.event.HyperlinkEvent.EventType; import javax.swing.event.MenuEvent; import javax.swing.event.MenuListener; -import jalview.api.AlignViewportI; -import jalview.api.AlignmentViewPanel; -import jalview.bin.Cache; -import jalview.io.FileLoader; -import jalview.io.FormatAdapter; -import jalview.io.IdentifyFile; -import jalview.io.JalviewFileChooser; -import jalview.io.JalviewFileView; -import jalview.jbgui.GSplitFrame; -import jalview.jbgui.GStructureViewer; -import jalview.structure.StructureSelectionManager; -import jalview.util.ImageMaker; -import jalview.util.MessageManager; -import jalview.viewmodel.AlignmentViewport; -import jalview.ws.params.ParamManager; - /** * Jalview Desktop * diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index dd25532..d920028 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -20,6 +20,18 @@ */ package jalview.gui; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.DBRefEntry; +import jalview.datamodel.DBRefSource; +import jalview.datamodel.SequenceFeature; +import jalview.datamodel.SequenceI; +import jalview.io.FormatAdapter; +import jalview.io.IdentifyFile; +import jalview.util.DBRefUtils; +import jalview.util.MessageManager; +import jalview.ws.dbsources.das.api.DasSourceRegistryI; +import jalview.ws.seqfetcher.DbSourceProxy; + import java.awt.BorderLayout; import java.awt.Font; import java.awt.event.ActionEvent; @@ -44,19 +56,6 @@ import javax.swing.tree.DefaultMutableTreeNode; import com.stevesoft.pat.Regex; -import jalview.datamodel.Alignment; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.DBRefEntry; -import jalview.datamodel.DBRefSource; -import jalview.datamodel.SequenceFeature; -import jalview.datamodel.SequenceI; -import jalview.io.FormatAdapter; -import jalview.io.IdentifyFile; -import jalview.util.DBRefUtils; -import jalview.util.MessageManager; -import jalview.ws.dbsources.das.api.DasSourceRegistryI; -import jalview.ws.seqfetcher.DbSourceProxy; - public class SequenceFetcher extends JPanel implements Runnable { JLabel dbeg = new JLabel(); diff --git a/src/jalview/ws/dbsources/Uniprot.java b/src/jalview/ws/dbsources/Uniprot.java index 6a871ee..95a134a 100644 --- a/src/jalview/ws/dbsources/Uniprot.java +++ b/src/jalview/ws/dbsources/Uniprot.java @@ -20,15 +20,6 @@ */ package jalview.ws.dbsources; -import java.io.File; -import java.io.FileReader; -import java.io.Reader; -import java.util.Vector; - -import org.exolab.castor.xml.Unmarshaller; - -import com.stevesoft.pat.Regex; - import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; import jalview.datamodel.DBRefEntry; @@ -42,6 +33,15 @@ import jalview.ws.ebi.EBIFetchClient; import jalview.ws.seqfetcher.DbSourceProxy; import jalview.ws.seqfetcher.DbSourceProxyImpl; +import java.io.File; +import java.io.FileReader; +import java.io.Reader; +import java.util.Vector; + +import org.exolab.castor.xml.Unmarshaller; + +import com.stevesoft.pat.Regex; + /** * @author JimP * diff --git a/test/jalview/analysis/AlignmentUtilsTests.java b/test/jalview/analysis/AlignmentUtilsTests.java index 02955f1..26ae0b8 100644 --- a/test/jalview/analysis/AlignmentUtilsTests.java +++ b/test/jalview/analysis/AlignmentUtilsTests.java @@ -25,20 +25,6 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.junit.Test; - import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; @@ -55,6 +41,19 @@ import jalview.io.FormatAdapter; import jalview.util.MapList; import jalview.util.MappingUtils; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.junit.Test; + public class AlignmentUtilsTests { // @formatter:off diff --git a/test/jalview/util/MappingUtilsTest.java b/test/jalview/util/MappingUtilsTest.java index ec9ace4..2d197be 100644 --- a/test/jalview/util/MappingUtilsTest.java +++ b/test/jalview/util/MappingUtilsTest.java @@ -3,17 +3,6 @@ package jalview.util; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; - -import java.awt.Color; -import java.io.IOException; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.junit.Test; - import jalview.api.AlignViewportI; import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.Alignment; @@ -27,6 +16,16 @@ import jalview.datamodel.SequenceI; import jalview.gui.AlignViewport; import jalview.io.AppletFormatAdapter; import jalview.io.FormatAdapter; +import java.awt.Color; +import java.io.IOException; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.junit.Test; + public class MappingUtilsTest { -- 1.7.10.2