22 package com.realtime.crossfire.jxclient.util;
24 import java.awt.Dimension;
25 import java.awt.DisplayMode;
26 import org.jetbrains.annotations.NotNull;
27 import org.jetbrains.annotations.Nullable;
67 final String[] tmp = str.split(
"x", -1);
68 if (tmp.length != 2) {
74 width = Integer.parseInt(tmp[0]);
75 height = Integer.parseInt(tmp[1]);
76 }
catch (
final NumberFormatException ignored) {
106 return width == displayMode.getWidth() && height == displayMode.getHeight();
113 public boolean equals(@Nullable
final Object obj) {
129 return width^(height<<16)^(height>>16);
147 return new Dimension(width, height);
boolean equalsDisplayMode(@NotNull final DisplayMode displayMode)
Returns whether this resolution matches a DisplayMode's resolution.
Resolution(final int width, final int height)
Creates a new instance.
Dimension asDimension()
Returns the resolution as a Dimension instance.
boolean equals(@Nullable final Object obj)
static Resolution parse(@NotNull final String str)
Creates a new instance from string representation.
int getWidth()
Returns the width in pixels.
int getHeight()
Returns the height in pixels.
final int height
The height in pixel.
Information about JXClient's screen/window resolution.
final int width
The width in pixel.