Crossfire JXClient, Trunk
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.util.Resolution Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.util.Resolution:
Collaboration graph

Public Member Functions

Dimension asDimension ()
 
boolean equals (@Nullable final Object obj)
 
boolean equalsDisplayMode (@NotNull final DisplayMode displayMode)
 
int getHeight ()
 
int getWidth ()
 
int hashCode ()
 
 Resolution (final int width, final int height)
 
String toString ()
 

Static Public Member Functions

static Resolution parse (@NotNull final String str)
 

Private Attributes

final int height
 
final int width
 

Detailed Description

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.

Author
Andreas Kirschbaum

Definition at line 36 of file Resolution.java.

Constructor & Destructor Documentation

◆ Resolution()

com.realtime.crossfire.jxclient.util.Resolution.Resolution ( final int  width,
final int  height 
)

Creates a new instance.

Parameters
widththe width in pixels
heightthe height in pixels

Definition at line 53 of file Resolution.java.

References com.realtime.crossfire.jxclient.util.Resolution.height, and com.realtime.crossfire.jxclient.util.Resolution.width.

Referenced by com.realtime.crossfire.jxclient.util.Resolution.equals(), and com.realtime.crossfire.jxclient.util.Resolution.parse().

Here is the caller graph for this function:

Member Function Documentation

◆ asDimension()

Dimension com.realtime.crossfire.jxclient.util.Resolution.asDimension ( )

Returns the resolution as a Dimension instance.

Returns
the dimension instance

Definition at line 138 of file Resolution.java.

References com.realtime.crossfire.jxclient.util.Resolution.height, and com.realtime.crossfire.jxclient.util.Resolution.width.

Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().

Here is the caller graph for this function:

◆ equals()

boolean com.realtime.crossfire.jxclient.util.Resolution.equals ( @Nullable final Object  obj)

◆ equalsDisplayMode()

boolean com.realtime.crossfire.jxclient.util.Resolution.equalsDisplayMode ( @NotNull final DisplayMode  displayMode)

Returns whether this resolution matches a DisplayMode's resolution.

Parameters
displayModethe display mode
Returns
if the resolutions match

Definition at line 106 of file Resolution.java.

References com.realtime.crossfire.jxclient.util.Resolution.height, and com.realtime.crossfire.jxclient.util.Resolution.width.

◆ getHeight()

int com.realtime.crossfire.jxclient.util.Resolution.getHeight ( )

◆ getWidth()

int com.realtime.crossfire.jxclient.util.Resolution.getWidth ( )

◆ hashCode()

int com.realtime.crossfire.jxclient.util.Resolution.hashCode ( )

◆ parse()

static Resolution com.realtime.crossfire.jxclient.util.Resolution.parse ( @NotNull final String  str)
static

Creates a new instance from string representation. The string representation is of the format "1024x768"; it is the format returned from toString().

Parameters
strthe string representation
Returns
the
Resolution instance
, or
null
if the string representation is invalid

Definition at line 67 of file Resolution.java.

References com.realtime.crossfire.jxclient.util.Resolution.height, com.realtime.crossfire.jxclient.util.Resolution.Resolution(), and com.realtime.crossfire.jxclient.util.Resolution.width.

Referenced by com.realtime.crossfire.jxclient.main.Options.parse(), and com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseResolution().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

String com.realtime.crossfire.jxclient.util.Resolution.toString ( )

Member Data Documentation

◆ height

final int com.realtime.crossfire.jxclient.util.Resolution.height
private

◆ width

final int com.realtime.crossfire.jxclient.util.Resolution.width
private

The documentation for this class was generated from the following file:
com.realtime.crossfire.jxclient.util.Resolution.Resolution
Resolution(final int width, final int height)
Definition: Resolution.java:53