public class Geometry extends Object
Constructor and Description |
---|
Geometry() |
Modifier and Type | Method and Description |
---|---|
static Rect |
getBounds(Element e) |
static Rect |
getBoundsOfHidden(Element e) |
static int |
getH(Element e)
Updated to factor in border and padding
|
static Rect |
getViewportBounds()
This takes into account scrolling and will be in absolute
coordinates where the top left corner of the page is 0,0 but
the viewport may be scrolled to something else.
|
static int |
getW(Element e)
Updated to factor in border and padding
|
static int |
getX(Element e) |
static int |
getY(Element e) |
static boolean |
isInside(int x,
int y,
Rect box)
Determines if a point is inside a box.
|
static boolean |
isMouseInside(NativeEvent event,
Element element)
Determines if a mouse event is inside a box.
|
static void |
setBounds(UIObject o,
Rect bounds)
Sets the bounds of a UIObject, moving and sizing to match the
bounds specified.
|
static void |
setInvisibleToMeasure(Element e) |
static void |
setPosition(UIObject o,
Rect pos)
Sets the position of a UIObject
|
static void |
setSize(UIObject o,
Rect size)
Sets the size of a UIObject
|
static void |
unsetInvisibleToMeasure(Element e) |
public static final void setInvisibleToMeasure(Element e)
public static final void unsetInvisibleToMeasure(Element e)
public static final int getX(Element e)
public static final int getY(Element e)
public static final int getW(Element e)
public static final int getH(Element e)
public static final void setBounds(UIObject o, Rect bounds)
public static final void setPosition(UIObject o, Rect pos)
public static final boolean isInside(int x, int y, Rect box)
public static final boolean isMouseInside(NativeEvent event, Element element)
public static final Rect getViewportBounds()
Copyright © 2015. All Rights Reserved.