public int getY() { return position.getY(); } }
/** * Translates this location by the specified amount (in place!). * <p> * @param amount The amount the offset. */ public void offset(Location amount) { x += amount.getX(); y += amount.getY(); }
@Override public int hashCode() { return this.getX() + this.getY(); }
/** * Check if a specified location is contained within this region. * <p> * @param location The location to test. * @return True if the location is contained within this region, * false otherwise. */ public boolean contains(Location location) { return location.getX() >= left && location.getX() <= (left + width) && location.getY() >= top && location.getY() <= (top + height); }
/** * Check if a specified location is contained within this region. * <p> * @param location The location to test. * @return True if the location is contained within this region, * false otherwise. */ public boolean contains(Location location) { return location.getX() >= left && location.getX() <= (left + width) && location.getY() >= top && location.getY() <= (top + height); }
/** * Check if a specified location is contained within this region. * <p> * @param location The location to test. * @return True if the location is contained within this region, * false otherwise. */ public boolean contains(Location location) { return location.getX() >= left && location.getX() <= (left + width) && location.getY() >= top && location.getY() <= (top + height); }
@Override public int hashCode() { return this.getX() + this.getY(); }
/** * Creates a location from another location instance. * @param other A location instance from which to create the location. */ public Location(Location other) { ArgumentGuard.notNull(other, "other"); x = other.getX(); y = other.getY(); }
/** * Set the (top,left) position of the current region * @param location The (top,left) position to set. */ public void setLocation(Location location) { ArgumentGuard.notNull(location, "location"); left = location.getX(); top = location.getY(); }
/** * Creates a location from another location instance. * @param other A location instance from which to create the location. */ public Location(Location other) { ArgumentGuard.notNull(other, "other"); x = other.getX(); y = other.getY(); }
/** * Get a location translated by the specified amount. * * @param amount The amount to offset. * @return A location translated by the specified amount. */ public Location offset(Location amount) { return offset(amount.getX(), amount.getY()); }
/** * Set the (top,left) position of the current region * @param location The (top,left) position to set. */ public void setLocation(Location location) { ArgumentGuard.notNull(location, "location"); left = location.getX(); top = location.getY(); }
/** * Set the (top,left) position of the current region * @param location The (top,left) position to set. */ public void setLocation(Location location) { ArgumentGuard.notNull(location, "location"); left = location.getX(); top = location.getY(); }
/** * Get a location translated by the specified amount. * * @param amount The amount to offset. * @return A location translated by the specified amount. */ public Location offset(Location amount) { return offset(amount.getX(), amount.getY()); }
public Location setPosition(Location location) { ArgumentGuard.notNull(location, "location"); logger.verbose("CssTranslatePositionProvider - Setting position to: " + location); //EyesSeleniumUtils.translateTo(executor, location); executor.executeScript( String.format("arguments[0].style.transform='translate(-%dpx,-%dpx)';", location.getX(), location.getY()), this.scrollRootElement); logger.verbose("Done!"); lastSetPosition = location; return lastSetPosition; }
public Region(Location location, RectangleSize size, CoordinatesType coordinatesType) { ArgumentGuard.notNull(location, "location"); ArgumentGuard.notNull(size, "size"); this.left = location.getX(); this.top = location.getY(); this.width = size.getWidth(); this.height = size.getHeight(); this.coordinatesType = coordinatesType; }
public Region(Location location, RectangleSize size) { ArgumentGuard.notNull(location, "location"); ArgumentGuard.notNull(size, "size"); left = location.getX(); top = location.getY(); width = size.getWidth(); height = size.getHeight(); }
public Region(Location location, RectangleSize size, CoordinatesType coordinatesType) { ArgumentGuard.notNull(location, "location"); ArgumentGuard.notNull(size, "size"); this.left = location.getX(); this.top = location.getY(); this.width = size.getWidth(); this.height = size.getHeight(); this.coordinatesType = coordinatesType; }