From: gmungoc Date: Fri, 10 Jul 2015 05:15:19 +0000 (+0100) Subject: JAL-1807 explicit imports (jalview.javascript) X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8146bb79670cfec703d7a7e04f1ae2e0318bd938;p=jalview.git JAL-1807 explicit imports (jalview.javascript) --- diff --git a/src/jalview/javascript/JalviewLiteJsApi.java b/src/jalview/javascript/JalviewLiteJsApi.java index 51f6741..77908fd 100644 --- a/src/jalview/javascript/JalviewLiteJsApi.java +++ b/src/jalview/javascript/JalviewLiteJsApi.java @@ -250,7 +250,7 @@ public interface JalviewLiteJsApi /** * get alignment as format (format names FASTA, BLC, CLUSTAL, MSF, PILEUP, - * PFAM - see jalview.io.AppletFormatAdapter for full list) + * PFAM - see AppletFormatAdapter for full list) * * @param format * @return diff --git a/src/jalview/javascript/JsCallBack.java b/src/jalview/javascript/JsCallBack.java index 76d6e8d..7c05be8 100644 --- a/src/jalview/javascript/JsCallBack.java +++ b/src/jalview/javascript/JsCallBack.java @@ -20,9 +20,11 @@ */ package jalview.javascript; +import jalview.appletgui.AlignFrame; + public interface JsCallBack { - public jalview.appletgui.AlignFrame getAlignFrame(); + public AlignFrame getAlignFrame(); public String getListenerFunction(); diff --git a/src/jalview/javascript/JsSelectionSender.java b/src/jalview/javascript/JsSelectionSender.java index e4a0916..a028f61 100644 --- a/src/jalview/javascript/JsSelectionSender.java +++ b/src/jalview/javascript/JsSelectionSender.java @@ -21,13 +21,15 @@ package jalview.javascript; import jalview.appletgui.AlignFrame; +import jalview.appletgui.AlignViewport; import jalview.bin.JalviewLite; import jalview.datamodel.ColumnSelection; import jalview.datamodel.SequenceGroup; +import jalview.structure.SelectionListener; import jalview.structure.SelectionSource; public class JsSelectionSender extends JSFunctionExec implements - jalview.structure.SelectionListener, JsCallBack + SelectionListener, JsCallBack { AlignFrame _af; @@ -54,11 +56,11 @@ public class JsSelectionSender extends JSFunctionExec implements AlignFrame src = _af; if (source != null) { - if (source instanceof jalview.appletgui.AlignViewport - && ((jalview.appletgui.AlignViewport) source).applet.currentAlignFrame.viewport == source) + if (source instanceof AlignViewport + && ((AlignViewport) source).applet.currentAlignFrame.viewport == source) { // should be valid if it just generated an event! - src = ((jalview.appletgui.AlignViewport) source).applet.currentAlignFrame; + src = ((AlignViewport) source).applet.currentAlignFrame; } } @@ -95,7 +97,7 @@ public class JsSelectionSender extends JSFunctionExec implements for (int i = 0; i < cols.length; i++) { cols[i] = "" - + (1 + ((Integer) colsel.getSelected().elementAt(i)) + + (1 + colsel.getSelected().elementAt(i) .intValue()); } } diff --git a/src/jalview/javascript/MouseOverListener.java b/src/jalview/javascript/MouseOverListener.java index 9d0279b..8fd48d6 100644 --- a/src/jalview/javascript/MouseOverListener.java +++ b/src/jalview/javascript/MouseOverListener.java @@ -21,6 +21,7 @@ package jalview.javascript; import jalview.appletgui.AlignFrame; +import jalview.appletgui.AlignViewport; import jalview.bin.JalviewLite; import jalview.datamodel.SequenceI; import jalview.structure.VamsasListener; @@ -53,11 +54,11 @@ public class MouseOverListener extends JSFunctionExec implements { if (source != null) { - if (source instanceof jalview.appletgui.AlignViewport - && ((jalview.appletgui.AlignViewport) source).applet.currentAlignFrame.viewport == source) + if (source instanceof AlignViewport + && ((AlignViewport) source).applet.currentAlignFrame.viewport == source) { // should be valid if it just generated an event! - src = ((jalview.appletgui.AlignViewport) source).applet.currentAlignFrame; + src = ((AlignViewport) source).applet.currentAlignFrame; } // TODO: ensure that if '_af' is specified along with a handler diff --git a/src/jalview/javascript/MouseOverStructureListener.java b/src/jalview/javascript/MouseOverStructureListener.java index 4b1c9ce..dfe5c4f 100644 --- a/src/jalview/javascript/MouseOverStructureListener.java +++ b/src/jalview/javascript/MouseOverStructureListener.java @@ -20,13 +20,11 @@ */ package jalview.javascript; -import java.util.ArrayList; -import java.util.List; - import jalview.api.AlignmentViewPanel; import jalview.api.FeatureRenderer; import jalview.api.SequenceRenderer; import jalview.appletgui.AlignFrame; +import jalview.appletgui.AlignmentPanel; import jalview.bin.JalviewLite; import jalview.datamodel.SequenceI; import jalview.ext.jmol.JmolCommands; @@ -36,6 +34,9 @@ import jalview.structure.StructureMapping; import jalview.structure.StructureMappingcommandSet; import jalview.structure.StructureSelectionManager; +import java.util.ArrayList; +import java.util.List; + /** * Propagate events involving PDB structures associated with sequences to a * javascript function. Generally, the javascript handler is called with a @@ -177,7 +178,7 @@ public class MouseOverStructureListener extends JSFunctionExec implements // { // ssm.reportMapping(); // } - if (source instanceof jalview.api.AlignmentViewPanel) + if (source instanceof AlignmentViewPanel) { SequenceI[][] sequence = new SequenceI[modelSet.length][]; for (int m = 0; m < modelSet.length; m++) @@ -202,15 +203,15 @@ public class MouseOverStructureListener extends JSFunctionExec implements // } } - SequenceRenderer sr = ((jalview.appletgui.AlignmentPanel) source) + SequenceRenderer sr = ((AlignmentPanel) source) .getSequenceRenderer(); - FeatureRenderer fr = ((jalview.appletgui.AlignmentPanel) source).av + FeatureRenderer fr = ((AlignmentPanel) source).av .isShowSequenceFeatures() ? new jalview.appletgui.FeatureRenderer( - ((jalview.appletgui.AlignmentPanel) source).av) : null; + ((AlignmentPanel) source).av) : null; if (fr != null) { ((jalview.appletgui.FeatureRenderer) fr) - .transferSettings(((jalview.appletgui.AlignmentPanel) source) + .transferSettings(((AlignmentPanel) source) .getFeatureRenderer()); } ; @@ -227,7 +228,7 @@ public class MouseOverStructureListener extends JSFunctionExec implements return; } int sz = 0; - for (jalview.structure.StructureMappingcommandSet ccset : colcommands) + for (StructureMappingcommandSet ccset : colcommands) { sz += ccset.commands.length; ccomands.add(ccset.commands); @@ -244,7 +245,7 @@ public class MouseOverStructureListener extends JSFunctionExec implements } if (jvlite.isJsMessageSetChanged( mclass = "colourstruct", - mhandle = ((jalview.appletgui.AlignmentPanel) source).av + mhandle = ((AlignmentPanel) source).av .getViewId(), ccomandset)) { jvlite.setJsMessageSet(mclass, mhandle, ccomandset); @@ -252,7 +253,7 @@ public class MouseOverStructureListener extends JSFunctionExec implements String st[] = new String[] { "colourstruct", - "" + ((jalview.appletgui.AlignmentPanel) source).av.getViewId(), + "" + ((AlignmentPanel) source).av.getViewId(), "" + ccomandset.length, jvlite.arrayToSeparatorList(pdbfn.toArray(new String[pdbfn .size()])) };