22 package com.realtime.crossfire.jxclient.faces;
24 import javax.swing.Icon;
25 import org.jetbrains.annotations.NotNull;
26 import org.jetbrains.annotations.Nullable;
81 public Face(
final int faceNum, @NotNull
final String faceName,
final int faceChecksum) {
91 @SuppressWarnings(
"NullableProblems")
95 final int width = imageIcon.getIconWidth();
96 final int height = imageIcon.getIconHeight();
97 tileWidth = (width+SQUARE_SIZE-1)/SQUARE_SIZE;
98 tileHeight = (height+SQUARE_SIZE-1)/SQUARE_SIZE;
173 public boolean equals(@Nullable
final Object obj) {
177 if (obj.getClass() !=
Face.class) {
FaceImages getFaceImages()
Returns the images.
static final int SQUARE_SIZE
The size of one square in pixels.
int tileWidth
The face width in tiles.
int getTileHeight()
Returns the face height in tiles.
Consists of three ImageIcons representing a Face.
FaceImages faceImages
The images for this face.
final int faceNum
The face id as sent by the server.
Face(final int faceNum, @NotNull final String faceName, final int faceChecksum)
Creates a new instance.
int getTileWidth()
Returns the face width in tiles.
String getFaceName()
Returns the face name.
int tileHeight
The face height in tiles.
boolean equals(@Nullable final Object obj)
int getFaceChecksum()
Returns the face checksum.
final int faceChecksum
The image checksum as sent by the server.
void setFaceImages(@NotNull final FaceImages faceImages)
Sets the images.
final String faceName
The face name as sent by the server.
ImageIcon getOriginalImageIcon()
Returns the ImageIcon as sent by the Crossfire server.
int getFaceNum()
Returns the unique face id.