From: gmungoc Date: Sun, 12 Jul 2015 05:15:24 +0000 (+0100) Subject: JAL-1807 expanded import java.awt.* to allow code analysis X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c07eb2c5794833bd0241000d6844d783fe10cb82;p=jalview.git JAL-1807 expanded import java.awt.* to allow code analysis --- diff --git a/src/jalview/appletgui/EditNameDialog.java b/src/jalview/appletgui/EditNameDialog.java index 24a7023..2f6469b 100644 --- a/src/jalview/appletgui/EditNameDialog.java +++ b/src/jalview/appletgui/EditNameDialog.java @@ -20,7 +20,12 @@ */ package jalview.appletgui; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Font; +import java.awt.Frame; +import java.awt.Label; +import java.awt.Panel; +import java.awt.TextField; public class EditNameDialog extends JVDialog { diff --git a/src/jalview/appletgui/JVDialog.java b/src/jalview/appletgui/JVDialog.java index 19d7b4c..58c4feb 100644 --- a/src/jalview/appletgui/JVDialog.java +++ b/src/jalview/appletgui/JVDialog.java @@ -20,8 +20,14 @@ */ package jalview.appletgui; -import java.awt.*; -import java.awt.event.*; +import java.awt.BorderLayout; +import java.awt.Button; +import java.awt.Dialog; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.Panel; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; public class JVDialog extends Dialog implements ActionListener { diff --git a/src/jalview/appletgui/PaintRefresher.java b/src/jalview/appletgui/PaintRefresher.java index 7b54b1c..7c6fad0 100755 --- a/src/jalview/appletgui/PaintRefresher.java +++ b/src/jalview/appletgui/PaintRefresher.java @@ -20,12 +20,14 @@ */ package jalview.appletgui; -import java.util.*; -import java.util.List; - -import java.awt.*; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.SequenceI; -import jalview.datamodel.*; +import java.awt.Component; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.List; +import java.util.Vector; /** * DOCUMENT ME! diff --git a/src/jalview/appletgui/RotatableCanvas.java b/src/jalview/appletgui/RotatableCanvas.java index 6668849..63dcde0 100755 --- a/src/jalview/appletgui/RotatableCanvas.java +++ b/src/jalview/appletgui/RotatableCanvas.java @@ -20,16 +20,28 @@ */ package jalview.appletgui; -import java.util.*; -import java.awt.*; -import java.awt.event.*; - import jalview.api.RotatableCanvasI; -import jalview.datamodel.*; -import jalview.math.*; -import jalview.util.*; +import jalview.datamodel.SequenceGroup; +import jalview.datamodel.SequenceI; +import jalview.datamodel.SequencePoint; +import jalview.math.RotatableMatrix; +import jalview.util.Format; +import jalview.util.MessageManager; import jalview.viewmodel.AlignmentViewport; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.Panel; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.util.Vector; + public class RotatableCanvas extends Panel implements MouseListener, MouseMotionListener, KeyListener, RotatableCanvasI { @@ -275,7 +287,7 @@ public class RotatableCanvas extends Panel implements MouseListener, dim = height; } - return (float) (dim * scalefactor / (2 * maxwidth)); + return dim * scalefactor / (2 * maxwidth); } public void findCentre() @@ -385,8 +397,8 @@ public class RotatableCanvas extends Panel implements MouseListener, for (int i = 0; i < npoint; i++) { SequencePoint sp = (SequencePoint) points.elementAt(i); - int x = (int) ((float) (sp.coord[0] - centre[0]) * scale) + halfwidth; - int y = (int) ((float) (sp.coord[1] - centre[1]) * scale) + int x = (int) ((sp.coord[0] - centre[0]) * scale) + halfwidth; + int y = (int) ((sp.coord[1] - centre[1]) * scale) + halfheight; float z = sp.coord[1] - centre[2]; @@ -562,8 +574,8 @@ public class RotatableCanvas extends Panel implements MouseListener, rotmat.setIdentity(); - rotmat.rotate((float) (my - omy), 'x'); - rotmat.rotate((float) (mx - omx), 'y'); + rotmat.rotate(my - omy, 'x'); + rotmat.rotate(mx - omx, 'y'); for (int i = 0; i < npoint; i++) { @@ -597,8 +609,8 @@ public class RotatableCanvas extends Panel implements MouseListener, for (int i = 0; i < npoint; i++) { SequencePoint sp = (SequencePoint) points.elementAt(i); - int tmp1 = (int) ((sp.coord[0] - centre[0]) * scale + (float) getSize().width / 2.0); - int tmp2 = (int) ((sp.coord[1] - centre[1]) * scale + (float) getSize().height / 2.0); + int tmp1 = (int) ((sp.coord[0] - centre[0]) * scale + getSize().width / 2.0); + int tmp2 = (int) ((sp.coord[1] - centre[1]) * scale + getSize().height / 2.0); if (tmp1 > x1 && tmp1 < x2 && tmp2 > y1 && tmp2 < y2) { @@ -626,9 +638,9 @@ public class RotatableCanvas extends Panel implements MouseListener, { SequencePoint sp = (SequencePoint) points.elementAt(i); - int px = (int) ((float) (sp.coord[0] - centre[0]) * scale) + int px = (int) ((sp.coord[0] - centre[0]) * scale) + halfwidth; - int py = (int) ((float) (sp.coord[1] - centre[1]) * scale) + int py = (int) ((sp.coord[1] - centre[1]) * scale) + halfheight; if (Math.abs(px - x) < 3 && Math.abs(py - y) < 3) diff --git a/src/jalview/appletgui/Tooltip.java b/src/jalview/appletgui/Tooltip.java index c9df482..7a65ec3 100755 --- a/src/jalview/appletgui/Tooltip.java +++ b/src/jalview/appletgui/Tooltip.java @@ -20,11 +20,20 @@ */ package jalview.appletgui; -import java.applet.*; -import java.util.*; - -import java.awt.*; -import java.awt.event.*; +import java.applet.Applet; +import java.awt.Canvas; +import java.awt.Color; +import java.awt.Component; +import java.awt.Container; +import java.awt.FontMetrics; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.LayoutManager; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.util.StringTokenizer; public class Tooltip extends Canvas implements MouseListener, MouseMotionListener