Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.util.Resolution Class Reference

Information about JXClient's screen/window resolution. More...

+ Collaboration diagram for com.realtime.crossfire.jxclient.util.Resolution:

Public Member Functions

Dimension asDimension ()
 Returns the resolution as a Dimension instance. More...
 
boolean equals (@Nullable final Object obj)
 
boolean equalsDisplayMode (@NotNull final DisplayMode displayMode)
 Returns whether this resolution matches a DisplayMode's resolution. More...
 
int getHeight ()
 Returns the height in pixels. More...
 
int getWidth ()
 Returns the width in pixels. More...
 
int hashCode ()
 
 Resolution (final int width, final int height)
 Creates a new instance. More...
 
String toString ()
 

Static Public Member Functions

static Resolution parse (@NotNull final String str)
 Creates a new instance from string representation. More...
 

Private Attributes

final int height
 The height in pixel. More...
 
final int width
 The width in pixel. More...
 

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 35 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 52 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 146 of file Resolution.java.

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

+ 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 105 of file Resolution.java.

◆ 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 ( )

Definition at line 128 of file Resolution.java.

◆ 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 66 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

◆ width


The documentation for this class was generated from the following file: