Package org.jemmy

Examples of org.jemmy.Point


        });
    }

    static Point getAbsolute(MouseTarget target, Point p) {
        Rectangle screenBounds = target.getScreenBounds();
        return new Point(p.x + screenBounds.x, p.y + screenBounds.y);
    }
View Full Code Here


     *
     * @param p
     * @return org.jemmy.Point
     */
    public static Point convert(java.awt.Point p) {
        return new Point(p.x, p.y);
    }
View Full Code Here

                        break;
                    }
                }
                if(good) {
                    if(count == index) {
                        return(new Point(X, Y));
                    }
                    count++;
                }
            }
        }
View Full Code Here

                        break;
                    }
                }
                if(roughPixels <= maxRoughPixels) {
                    if(count == index) {
                        return(new Point(X, Y));
                    }
                    count++;
                }
            }
        }
View Full Code Here

     * @param count defines number of clicks
     */
    protected void click(Dir direction, int offset, int count) {
        boolean increase = (direction == Dir.MORE);

        Point cp = ScrollerImpl.createScrollPoint(trackNode, ! isVertical, increase, offset);
        click(cp, count);
    }
View Full Code Here

        boolean increase = isVertical;
        double dOffset = value - min;
        Rectangle bounds = trackNode.getScreenBounds();
        int len = isVertical? bounds.height: bounds.width;
        Point cp = ScrollerImpl.createScrollPoint(trackNode, ! isVertical, increase, (int)(dOffset/(max-min) * len));
       
        return cp;
    }
View Full Code Here

     * @return
     * @see #toLocal(org.jemmy.Point)
     */
    @Override
    public Point toAbsolute(final Point local) {
        Point p = convertToAbsoluteLayout(this, local);
        Rectangle screenBounds = getScreenBounds();
        return new Point(p.x + screenBounds.x, p.y + screenBounds.y);
    }
View Full Code Here

     * @see #toAbsolute(org.jemmy.Point)
     */
    @Override
    public Point toLocal(final Point global) {
        Rectangle screenBounds = getScreenBounds();
        Point local = new Point(global.x - screenBounds.x, global.y - screenBounds.y);
        return convertToLocalLayout(this, local);
    }
View Full Code Here

            @Override
            public void run(Object... parameters) {
                Bounds layout = node.getControl().getLayoutBounds();
                Bounds toScene = node.getControl().localToScene(layout);
                Point2D loc = node.getControl().localToScene(layout.getMinX() + p.x, layout.getMinY() + p.y);
                setResult(new Point(loc.getX() - toScene.getMinX(), loc.getY() - toScene.getMinY()));
            }
        }.dispatch(node.getEnvironment());
    }
View Full Code Here

            @Override
            public void run(Object... parameters) {
                Bounds layout = node.getControl().getLayoutBounds();
                Bounds toScene = node.getControl().localToScene(layout);
                Point2D loc = node.getControl().sceneToLocal(toScene.getMinX() + p.x, toScene.getMinY() + p.y);
                setResult(new Point(loc.getX() - layout.getMinX(), loc.getY() - layout.getMinY()));
            }
        }.dispatch(node.getEnvironment());
    }
View Full Code Here

TOP

Related Classes of org.jemmy.Point

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.