Class Extent
java.lang.Object
com.realtime.crossfire.jxclient.gui.gui.Extent
Encapsulates the extent of a GUI element. It consists of a location and a
size.
-
Constructor Summary
ConstructorsConstructorDescriptionExtent(@NotNull Expression x, @NotNull Expression y, @NotNull Expression w, @NotNull Expression h) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionintgetH(int width, int height, int prefWidth, int prefHeight) Returns the height.intgetW(int width, int height, int prefWidth, int prefHeight) Returns the width.intgetX(int width, int height, int prefWidth, int prefHeight) Returns the x coordinate.intgetY(int width, int height, int prefWidth, int prefHeight) Returns the y coordinate.
-
Constructor Details
-
Extent
public Extent(@NotNull @NotNull Expression x, @NotNull @NotNull Expression y, @NotNull @NotNull Expression w, @NotNull @NotNull Expression h) Creates a new instance.- Parameters:
x- the x coordinatey- the y coordinatew- the widthh- thr height
-
-
Method Details
-
getX
public int getX(int width, int height, int prefWidth, int prefHeight) Returns the x coordinate.- Parameters:
width- the screen widthheight- the screen heightprefWidth- the preferred dialog widthprefHeight- the preferred dialog height- Returns:
- the x coordinate
-
getY
public int getY(int width, int height, int prefWidth, int prefHeight) Returns the y coordinate.- Parameters:
width- the screen widthheight- the screen heightprefWidth- the preferred dialog widthprefHeight- the preferred dialog height- Returns:
- the y coordinate
-
getW
public int getW(int width, int height, int prefWidth, int prefHeight) Returns the width.- Parameters:
width- the screen widthheight- the screen heightprefWidth- the preferred dialog widthprefHeight- the preferred dialog height- Returns:
- the width
-
getH
public int getH(int width, int height, int prefWidth, int prefHeight) Returns the height.- Parameters:
width- the screen widthheight- the screen heightprefWidth- the preferred dialog widthprefHeight- the preferred dialog height- Returns:
- the height
-