+ * Resize Mode - defines way of resizing images that are being compared. One of the following constants: + *
* Threshold value is applied in the following way: {@code Math.abs(image.getSize() * scale * - size) / image.getSize() > PROPORTION_DISTORTION_THRESHOLD}, where {@code image.getSize()} * is both image dimensions and {@code size} is target width and height (which * is defined as mininum of sizes of two images) and scale is the scale factor * that scales the particular image to fit the width and height. - *
+ ** Default value is 0.02 so as much as 2% of width/height could differ (around 5 * in 0-255 color component values).
image1.getWidth() * image1.getHeight() * roughness
+ * image1.getWidth() * image1.getHeight() * roughness
*/
public Point findImage(BufferedImage image, int index) {
int smallWidth = image.getWidth();
--- old/core/JemmyAWTInput/src/org/jemmy/image/StrictImageComparator.java 2018-05-20 10:11:38.489431142 +0200
+++ new/core/JemmyAWTInput/src/org/jemmy/image/StrictImageComparator.java 2018-05-20 10:11:38.431429372 +0200
@@ -29,7 +29,8 @@
/**
* Compares two images strictly (i.e. all the pixel colors should match).
*
- * @author Alexandre Iline (alexandre.iline@sun.com), KAM
+ * @author shura
+ * @author mrkam
*/
public class StrictImageComparator extends BufferedImageComparator {
--- old/core/JemmyAWTInput/src/org/jemmy/image/Utils.java 2018-05-20 10:11:38.711437917 +0200
+++ new/core/JemmyAWTInput/src/org/jemmy/image/Utils.java 2018-05-20 10:11:38.648435994 +0200
@@ -32,60 +32,30 @@
/**
*
- * @author Alexander Kouznetsov
+ * @author mrkam
*/
public class Utils {
- /**
- *
- * @param r
- * @return java.awt.Rectangle
- */
public static java.awt.Rectangle convert(Rectangle r) {
return new java.awt.Rectangle(r.x, r.y, r.width, r.height);
}
- /**
- *
- * @param r
- * @return org.jemmy.Rectangle
- */
public static Rectangle convert(java.awt.Rectangle r) {
return new Rectangle(r.x, r.y, r.width, r.height);
}
- /**
- *
- * @param p
- * @return java.awt.Point
- */
public static java.awt.Point convert(Point p) {
return new java.awt.Point(p.x, p.y);
}
- /**
- *
- * @param p
- * @return org.jemmy.Point
- */
public static Point convert(java.awt.Point p) {
return new Point(p.x, p.y);
}
- /**
- *
- * @param d
- * @return java.awt.Dimension
- */
public static java.awt.Dimension convert(Dimension d) {
return new java.awt.Dimension(d.width, d.height);
}
- /**
- *
- * @param d
- * @return org.jemmy.Dimension
- */
public static Dimension convert(java.awt.Dimension d) {
return new Dimension(d.width, d.height);
}
--- old/core/JemmyAWTInput/src/org/jemmy/input/AWTMap.java 2018-05-20 10:11:38.940444906 +0200
+++ new/core/JemmyAWTInput/src/org/jemmy/input/AWTMap.java 2018-05-20 10:11:38.882443135 +0200
@@ -43,7 +43,7 @@
/**
* Converts
- * @author Alexander Kouznetsov
+ * @author mrkam
*/
public class AWTMap {
@@ -129,7 +129,7 @@
/**
* TODO Provide javadoc
- * @param button
+ * @param button todo document
* @return One of InputEvent.VK_* constants
* @see InputEvent
*/
@@ -141,11 +141,6 @@
}
}
- /**
- * TODO Provide javadoc
- * @param modifiers
- * @return
- */
public int convert(Modifier... modifiers) {
int result = 0;
for (Modifier modifier : modifiers) {
@@ -158,11 +153,6 @@
return result;
}
- /**
- * TODO Provide javadoc
- * @param button
- * @return
- */
public int convert(MouseButton button) {
try {
return button2int.get(button);
@@ -171,11 +161,6 @@
}
}
- /**
- * TODO Provide javadoc
- * @param key
- * @return
- */
public KeyboardButton convertKeyboardButton(int key) {
KeyboardButton res = int2key.get(key);
if (res == null) {
@@ -184,11 +169,6 @@
return res;
}
- /**
- * TODO Provide javadoc
- * @param modifiers
- * @return
- */
public Modifier[] convertModifiers(int modifiers) {
List result = new ArrayList();
for (int key : int2modifier.keySet()) {
@@ -203,11 +183,6 @@
return result.toArray(new Modifier[result.size()]);
}
- /**
- * TODO Provide javadoc
- * @param button
- * @return
- */
public MouseButton convertMouseButton(int button) {
MouseButton res = int2button.get(button);
if (res == null) {
--- old/core/JemmyAWTInput/src/org/jemmy/input/ClassReference.java 2018-05-20 10:11:39.164451741 +0200
+++ new/core/JemmyAWTInput/src/org/jemmy/input/ClassReference.java 2018-05-20 10:11:39.104449910 +0200
@@ -55,7 +55,7 @@
* to access static methods and fields only.
*
* @param className name of class
- * @exception ClassNotFoundException
+ * @throws ClassNotFoundException todo document
*/
public ClassReference(String className)
throws ClassNotFoundException {
@@ -69,8 +69,8 @@
* with a zero-length java.lang.String
array
* as a parameter.
*
- * @exception NoSuchMethodException
- * @exception InvocationTargetException
+ * @throws NoSuchMethodException when the method cannot be found.
+ * @throws InvocationTargetException when the invoked method throws an exception.
*/
public void startApplication()
throws InvocationTargetException, NoSuchMethodException {
@@ -83,8 +83,8 @@
*
* @param params The java.lang.String
array to pass
* to main(java.lang.String[])
.
- * @exception NoSuchMethodException
- * @exception InvocationTargetException
+ * @throws NoSuchMethodException when the method cannot be found.
+ * @throws InvocationTargetException when the invoked method throws an exception.
*/
public void startApplication(String[] params)
throws InvocationTargetException, NoSuchMethodException {
@@ -111,8 +111,8 @@
* @param method_name Name of method.
* @param params Method parameters.
* @param params_classes Method parameters types.
- * @return the return value from an invocation of the Method.
- * If method_name
method is void, null
is returned.
+ * @return the return value from an invocation of the Method.
+ * If method_name
method is void, null
is returned.
* If method_name
method returns a primitive type, then
* return wrapper class instance.
* @throws InvocationTargetException when the invoked method throws an exception.
--- old/core/JemmyAWTInput/src/org/jemmy/input/DragImpl.java 2018-05-20 10:11:39.397458852 +0200
+++ new/core/JemmyAWTInput/src/org/jemmy/input/DragImpl.java 2018-05-20 10:11:39.336456990 +0200
@@ -40,14 +40,10 @@
/**
- *
* @author shura
*/
public class DragImpl implements Drag {
- /**
- *
- */
public static final int DND_POINTS = 10;
static {
@@ -58,60 +54,26 @@
private Wrap> source;
- /**
- *
- * @param source
- */
public DragImpl(Wrap> source) {
this.source = source;
}
- /**
- *
- * @param targetPoint
- */
public void dnd(Point targetPoint) {
dnd(source, targetPoint);
}
- /**
- *
- * @param target
- * @param targetPoint
- */
public void dnd(Wrap target, Point targetPoint) {
dnd(source.getClickPoint(), target, targetPoint);
}
- /**
- *
- * @param point
- * @param target
- * @param targetPoint
- */
public void dnd(Point point, Wrap target, Point targetPoint) {
dnd(point, target, targetPoint, MouseButtons.BUTTON1);
}
- /**
- *
- * @param point
- * @param target
- * @param targetPoint
- * @param button
- */
public void dnd(Point point, Wrap target, Point targetPoint, MouseButton button) {
dnd(point, target, targetPoint, button, new Modifier[]{});
}
- /**
- *
- * @param point
- * @param target
- * @param targetPoint
- * @param button
- * @param modifiers
- */
public void dnd(Point pointParam, final Wrap target, final Point targetPoint, final MouseButton button, final Modifier... modifiers) {
final Point point = pointParam == null ? source.getClickPoint() : pointParam;
source.getEnvironment().getExecutor().execute(target.getEnvironment(), false, new Action() {
--- old/core/JemmyAWTInput/src/org/jemmy/input/KeyboardImpl.java 2018-05-20 10:11:39.630465963 +0200
+++ new/core/JemmyAWTInput/src/org/jemmy/input/KeyboardImpl.java 2018-05-20 10:11:39.571464162 +0200
@@ -46,10 +46,7 @@
Wrap> target;
RobotDriver robotDriver;
private boolean detached;
- /**
- * Constructs a KeyRobotDriver object.
- * @param target
- */
+
public KeyboardImpl(Wrap> target) {
//TODO: super(target.getEnvironment().getTimeout(RobotDriver.ROBOT_DELAY_TIMEOUT_NAME));
robotDriver = new RobotDriver(target.getEnvironment());
@@ -72,20 +69,10 @@
}
}
- /**
- *
- * @return Environment
- */
public Environment getEnvironment() {
return env;
}
- /**
- *
- * @param kbdButton
- * @param modifiers
- * @param pushTime
- */
public void pushKey(final KeyboardButton kbdButton, final Modifier modifiers[], final Timeout pushTime) {
runAction(new Action() {
public void run(Object... parameters) {
@@ -101,11 +88,6 @@
});
}
- /**
- *
- * @param keyChar
- * @param pushTime
- */
@Override
public void typeChar(char keyChar, Timeout pushTime) {
pushKey(pushTime, map.getCharKey(keyChar), map.getCharModifiers(keyChar));
@@ -151,47 +133,28 @@
});
}
- /**
- *
- * @param kbdButton
- */
@Override
public void pressKey(KeyboardButton kbdButton) {
pressKey(kbdButton, new Modifier[]{});
}
- /**
- *
- * @param kbdButton
- */
+
@Override
public void releaseKey(KeyboardButton kbdButton) {
releaseKey(kbdButton, new Modifier[]{});
}
- /**
- *
- * @param kbdButton
- * @param modifiers
- */
+
@Override
public void pushKey(KeyboardButton kbdButton, Modifier... modifiers) {
pushKey(kbdButton, modifiers, getEnvironment().getTimeout(PUSH.getName()));
}
- /**
- *
- * @param kbdButton
- */
@Override
public void pushKey(KeyboardButton kbdButton) {
pushKey(kbdButton, new Modifier[]{});
}
- /**
- *
- * @param keyChar
- */
@Override
public void typeChar(char keyChar) {
typeChar(keyChar, getEnvironment().getTimeout(PUSH.getName()));
--- old/core/JemmyAWTInput/src/org/jemmy/input/MouseImpl.java 2018-05-20 10:11:39.856472860 +0200
+++ new/core/JemmyAWTInput/src/org/jemmy/input/MouseImpl.java 2018-05-20 10:11:39.798471090 +0200
@@ -52,10 +52,6 @@
}
}
- /**
- *
- * @param target
- */
public MouseImpl(Wrap> target) {
this.target = target;
this.robotDriver = new RobotDriver(new Timeout("", 10));
@@ -74,28 +70,16 @@
}
}
- /**
- *
- */
@Override
public void press() {
press(MouseButtons.BUTTON1);
}
- /**
- *
- * @param button
- */
@Override
public void press(MouseButton button) {
press(button, new Modifier[]{});
}
- /**
- *
- * @param button
- * @param modifiers
- */
@Override
public void press(final MouseButton button, final Modifier... modifiers) {
runAction(new Action() {
@@ -111,27 +95,15 @@
});
}
- /**
- *
- */
public void release() {
release(MouseButtons.BUTTON1);
}
- /**
- *
- * @param button
- */
@Override
public void release(MouseButton button) {
release(button, new Modifier[]{});
}
- /**
- *
- * @param button
- * @param modifiers
- */
@Override
public void release(final MouseButton button, final Modifier... modifiers) {
runAction(new Action() {
@@ -147,17 +119,10 @@
});
}
- /**
- *
- */
public void move() {
move(target.getClickPoint());
}
- /**
- *
- * @param p
- */
public void move(final Point p) {
runAction(new Action() {
@@ -172,24 +137,16 @@
});
}
- /**
- *
- */
public void click() {
this.click(1);
}
- /**
- *
- * @param count
- */
public void click(int count) {
this.click(count, null);
}
/**
- *
- * @param count
+ * @param count todo document
* @param p Point to click, if null {@linkplain Wrap#getClickPoint()
* Wrap.getClickPoint()} method is invoked to get the point to click.
*/
@@ -199,10 +156,10 @@
/**
*
- * @param count
+ * @param count todo document
* @param p Point to click, if null {@linkplain Wrap#getClickPoint()
* Wrap.getClickPoint()} method is invoked to get the point to click.
- * @param button
+ * @param button todo document
*/
@Override
public void click(int count, Point p, MouseButton button) {
@@ -211,11 +168,11 @@
/**
*
- * @param count
+ * @param count todo document
* @param p Point to click, if null {@linkplain Wrap#getClickPoint()
* Wrap.getClickPoint()} method is invoked to get the point to click.
- * @param button
- * @param modifiers
+ * @param button todo document
+ * @param modifiers todo document
*/
@Override
public void click(final int count, final Point p, final MouseButton button, final Modifier... modifiers) {
--- old/core/JemmyAWTInput/src/org/jemmy/input/RobotDriver.java 2018-05-20 10:11:40.084479818 +0200
+++ new/core/JemmyAWTInput/src/org/jemmy/input/RobotDriver.java 2018-05-20 10:11:40.026478048 +0200
@@ -44,7 +44,9 @@
/**
- * @author Alexandre Iline(alexandre.iline@sun.com), KAM
+ * @author shura
+ * @author mrkam
+ *
*/
public class RobotDriver {
@@ -58,7 +60,7 @@
new Timeout(ROBOT_DELAY_TIMEOUT_NAME, 10));
Environment.getEnvironment().setPropertyIfNotSet(
AWTRobotInputFactory.ROBOT_MOUSE_SMOOTHNESS_PROPERTY,
- new Integer(Integer.MAX_VALUE).toString());
+ Integer.toString(Integer.MAX_VALUE));
smoothness = Integer.parseInt(
(String)Environment.getEnvironment().getProperty(
AWTRobotInputFactory.ROBOT_MOUSE_SMOOTHNESS_PROPERTY));
@@ -208,9 +210,9 @@
/**
* @deprecated Implementation doesn't seem to be correct as it ignores mouseButton and modifiers
- * @param point
+ * @param point todo document
* @param mouseButton One of MouseEvent.BUTTON*_MASK
- * @param modifiers
+ * @param modifiers todo document
*/
public void dragMouse(Point point, int mouseButton, int modifiers) {
moveMouse(point);
@@ -263,9 +265,9 @@
/**
* Turns the wheel.
- * @param p
+ * @param p todo document
* @param amount Either positive or negative
- * @param modifiers
+ * @param modifiers a combination of InputEvent.*_MASK
fields.
*/
public void turnWheel(Point p, int amount, Modifier... modifiers) {
pressModifiers(modifiers);
--- old/core/JemmyAWTInput/src/org/jemmy/input/Version.java 2018-05-20 10:11:40.307486623 +0200
+++ new/core/JemmyAWTInput/src/org/jemmy/input/Version.java 2018-05-20 10:11:40.250484884 +0200
@@ -32,16 +32,10 @@
public static final Version VERSION = new Version();
- /**
- *
- */
public Version() {
super(Version.class.getPackage().getName());
}
- /**
- *
- * @param args
- */
+
public static void main(String[] args) {
System.out.println("JemmyAWTInput version: " + VERSION.getVersion());
}
--- old/core/JemmyAWTInput/src/org/jemmy/input/jemmy.properties 2018-05-20 10:11:40.531493459 +0200
+++ new/core/JemmyAWTInput/src/org/jemmy/input/jemmy.properties 2018-05-20 10:11:40.473491689 +0200
@@ -1,4 +1,4 @@
-version.major=0
-version.minor=9
-version.mini=5
+version.major=1
+version.minor=0
+version.mini=0
build=${buildnumber}
--- old/core/JemmyAWTInput/src/org/jemmy/operators/AWTScreen.java 2018-05-20 10:11:40.769500722 +0200
+++ new/core/JemmyAWTInput/src/org/jemmy/operators/AWTScreen.java 2018-05-20 10:11:40.709498891 +0200
@@ -30,22 +30,14 @@
import org.jemmy.env.Environment;
/**
- *
* @author shura
*/
public class AWTScreen extends Screen {
- /**
- *
- */
public AWTScreen() {
this(Environment.getEnvironment());
}
- /**
- *
- * @param env
- */
public AWTScreen(Environment env) {
super(env);
}
--- old/core/JemmyBrowser/pom.xml 2018-05-20 10:11:40.997507680 +0200
+++ new/core/JemmyBrowser/pom.xml 2018-05-20 10:11:40.940505941 +0200
@@ -26,12 +26,12 @@
-->
4.0.0
- org.jemmy.v3
- Jemmy
- 1.0
+ org.adoptopenjdk
+ jemmy
+ ${revision}
../../pom.xml
- JemmyBrowser
+ jemmy-browser
jar
org/jemmy/browser/jemmy.properties
@@ -39,9 +39,9 @@
- org.jemmy.v3
- JemmyCore
- 1.0
+ org.adoptopenjdk
+ jemmy-core
+ ${revision}
--- old/core/JemmyBrowser/src/org/jemmy/browser/SearchDialog.java 2018-05-20 10:11:41.239515065 +0200
+++ new/core/JemmyBrowser/src/org/jemmy/browser/SearchDialog.java 2018-05-20 10:11:41.177513173 +0200
@@ -34,7 +34,6 @@
public class SearchDialog extends javax.swing.JDialog {
private boolean doSearch;
- /** Creates new form SearchDialog */
public SearchDialog(java.awt.Frame parent) {
super(parent, true);
initComponents();
--- old/core/JemmyBrowser/src/org/jemmy/browser/jemmy.properties 2018-05-20 10:11:41.465521962 +0200
+++ new/core/JemmyBrowser/src/org/jemmy/browser/jemmy.properties 2018-05-20 10:11:41.407520192 +0200
@@ -1,4 +1,4 @@
-version.major=0
-version.minor=9
-version.mini=5
+version.major=1
+version.minor=0
+version.mini=0
build=${buildnumber}
--- old/core/JemmyCore/pom.xml 2018-05-20 10:11:41.700529134 +0200
+++ new/core/JemmyCore/pom.xml 2018-05-20 10:11:41.641527333 +0200
@@ -26,11 +26,11 @@
questions.
-->
- org.jemmy.v3
- Jemmy
- 1.0
+ org.adoptopenjdk
+ jemmy
+ ${revision}
../../pom.xml
- JemmyCore
+ jemmy-core
jar
--- old/core/JemmyCore/src/org/jemmy/Dimension.java 2018-05-20 10:11:41.930536153 +0200
+++ new/core/JemmyCore/src/org/jemmy/Dimension.java 2018-05-20 10:11:41.872534383 +0200
@@ -30,7 +30,7 @@
/**
* Replacement for java.awt.Dimension
- * @author Alexander Kouznetsov
+ * @author mrkam
*/
public class Dimension implements Serializable {
@@ -104,7 +104,6 @@
/**
* {@inheritDoc}
- * @return
*/
public double getWidth() {
return width;
@@ -112,7 +111,6 @@
/**
* {@inheritDoc}
- * @return
*/
public double getHeight() {
return height;
@@ -164,11 +162,6 @@
this.height = height;
}
- /**
- * Checks whether two dimension objects have equal values.
- * @param obj
- * @return
- */
@Override
public boolean equals(Object obj) {
if (obj instanceof Dimension) {
--- old/core/JemmyCore/src/org/jemmy/Point.java 2018-05-20 10:11:42.161543203 +0200
+++ new/core/JemmyCore/src/org/jemmy/Point.java 2018-05-20 10:11:42.103541433 +0200
@@ -31,7 +31,7 @@
/**
* Replacement for java.awt.Point
- * @author Alexander Kouznetsov
+ * @author mrkam
*/
public class Point implements Serializable{
/**
@@ -101,7 +101,6 @@
/**
* {@inheritDoc}
- * @return
*/
public int getX() {
return x;
@@ -109,7 +108,6 @@
/**
* {@inheritDoc}
- * @return
*/
public int getY() {
return y;
@@ -128,7 +126,7 @@
/**
* Sets the location of the point to the specified location.
* @param p a point, the new location for this point
- * @return
+ * @return self
* @see org.jemmy.Point#getLocation
*/
public Point setLocation(Point p) {
@@ -142,7 +140,7 @@
* Its behavior is identical with move(int, int)
.
* @param x the X coordinate of the new location
* @param y the Y coordinate of the new location
- * @return self
+ * @return self
* @see org.jemmy.Point#getLocation
* @see org.jemmy.Point#move(int, int)
*/
@@ -203,8 +201,9 @@
}
/**
+ * Translates the current point according to the given vector.
*
- * @param v
+ * @param v vector by which to translate the point
* @return self
*/
public Point translate(Vector v) {
@@ -233,7 +232,6 @@
/**
* {@inheritDoc}
- * @return
*/
@Override
public int hashCode() {
--- old/core/JemmyCore/src/org/jemmy/Rectangle.java 2018-05-20 10:11:42.378549825 +0200
+++ new/core/JemmyCore/src/org/jemmy/Rectangle.java 2018-05-20 10:11:42.327548269 +0200
@@ -31,7 +31,7 @@
/**
* Replacement for java.awt.Rectangle
- * @author Alexander Kouznetsov
+ * @author mrkam
*/
public class Rectangle implements Serializable {
@@ -898,7 +898,6 @@
/**
* {@inheritDoc}
- * @return
*/
public boolean isEmpty() {
return (width <= 0) || (height <= 0);
@@ -930,7 +929,6 @@
/**
* {@inheritDoc }
- * @return
*/
@Override
public int hashCode() {
--- old/core/JemmyCore/src/org/jemmy/Vector.java 2018-05-20 10:11:42.603556691 +0200
+++ new/core/JemmyCore/src/org/jemmy/Vector.java 2018-05-20 10:11:42.545554921 +0200
@@ -34,55 +34,28 @@
private double x;
private double y;
- /**
- *
- * @param x
- * @param y
- */
public Vector(double x, double y) {
this.x = x;
this.y = y;
}
- /**
- *
- * @param from
- * @param to
- */
public Vector(Point from, Point to) {
x = to.x - from.x;
y = to.y - from.y;
}
- /**
- *
- * @return
- */
public double getX() {
return x;
}
- /**
- *
- * @return
- */
public double getY() {
return y;
}
- /**
- *
- * @return
- */
public double lenght() {
return Math.sqrt(x*x + y*y);
}
- /**
- *
- * @param newLenght
- * @return self
- */
public Vector setLenght(double newLenght) {
double lenght = lenght();
x = x * newLenght / lenght;
@@ -90,10 +63,6 @@
return this;
}
- /**
- * @param multiplier
- * @return self
- */
public Vector multiply(double multiplier) {
x*=multiplier;
y*=multiplier;
@@ -101,8 +70,7 @@
}
/**
- *
- * @return a clone
+ * {@inheritDoc}
*/
@Override
public Vector clone() {
@@ -110,24 +78,17 @@
}
/**
- *
- * @return
+ * {@inheritDoc}
*/
@Override
public String toString() {
return "(" + x + "," + y + ")";
}
- /**
- * Adds another vector (x1 + x2, y1 + y2)
- * @param v
- * @return self
- */
public Vector add(Vector v) {
x+=v.x;
y+=v.y;
return this;
}
-
}
--- old/core/JemmyCore/src/org/jemmy/Version.java 2018-05-20 10:11:42.821563344 +0200
+++ new/core/JemmyCore/src/org/jemmy/Version.java 2018-05-20 10:11:42.770561788 +0200
@@ -35,9 +35,6 @@
* @author shura
*/
public class Version {
- /**
- *
- */
public static final Version VERSION = new Version();
private int major;
@@ -45,17 +42,10 @@
private int mini;
private String build;
- /**
- *
- */
public Version() {
this(Version.class.getPackage().getName());
}
- /**
- *
- * @param pkg
- */
public Version(String pkg) {
try {
Properties props = new Properties();
@@ -74,51 +64,27 @@
}
}
- /**
- *
- * @return
- */
public int getMajor() {
return major;
}
- /**
- *
- * @return
- */
+
public int getMini() {
return mini;
}
- /**
- *
- * @return
- */
public int getMinor() {
return minor;
}
- /**
- *
- * @return
- */
public String getVersion() {
return major + "." + minor + "." + mini;
}
- /**
- *
- * @return
- */
public String getBuild() {
return build;
}
- /**
- *
- * @param old
- * @return
- */
public boolean newer(String old) {
StringTokenizer tn = new StringTokenizer(old, ".");
if(major >= Integer.parseInt(tn.nextToken())) {
@@ -131,10 +97,6 @@
return false;
}
- /**
- *
- * @param args
- */
public static void main(String[] args) {
System.out.println("JemmyCore version: " + VERSION.getVersion() + "." + VERSION.build);
}
--- old/core/JemmyCore/src/org/jemmy/action/AbstractExecutor.java 2018-05-20 10:11:43.042570089 +0200
+++ new/core/JemmyCore/src/org/jemmy/action/AbstractExecutor.java 2018-05-20 10:11:42.983568288 +0200
@@ -59,9 +59,6 @@
public static final String QUEUE_ACTION_OUTPUT = "org.jemmy.action.AbstractExecutor.QUEUE_ACTION_OUTPUT";
private ActionQueue queue;
- /**
- *
- */
public AbstractExecutor() {
queue = new ActionQueue();
}
@@ -72,21 +69,18 @@
Environment.getEnvironment().initOutput(NON_QUEUE_ACTION_OUTPUT, TestOut.getNullOutput());
}
- /**
- *
- * @return
- */
protected int actionsInQueue() {
return queue.actionsInQueue();
}
/**
* {@inheritDoc }
+ *
* Prints out what action is executed into output
* specified by either NON_QUEUE_ACTION_OUTPUT or QUEUE_ACTION_OUTPUT
* depending whether the action is called on queue or not. No output provided for
* nested actions - only the top level ones are printed.
- * @see TestOut#getOutput(java.lang.String)
+ * @see TestOut#getOutput()
*/
public final void execute(Environment env, boolean dispatch, final Action action, Object... parameters) {
printStrace(env, "Action: ", action);
@@ -104,11 +98,12 @@
/**
* {@inheritDoc }
+ *
* Prints out what action is executed into output
* specified by either NON_QUEUE_ACTION_OUTPUT or QUEUE_ACTION_OUTPUT
* depending whether the action is called on queue or not. No output provided for
* nested actions - only the top level ones are printed.
- * @see TestOut#getOutput(java.lang.String)
+ * @see TestOut#getOutput()
*/
public final void executeDetached(Environment env, boolean dispatch, final Action action, final Object... parameters) {
printStrace(env, "Action detached: ", action);
--- old/core/JemmyCore/src/org/jemmy/action/Action.java 2018-05-20 10:11:43.293577749 +0200
+++ new/core/JemmyCore/src/org/jemmy/action/Action.java 2018-05-20 10:11:43.237576040 +0200
@@ -28,7 +28,6 @@
/**
- *
* @author shura, KAM
*/
public abstract class Action {
@@ -41,8 +40,7 @@
* Executes {@linkplain #run(java.lang.Object[]) run()} method of this
* Action, saving the duration of its execution and storing any
* RuntimeException and Error which may occur during its work.
- * @param parameters Parameters to pass to {@linkplain
- * #run(java.lang.Object[]) run()} method
+ * @param parameters Parameters to pass to {@linkplain #run(java.lang.Object[]) run()} method
* @see #getThrowable()
* @see #failed()
*/
@@ -64,24 +62,16 @@
}
}
- /**
- *
- * @return
- */
public long getEndTime() {
return endTime;
}
- /**
- *
- * @return
- */
public long getStartTime() {
return startTime;
}
/**
- * Should be used from {@linkplain #run(java.lang.Object[]) run()) method
+ * Should be used from {@linkplain #run(java.lang.Object[]) run()} method
* to check whether execution time is withing allowed time
* @return true if difference between current time and start time is less
* then allowed time; false otherwice
@@ -90,39 +80,20 @@
return System.currentTimeMillis() - startTime < allowedTime;
}
- /**
- *
- * @return
- */
public long getAllowedTime() {
return allowedTime;
}
- /**
- *
- * @param allowedTime
- */
public void setAllowedTime(long allowedTime) {
this.allowedTime = allowedTime;
}
- /**
- *
- * @param parameters
- */
public abstract void run(Object... parameters) throws Exception;
- /**
- *
- * @return
- */
public boolean isInterrupted() {
return interrupted;
}
- /**
- *
- */
public void interrupt() {
this.interrupted = true;
}
--- old/core/JemmyCore/src/org/jemmy/action/ActionExecutor.java 2018-05-20 10:11:43.504584188 +0200
+++ new/core/JemmyCore/src/org/jemmy/action/ActionExecutor.java 2018-05-20 10:11:43.445582387 +0200
@@ -36,9 +36,6 @@
*/
public interface ActionExecutor {
- /**
- *
- */
public static final String ACTION_EXECUTOR_PROPERTY = "action.executor";
/**
@@ -69,7 +66,6 @@
/**
* Checks whether the current thread is already performing an action.
* @return true if the current thread is already performing an action.
- * @see AbstractExecutor#isDispatchThread()
*/
public boolean isInAction();
--- old/core/JemmyCore/src/org/jemmy/action/GetAction.java 2018-05-20 10:11:43.724590902 +0200
+++ new/core/JemmyCore/src/org/jemmy/action/GetAction.java 2018-05-20 10:11:43.666589132 +0200
@@ -30,7 +30,7 @@
/**
* An action to get some value.
- * @param
+ *
* @author shura
*/
public abstract class GetAction extends Action {
@@ -38,32 +38,17 @@
private boolean finished = false;
private T result = null;
- /**
- *
- */
public GetAction() {
}
- /**
- *
- * @return
- */
public boolean isFinished() {
return finished;
}
- /**
- *
- * @return
- */
public T getResult() {
return result;
}
- /**
- *
- * @param result
- */
protected void setResult(T result) {
this.result = result;
finished = true;
--- old/core/JemmyCore/src/org/jemmy/control/AbstractWrapper.java 2018-05-20 10:11:43.941597524 +0200
+++ new/core/JemmyCore/src/org/jemmy/control/AbstractWrapper.java 2018-05-20 10:11:43.889595937 +0200
@@ -39,32 +39,16 @@
private Environment env;
- /**
- *
- * @param env
- */
- @SuppressWarnings("unchecked")
public AbstractWrapper(Environment env) {
this.env = env;
}
- /**
- *
- * @return
- */
public Environment getEnvironment() {
return env;
}
protected abstract Class getWrapClass(Class controlClass);
- /**
- *
- * @param
- * @param controlClass
- * @param control
- * @return Wrap
- */
public Wrap extends T> wrap(Class controlClass, T control) {
Class cls = control.getClass();
Class wrp;
@@ -91,20 +75,6 @@
throw new WrapperException(control);
}
- /**
- *
- * @param
- * @param control
- * @param controlClass
- * @param wrapperClass
- * @return Wrap
- * @throws java.lang.NoSuchMethodException
- * @throws java.lang.InstantiationException
- * @throws java.lang.IllegalAccessException
- * @throws java.lang.IllegalArgumentException
- * @throws java.lang.reflect.InvocationTargetException
- */
- @SuppressWarnings("unchecked")
protected Wrap extends T> doWrap(T control, Class controlClass, Class wrapperClass) throws NoSuchMethodException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Constructor cns = null;
Class cls = controlClass;
--- old/core/JemmyCore/src/org/jemmy/control/As.java 2018-05-20 10:11:44.156604085 +0200
+++ new/core/JemmyCore/src/org/jemmy/control/As.java 2018-05-20 10:11:44.101602407 +0200
@@ -45,7 +45,7 @@
* This should point out what is the encapsulated type for
* TypeControlInterface
* @see TypeControlInterface
- * @return
+ * @return todo document
*/
Class value() default Void.class;
}
--- old/core/JemmyCore/src/org/jemmy/control/ControlInterfaces.java 2018-05-20 10:11:44.373610708 +0200
+++ new/core/JemmyCore/src/org/jemmy/control/ControlInterfaces.java 2018-05-20 10:11:44.317608999 +0200
@@ -48,6 +48,7 @@
/**
* List of interfaces supported by this wrap.
* @see ControlInterface
+ * @return todo document
*/
Class extends ControlInterface>[] value();
/**
@@ -57,11 +58,13 @@
* provide anything for a ControlInterface
which is not a
* TypeControlInterface
* @see TypeControlInterface
+ * @return todo document
*/
Class[] encapsulates() default {};
/**
* This provides names for the dock methods which would be generated. If the array
* does not have enough elements, the method would be named as "as" + value[i].getName()
.
+ * @return todo document
*/
String[] name() default {};
}
--- old/core/JemmyCore/src/org/jemmy/control/ControlType.java 2018-05-20 10:11:44.582617086 +0200
+++ new/core/JemmyCore/src/org/jemmy/control/ControlType.java 2018-05-20 10:11:44.527615407 +0200
@@ -35,9 +35,6 @@
@Target(ElementType.TYPE)
@Documented
public @interface ControlType {
- /**
- *
- * @return
- */
+
Class[] value();
}
--- old/core/JemmyCore/src/org/jemmy/control/DefaultWrapper.java 2018-05-20 10:11:44.791623464 +0200
+++ new/core/JemmyCore/src/org/jemmy/control/DefaultWrapper.java 2018-05-20 10:11:44.738621846 +0200
@@ -27,36 +27,19 @@
import org.jemmy.env.Environment;
/**
- *
* @author shura
*/
public class DefaultWrapper extends WrapperImpl {
- /**
- *
- * @param env
- * @param wrapList
- */
- @SuppressWarnings("unchecked")
public DefaultWrapper(Environment env, Class extends Wrap>... wrapList) {
super(env);
addAnnotated(wrapList);
}
- /**
- *
- * @param env
- */
- @SuppressWarnings("unchecked")
public DefaultWrapper(Environment env) {
super(env);
}
- /**
- *
- * @param list
- */
- @SuppressWarnings("unchecked")
public final void addAnnotated(Class extends Wrap>... list) {
for (Class cn : list) {
if (!cn.isAnnotationPresent(ControlType.class)) {
--- old/core/JemmyCore/src/org/jemmy/control/FieldProperties.java 2018-05-20 10:11:45.015630300 +0200
+++ new/core/JemmyCore/src/org/jemmy/control/FieldProperties.java 2018-05-20 10:11:44.955628469 +0200
@@ -44,16 +44,16 @@
@Documented
public @interface FieldProperties {
/**
- * List of field names.
+ * @return list of field names.
*/
String[] value();
/**
- * List of field types. In case this list is shorter, all the unmatched ones
+ * @return list of field types. In case this list is shorter, all the unmatched ones
* from value
are considered to be of type Object
.
*/
Class[] types() default {};
/**
- * Are the properties worth a waiter.
+ * @return are the properties worth a waiter.
*/
boolean[] waitable() default {};
}
--- old/core/JemmyCore/src/org/jemmy/control/LazyWrapper.java 2018-05-20 10:11:45.224636678 +0200
+++ new/core/JemmyCore/src/org/jemmy/control/LazyWrapper.java 2018-05-20 10:11:45.170635030 +0200
@@ -40,22 +40,13 @@
private final HashMap theWrappers = new HashMap();
private final ClassLoader loader;
- /**
- *
- * @param env
- */
- @SuppressWarnings("unchecked")
+
public LazyWrapper(ClassLoader loader, Environment env) {
super(env);
this.loader = loader;
}
- /**
- *
- * @param
- * @param controlClass
- * @param wrapperClass
- */
+
public
void add(String controlClass, String wrapperClass) {
theWrappers.put(controlClass, wrapperClass);
}
--- old/core/JemmyCore/src/org/jemmy/control/MethodProperties.java 2018-05-20 10:11:45.446643453 +0200
+++ new/core/JemmyCore/src/org/jemmy/control/MethodProperties.java 2018-05-20 10:11:45.387641652 +0200
@@ -45,16 +45,16 @@
@Documented
public @interface MethodProperties {
/**
- * List of method names
+ * @return list of method names
*/
String[] value();
/**
- * List of field types. In case this list is shorter, all the unmatched ones
+ * @return list of field types. In case this list is shorter, all the unmatched ones
* from value
are considered to be of type Object
.
*/
Class[] types() default {};
/**
- * Are the properties worth a waiter.
+ * @return are the properties worth a waiter.
*/
boolean[] waitable() default {};
}
--- old/core/JemmyCore/src/org/jemmy/control/Property.java 2018-05-20 10:11:45.660649984 +0200
+++ new/core/JemmyCore/src/org/jemmy/control/Property.java 2018-05-20 10:11:45.604648275 +0200
@@ -49,7 +49,7 @@
*/
String value();
/**
- * Are the properties worth a waiter.
+ * @return are the properties worth a waiter.
*/
boolean waitable() default false;
}
--- old/core/JemmyCore/src/org/jemmy/control/ScreenArea.java 2018-05-20 10:11:45.882656759 +0200
+++ new/core/JemmyCore/src/org/jemmy/control/ScreenArea.java 2018-05-20 10:11:45.826655050 +0200
@@ -34,9 +34,6 @@
* @author shura
*/
public interface ScreenArea {
- /**
- *
- * @return
- */
+
public abstract Rectangle getScreenBounds();
}
--- old/core/JemmyCore/src/org/jemmy/control/SelectorImpl.java 2018-05-20 10:11:46.100663411 +0200
+++ new/core/JemmyCore/src/org/jemmy/control/SelectorImpl.java 2018-05-20 10:11:46.045661733 +0200
@@ -31,9 +31,6 @@
import org.jemmy.timing.State;
/**
- *
- * @param
- * @param
* @author shura
*/
public class SelectorImpl implements Selector {
@@ -41,21 +38,11 @@
Wrap extends CONTROL> target;
Selectable selectable;
- /**
- *
- * @param target
- * @param selectable
- */
public SelectorImpl(Wrap extends CONTROL> target, Selectable selectable) {
this.target = target;
this.selectable = selectable;
}
- /**
- *
- * @param state
- */
- @SuppressWarnings("unchecked")
public void select(final STATE state) {
if (target.is(Showable.class)) {
target.as(Showable.class).shower().show();
--- old/core/JemmyCore/src/org/jemmy/control/Wrap.java 2018-05-20 10:11:46.319670095 +0200
+++ new/core/JemmyCore/src/org/jemmy/control/Wrap.java 2018-05-20 10:11:46.259668264 +0200
@@ -53,65 +53,21 @@
@ControlInterfaces({Mouse.class, Keyboard.class, Drag.class})
public abstract class Wrap {
- /**
- *
- */
public static final String BOUNDS_PROP_NAME = "bounds";
- /**
- *
- */
public static final String CLICKPOINT_PROP_NAME = "clickPoint";
- /**
- *
- */
public static final String CONTROL_CLASS_PROP_NAME = "control.class";
- /**
- *
- */
public static final String CONTROL_PROP_NAME = "control";
- /**
- *
- */
public static final String INPUT_FACTORY_PROPERTY = "input.control.interface.factory";
- /**
- *
- */
public static final String IMAGE_LOADER_PROPERTY = "image.loader";
- /**
- *
- */
public static final String IMAGE_CAPTURER_PROPERTY = "image.capturer";
- /**
- *
- */
public static final String TEXT_PROP_NAME = "text";
- /**
- *
- */
public static final String POSITION_PROP_NAME = "position";
- /**
- *
- */
public static final String VALUE_PROP_NAME = "value";
- /**
- *
- */
public static final String WRAPPER_CLASS_PROP_NAME = "wrapper.class";
- /**
- *
- */
public static final String TOOLTIP_PROP_NAME = "tooltip";
- /**
- *
- */
public static final String NAME_PROP_NAME = "name";
- /**
- *
- */
public static final Timeout WAIT_STATE_TIMEOUT = new Timeout("wait.state", 1000);
- /**
- *
- */
+
public static final String OUTPUT = Wrap.class.getName() + ".OUTPUT";
private static DefaultWrapper theWrapper = new DefaultWrapper(Environment.getEnvironment());
@@ -125,10 +81,6 @@
Environment.getEnvironment().initTimeout(Keyboard.PUSH);
}
- /**
- *
- * @return
- */
public static DefaultWrapper getWrapper() {
return theWrapper;
}
@@ -184,7 +136,7 @@
* Return default point to click, drag. This implementation returns the
* center must be overriden if something different is desired.
*
- * @return
+ * @return the default click point
*/
@Property(CLICKPOINT_PROP_NAME)
public Point getClickPoint() {
@@ -207,8 +159,8 @@
* Transforms point in local control coordinate system to screen
* coordinates.
*
- * @param local
- * @return
+ * @param local the local coordinate
+ * @return a absolute translated point
* @see #toLocal(org.jemmy.Point)
*/
public Point toAbsolute(Point local) {
@@ -220,7 +172,7 @@
* Transforms point in screen coordinates to local control coordinate
* system.
*
- * @param local
+ * @param local the local coordinate
* @return coordinates which should be used for mouse operations.
* @see #toAbsolute(org.jemmy.Point)
*/
@@ -258,7 +210,7 @@
* Waits for a portion of image to be exact the same as the parameter.
*
* @see Wrap#as(java.lang.Class)
- * @param golden
+ * @param golden the image to match against
* @param rect A portion of control to compare.
* @param resID ID of a result image to save in case of failure. No image
* saved if null.
@@ -296,7 +248,7 @@
* Waits for image to be exact the same as the parameter.
*
* @see Wrap#as(java.lang.Class)
- * @param golden
+ * @param golden the image to match against
* @param resID ID of a result image to save in case of failure. No image
* saved if null.
* @param diffID ID of a diff image to save in case of failure. No image
@@ -310,9 +262,9 @@
/**
* TODO javadoc
*
- * @param
- * @param state
- * @param value
+ * @param the states type
+ * @param state the state
+ * @param value the state value
* @return last returned State value
* @throws TimeoutExpiredException in case the wait is unsuccessful.
*/
@@ -321,10 +273,8 @@
}
/**
- * TODO javadoc
- *
- * @param
- * @param state
+ * @param the states type
+ * @param state the state
* @return last returned State value
* @throws TimeoutExpiredException in case the wait is unsuccessful.
*/
@@ -370,9 +320,10 @@
* as(java.lang.Class)
*
* @see Wrap#is(java.lang.Class)
- * @param
- * @param interfaceClass
- * @return
+ * @param the control interface
+ * @param interfaceClass the interface class
+ * @return true
if the control is an ControlInterface,
+ * false
otherwise
*/
public boolean is(Class interfaceClass) {
if (interfaceClass.isInstance(this)) {
@@ -393,11 +344,12 @@
* as(java.lang.Class)
*
* @see Wrap#is(java.lang.Class)
- * @param
- * @param
- * @param interfaceClass
+ * @param the type interface
+ * @param the control interface
+ * @param interfaceClass the interface class
* @param type The parameter class.
- * @return
+ * @return true
if the control is an ControlInterface,
+ * false
otherwise
*/
public > boolean is(Class interfaceClass, Class type) {
if (interfaceClass.isInstance(this)) {
@@ -435,9 +387,9 @@
* it checks
*
* @see Wrap#is(java.lang.Class)
- * @param
- * @param interfaceClass
- * @return
+ * @param the control interface
+ * @param interfaceClass the interface class
+ * @return the control interface instance
*/
public INTERFACE as(Class interfaceClass) {
if (interfaceClass.isInstance(this)) {
@@ -456,11 +408,11 @@
* Returns an implementation of interface associated with the object.
*
* @see Wrap#is(java.lang.Class)
- * @param
- * @param
- * @param interfaceClass
+ * @param the type interface
+ * @param the control interface
+ * @param interfaceClass the interface class
* @param type The parameter class.
- * @return
+ * @return the type control instance
*/
public > INTERFACE as(Class interfaceClass, Class type) {
if (interfaceClass.isInstance(this)) {
@@ -490,10 +442,9 @@
private Keyboard keyboard = null;
/**
- * A shortcut to
- * as(MouseTarget.class).mouse()
+ * A shortcut to as(MouseTarget.class).mouse()
*
- * @return
+ * @return the mouse target
*/
@As(Mouse.class)
public Mouse mouse() {
@@ -504,10 +455,9 @@
}
/**
- * A shortcut to
- * as(MouseTarget.class).drag()
+ * A shortcut to as(MouseTarget.class).drag()
*
- * @return
+ * @return the drag target
*/
@As(Drag.class)
public Drag drag() {
@@ -518,10 +468,9 @@
}
/**
- * A shortcut to
- * as(KeyTarget.class).wrap()
+ * A shortcut to as(KeyTarget.class).wrap()
*
- * @return
+ * @return the wrap target
*/
@As(Keyboard.class)
public Keyboard keyboard() {
@@ -541,10 +490,6 @@
*/
private HashMap properties = new HashMap();
- /**
- *
- * @return
- */
@Property(CONTROL_CLASS_PROP_NAME)
public Class> getControlClass() {
return getControl().getClass();
@@ -667,13 +612,12 @@
}
/**
- * Get property of the wrapped object. Uses first available from
- * methods annotated by
- * org.jemmy.control.Property
wrapped object methods
- * listed in
- * org.jemmy.control.MethodProperties
wrapped object
- * fields listed in
- * org.jemmy.control.FieldProperties
+ * Get property of the wrapped object. Uses first available from
+ *
+ * - methods annotated by
org.jemmy.control.Property
+ * - wrapped object methods listed in
org.jemmy.control.MethodProperties
+ * - wrapped object fields listed in
org.jemmy.control.FieldProperties
+ *
*
* @param name property name
* @throws JemmyException if no property found
@@ -711,10 +655,10 @@
* Get property out of the control interface. Refer to the interface doc to
* find out what properties are provided.
*
- * @param
- * @param name
- * @param intrfc
- * @return
+ * @param the control interface
+ * @param name the property name
+ * @param intrfc the interface class
+ * @return the control property
*/
public Object getProperty(String name, Class intrfc) {
return getInterfaceProperty(intrfc, as(intrfc), name);
@@ -724,12 +668,12 @@
* Get property out of the control interface. Refer to the interface doc to
* find out what properties are provided.
*
- * @param
- * @param
- * @param name
- * @param intrfc
- * @param type
- * @return
+ * @param the type interface
+ * @param the control interface
+ * @param name the property name
+ * @param intrfc the interface class
+ * @param type The parameter class.
+ * @return the control property
*/
public > Object getProperty(String name, Class intrfc, Class type) {
return getInterfaceProperty(intrfc, as(intrfc, type), name);
@@ -762,10 +706,10 @@
* property
of control interface to get the specified value.
* WAIT_STATE_TIMOUT
timeout is used
*
- * @param
- * @param property
- * @param intrfc
- * @param value
+ * @param the control interface
+ * @param property the property name
+ * @param intrfc the interface class
+ * @param value the new parameter value
*/
public void waitProperty(final String property, final Class intrfc, final Object value) {
Object instance = as(intrfc);
@@ -787,12 +731,12 @@
* property
of control interface to get the specified value.
* WAIT_STATE_TIMOUT
timeout is used
*
- * @param
- * @param
- * @param property
- * @param intrfc
- * @param type
- * @param value
+ * @param the type interface
+ * @param the control interface
+ * @param property the property name
+ * @param intrfc the interface class
+ * @param type the parameter class.
+ * @param value the new parameter value
*/
public > void waitProperty(final String property, final Class intrfc, final Class type, final Object value) {
getEnvironment().getWaiter(WAIT_STATE_TIMEOUT).ensureValue(value, new State