public Point getOffset() { return new Point(x, y); }
public Point getLocation() { return new Point(x, y); }
public Point getLocation() { return new Point(x, y); }
public Point getOrigin() { return new Point(x, y); }
public Point getOffset() { return new Point(x, y); }
public Point translate(int dx, int dy) { return new Point(x + dx, y + dy); }
public Point getLocation() { return new Point(x, y); }
public Point translate(int dx, int dy) { return new Point(x + dx, y + dy); }
public Point getLocation() { return new Point(x, y); }
public Point getOrigin() { return new Point(x, y); }
public static Point decode(String value) { if (value == null) { throw new IllegalArgumentException(); } Point point; try { point = new Point(JSONSerializer.parseMap(value)); } catch (SerializationException exception) { throw new IllegalArgumentException(exception); } return point; } }
public static Point decode(String value) { if (value == null) { throw new IllegalArgumentException(); } Point point; try { point = new Point(JSONSerializer.parseMap(value)); } catch (SerializationException exception) { throw new IllegalArgumentException(exception); } return point; } }
protected void handleAsNumber(Number value) { int s = parse(value); super.setValueInternal(new Point(s, s)); } }
protected void mouseOver() { if (isEnabled()) { mouseLocation = new Point(-1, -1); componentMouseListeners.mouseOver(this); } }
protected void mouseOver() { if (isEnabled()) { mouseLocation = new Point(-1, -1); componentMouseListeners.mouseOver(this); } }
/** * Returns the component's location. * * @return * A point value containing the component's horizontal and vertical * position relative to the origin of the parent container. */ public Point getLocation() { return new Point(getX(), getY()); }
/** * Returns the component's location. * * @return * A point value containing the component's horizontal and vertical * position relative to the origin of the parent container. */ public Point getLocation() { return new Point(getX(), getY()); }
protected void handleAsList(List<?> list) { if(list.isEmpty()) { super.setValueInternal(null); return; } switch (list.size()) { case 1: int s = parseValue(list.get(0)); super.setValueInternal(new Point(s, s)); break; case 2: int x = parseValue(list.get(0)); int y = parseValue(list.get(1)); super.setValueInternal(new Point(x, y)); break; default: throw illegalValue(list, Point.class); } }
protected void handleAsMap(Map<?, ?> map) { if(map.isEmpty()) { super.setValueInternal(null); return; } int x = getMapValue(map, "x", 0); int y = getMapValue(map, "y", 0); super.setValueInternal(new Point(x, y)); }
protected boolean mouseMove(int x, int y) { boolean consumed = false; if (isEnabled()) { mouseLocation = new Point(x, y); if (triggerTooltipCallback != null) { triggerTooltipCallback.cancel(); triggerTooltipCallback = null; } triggerTooltipCallback = ApplicationContext.scheduleCallback(new Runnable() { @Override public void run() { Point mouseLocation = getMouseLocation(); componentTooltipListeners.tooltipTriggered(Component.this, mouseLocation.x, mouseLocation.y); } }, tooltipDelay); consumed = componentMouseListeners.mouseMove(this, x, y); } return consumed; }