java.lang.Object com.realtime.crossfire.jxclient.skin.skin.Extent
public class Extent
Encapsulates the extent of a GUI element. It consists of a location and a size.
Field Summary | |
---|---|
private Expression |
h
The height. |
private Expression |
w
The width. |
private Expression |
x
The x coordinate. |
private Expression |
y
The y coordinate. |
Constructor Summary | |
---|---|
Extent(Expression x,
Expression y,
Expression w,
Expression h)
Creates a new instance. |
|
Extent(int x,
int y,
int w,
int h)
Creates a new instance. |
Method Summary | |
---|---|
int |
getConstantH()
Returns the height. |
int |
getConstantW()
Returns the width. |
int |
getH(int width,
int height)
Returns the height. |
Expression |
getHExpression()
Returns the height. |
int |
getW(int width,
int height)
Returns the width. |
Expression |
getWExpression()
Returns the width. |
int |
getX(int width,
int height)
Returns the x coordinate. |
int |
getY(int width,
int height)
Returns the y coordinate. |
void |
setLocation(Expression x,
Expression y)
Sets the location. |
void |
setSize(Expression w,
Expression h)
Sets the size. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@NotNull private Expression h
@NotNull private Expression w
@NotNull private Expression x
@NotNull private Expression y
Constructor Detail |
---|
public Extent(@NotNull Expression x, @NotNull Expression y, @NotNull Expression w, @NotNull Expression h)
x
- the x coordinatey
- the y coordinatew
- the widthh
- thr heightpublic Extent(int x, int y, int w, int h)
x
- the x coordinatey
- the y coordinatew
- the widthh
- thr heightMethod Detail |
---|
public int getConstantH()
public int getConstantW()
public int getH(int width, int height)
width
- the screen widthheight
- the screen height
@NotNull public Expression getHExpression()
public int getW(int width, int height)
width
- the screen widthheight
- the screen height
@NotNull public Expression getWExpression()
public int getX(int width, int height)
width
- the screen widthheight
- the screen height
public int getY(int width, int height)
width
- the screen widthheight
- the screen height
public void setLocation(@NotNull Expression x, @NotNull Expression y)
x
- the x coordinatey
- the y coordinatepublic void setSize(@NotNull Expression w, @NotNull Expression h)
w
- the widthh
- the height