java.lang.Object com.realtime.crossfire.jxclient.util.Resolution
public class Resolution
Information about JXClient's screen/window resolution. It consists of a size (width and height) and whether the exact resolution should be used, or if a similar resolution is allowed.
Field Summary | |
---|---|
private int |
height
The height in pixel. |
private int |
width
The width in pixel. |
Constructor Summary | |
---|---|
Resolution(int width,
int height)
Creates a new instance. |
Method Summary | |
---|---|
java.awt.Dimension |
asDimension()
Returns the resolution as a Dimension instance. |
boolean |
equals(java.lang.Object obj)
|
boolean |
equalsDisplayMode(java.awt.DisplayMode displayMode)
Returns whether this resolution matches a DisplayMode 's
resolution. |
int |
getHeight()
Returns the height in pixels. |
int |
getWidth()
Returns the width in pixels. |
int |
hashCode()
|
static Resolution |
parse(java.lang.String str)
Creates a new instance from string representation. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final int height
private final int width
Constructor Detail |
---|
public Resolution(int width, int height)
width
- the width in pixelsheight
- the height in pixelsMethod Detail |
---|
@NotNull public java.awt.Dimension asDimension()
Dimension
instance.
public boolean equals(@Nullable java.lang.Object obj)
equals
in class java.lang.Object
public boolean equalsDisplayMode(@NotNull java.awt.DisplayMode displayMode)
DisplayMode
's
resolution.
displayMode
- the display mode
public int getHeight()
public int getWidth()
public int hashCode()
hashCode
in class java.lang.Object
@Nullable public static Resolution parse(@NotNull java.lang.String str)
toString()
.
str
- the string representation
Resolution instance
, or null
if the
string representation is invalid@NotNull public java.lang.String toString()
toString
in class java.lang.Object