From: gmungoc Date: Fri, 10 Jul 2015 05:12:32 +0000 (+0100) Subject: JAL-1807 explicit imports (jalview.appletgui) X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a4677746324adeea9632d7306c83dfd94dff6181;p=jalview.git JAL-1807 explicit imports (jalview.appletgui) --- diff --git a/src/jalview/appletgui/APopupMenu.java b/src/jalview/appletgui/APopupMenu.java index f16da84..1d59202 100644 --- a/src/jalview/appletgui/APopupMenu.java +++ b/src/jalview/appletgui/APopupMenu.java @@ -24,6 +24,7 @@ import jalview.analysis.AAFrequency; import jalview.analysis.AlignmentAnnotationUtils; import jalview.analysis.AlignmentUtils; import jalview.analysis.Conservation; +import jalview.bin.JalviewLite; import jalview.commands.ChangeCaseCommand; import jalview.commands.EditCommand; import jalview.commands.EditCommand.Action; @@ -48,6 +49,7 @@ import jalview.schemes.StrandColourScheme; import jalview.schemes.TaylorColourScheme; import jalview.schemes.TurnColourScheme; import jalview.schemes.ZappoColourScheme; +import jalview.util.DBRefUtils; import jalview.util.MessageManager; import jalview.util.UrlLink; @@ -216,10 +218,10 @@ public class APopupMenu extends java.awt.PopupMenu implements e.printStackTrace(); } - for (int i = 0; i < jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS.length; i++) + for (int i = 0; i < AppletFormatAdapter.WRITEABLE_FORMATS.length; i++) { MenuItem item = new MenuItem( - jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS[i]); +AppletFormatAdapter.WRITEABLE_FORMATS[i]); item.addActionListener(this); outputmenu.add(item); @@ -274,7 +276,7 @@ public class APopupMenu extends java.awt.PopupMenu implements { // collect matching db-refs - DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs( + DBRefEntry[] dbr = DBRefUtils.selectRefs( seq.getDBRef(), new String[] { target }); // collect id string too @@ -348,16 +350,15 @@ public class APopupMenu extends java.awt.PopupMenu implements * * String url_suff = link.substring(link.indexOf("$SEQUENCE_ID$") + 13); * // collect matching db-refs DBRefEntry[] dbr = - * jalview.util.DBRefUtils.selectRefs(seq.getDBRef(), new - * String[]{target}); // collect id string too String id = - * seq.getName(); if (id.indexOf("|") > -1) { id = - * id.substring(id.lastIndexOf("|") + 1); } if (dbr!=null) { for (int - * r=0;r -1) { id = id.substring(id.lastIndexOf("|") + 1); } if (dbr!=null) + * { for (int r=0;r startx) { - if (jalview.util.Comparison.isGap(seq.getCharAt(index))) + if (Comparison.isGap(seq.getCharAt(index))) { index--; diff --git a/src/jalview/appletgui/SeqPanel.java b/src/jalview/appletgui/SeqPanel.java index 86dedfc..348a921 100644 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@ -20,18 +20,6 @@ */ package jalview.appletgui; -import java.awt.BorderLayout; -import java.awt.Font; -import java.awt.FontMetrics; -import java.awt.Panel; -import java.awt.Point; -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.api.AlignViewportI; import jalview.commands.EditCommand; import jalview.commands.EditCommand.Action; @@ -48,10 +36,23 @@ import jalview.structure.SelectionSource; import jalview.structure.SequenceListener; import jalview.structure.StructureSelectionManager; import jalview.structure.VamsasSource; +import jalview.util.Comparison; import jalview.util.MappingUtils; import jalview.util.MessageManager; import jalview.viewmodel.AlignmentViewport; +import java.awt.BorderLayout; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Panel; +import java.awt.Point; +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; + public class SeqPanel extends Panel implements MouseMotionListener, MouseListener, SequenceListener, SelectionListener { @@ -1178,7 +1179,7 @@ public class SeqPanel extends Panel implements MouseMotionListener, { for (int j = 0; j < startres - lastres; j++) { - if (!jalview.util.Comparison.isGap(gs.getCharAt(fixedRight + if (!Comparison.isGap(gs.getCharAt(fixedRight - j))) { blank = false; @@ -1241,7 +1242,7 @@ public class SeqPanel extends Panel implements MouseMotionListener, continue; } - if (!jalview.util.Comparison.isGap(gs.getCharAt(j))) + if (!Comparison.isGap(gs.getCharAt(j))) { // Not a gap, block edit not valid endEditing(); @@ -1312,7 +1313,7 @@ public class SeqPanel extends Panel implements MouseMotionListener, { for (int j = lastres; j > startres; j--) { - if (!jalview.util.Comparison.isGap(seq.getCharAt(startres))) + if (!Comparison.isGap(seq.getCharAt(startres))) { endEditing(); break; @@ -1327,7 +1328,7 @@ public class SeqPanel extends Panel implements MouseMotionListener, int max = 0; for (int m = startres; m < lastres; m++) { - if (!jalview.util.Comparison.isGap(seq.getCharAt(m))) + if (!Comparison.isGap(seq.getCharAt(m))) { break; } @@ -1357,7 +1358,7 @@ public class SeqPanel extends Panel implements MouseMotionListener, for (blankColumn = fixedColumn; blankColumn > j; blankColumn--) { - if (jalview.util.Comparison.isGap(seq[s].getCharAt(blankColumn))) + if (Comparison.isGap(seq[s].getCharAt(blankColumn))) { // Theres a space, so break and insert the gap break; diff --git a/src/jalview/appletgui/SequenceRenderer.java b/src/jalview/appletgui/SequenceRenderer.java index feb2705..e2e98cb 100755 --- a/src/jalview/appletgui/SequenceRenderer.java +++ b/src/jalview/appletgui/SequenceRenderer.java @@ -24,6 +24,7 @@ import jalview.api.FeatureRenderer; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import jalview.schemes.ColourSchemeI; +import jalview.util.Comparison; import java.awt.Color; import java.awt.Font; @@ -117,8 +118,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer { resBoxColour = cs.findColour(seq.getCharAt(i), i, seq); } - else if (forOverview - && !jalview.util.Comparison.isGap(seq.getCharAt(i))) + else if (forOverview && !Comparison.isGap(seq.getCharAt(i))) { resBoxColour = Color.lightGray; } @@ -237,7 +237,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer graphics.setColor(Color.black); s = seq.getCharAt(i); - if (!renderGaps && jalview.util.Comparison.isGap(s)) + if (!renderGaps && Comparison.isGap(s)) { continue; } diff --git a/src/jalview/appletgui/SliderPanel.java b/src/jalview/appletgui/SliderPanel.java index 65622aa..b267678 100644 --- a/src/jalview/appletgui/SliderPanel.java +++ b/src/jalview/appletgui/SliderPanel.java @@ -20,6 +20,7 @@ */ package jalview.appletgui; +import jalview.bin.JalviewLite; import jalview.datamodel.SequenceGroup; import jalview.schemes.ColourSchemeI; import jalview.util.MessageManager; @@ -99,7 +100,7 @@ public class SliderPanel extends Panel implements ActionListener, if (!conservationSlider.isVisible()) { - jalview.bin.JalviewLite.addFrame(conservationSlider, + JalviewLite.addFrame(conservationSlider, conservationSlider.getTitle(), 420, 100); conservationSlider.addWindowListener(new WindowAdapter() { @@ -155,7 +156,7 @@ public class SliderPanel extends Panel implements ActionListener, if (!PIDSlider.isVisible()) { - jalview.bin.JalviewLite.addFrame(PIDSlider, PIDSlider.getTitle(), + JalviewLite.addFrame(PIDSlider, PIDSlider.getTitle(), 420, 100); PIDSlider.addWindowListener(new WindowAdapter() { diff --git a/src/jalview/appletgui/SplitFrame.java b/src/jalview/appletgui/SplitFrame.java index 836d70c..3d30800 100644 --- a/src/jalview/appletgui/SplitFrame.java +++ b/src/jalview/appletgui/SplitFrame.java @@ -1,10 +1,5 @@ package jalview.appletgui; -import java.awt.BorderLayout; -import java.awt.Dimension; -import java.awt.GridLayout; -import java.awt.Panel; - import jalview.analysis.AlignmentUtils; import jalview.api.AlignmentViewPanel; import jalview.api.ViewStyleI; @@ -13,6 +8,11 @@ import jalview.datamodel.AlignmentI; import jalview.structure.StructureSelectionManager; import jalview.viewmodel.AlignmentViewport; +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.GridLayout; +import java.awt.Panel; + public class SplitFrame extends EmbmenuFrame { private static final long serialVersionUID = 1L; @@ -193,8 +193,7 @@ public class SplitFrame extends EmbmenuFrame this.add(outermost); int width = Math.max(topFrame.frameWidth, bottomFrame.frameWidth); int height = topFrame.frameHeight + bottomFrame.frameHeight; - jalview.bin.JalviewLite - .addFrame(this, this.getTitle(), width, height); + JalviewLite.addFrame(this, this.getTitle(), width, height); } } diff --git a/src/jalview/appletgui/TreePanel.java b/src/jalview/appletgui/TreePanel.java index b4b8ec2..e5971e5 100644 --- a/src/jalview/appletgui/TreePanel.java +++ b/src/jalview/appletgui/TreePanel.java @@ -23,6 +23,7 @@ package jalview.appletgui; import jalview.analysis.NJTree; import jalview.api.analysis.ScoreModelI; import jalview.api.analysis.ViewBasedAnalysisI; +import jalview.bin.JalviewLite; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentView; import jalview.datamodel.ColumnSelection; @@ -193,7 +194,7 @@ public class TreePanel extends EmbmenuFrame implements ActionListener, { NewickFile newtree; - jalview.datamodel.AlignmentView odata = null; + AlignmentView odata = null; public TreeLoader(NewickFile newtree) { @@ -329,14 +330,13 @@ public class TreePanel extends EmbmenuFrame implements ActionListener, public void newickOutput_actionPerformed() { - jalview.io.NewickFile fout = new jalview.io.NewickFile( - tree.getTopNode()); + NewickFile fout = new NewickFile(tree.getTopNode()); String output = fout.print(false, true); CutAndPasteTransfer cap = new CutAndPasteTransfer(false, null); cap.setText(output); java.awt.Frame frame = new java.awt.Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, type + " " + pwtype, 500, 100); + JalviewLite.addFrame(frame, type + " " + pwtype, 500, 100); } public java.awt.Font getTreeFont() diff --git a/src/jalview/appletgui/UserDefinedColours.java b/src/jalview/appletgui/UserDefinedColours.java index 277bd55..afea10d 100644 --- a/src/jalview/appletgui/UserDefinedColours.java +++ b/src/jalview/appletgui/UserDefinedColours.java @@ -20,6 +20,14 @@ */ package jalview.appletgui; +import jalview.bin.JalviewLite; +import jalview.datamodel.SequenceGroup; +import jalview.schemes.ColourSchemeI; +import jalview.schemes.GraduatedColor; +import jalview.schemes.ResidueProperties; +import jalview.schemes.UserColourScheme; +import jalview.util.MessageManager; + import java.awt.Button; import java.awt.Color; import java.awt.Component; @@ -42,13 +50,6 @@ import java.awt.event.FocusListener; import java.awt.event.MouseEvent; import java.util.Vector; -import jalview.datamodel.SequenceGroup; -import jalview.schemes.ColourSchemeI; -import jalview.schemes.GraduatedColor; -import jalview.schemes.ResidueProperties; -import jalview.schemes.UserColourScheme; -import jalview.util.MessageManager; - public class UserDefinedColours extends Panel implements ActionListener, AdjustmentListener, FocusListener { @@ -281,7 +282,7 @@ public class UserDefinedColours extends Panel implements ActionListener, } frame = new Frame(); frame.add(this); - jalview.bin.JalviewLite.addFrame(frame, + JalviewLite.addFrame(frame, MessageManager.getString("label.user_defined_colours"), 420, 345);