java.lang.Objectcom.realtime.crossfire.jxclient.faces.Face
public class Face
A Face represents one image received from a Crossfire server.
The face is uniquely identified by a face id; it has a face name and three
images (original as sent by the server, scaled for use in map view, scaled
for use in magic map view) attached.
| Field Summary | |
|---|---|
private int |
faceChecksum
The image checksum as sent by the server. |
private FaceImages |
faceImages
The images for this face. |
private java.lang.String |
faceName
The face name as sent by the server. |
private int |
faceNum
The face id as sent by the server. |
static int |
SQUARE_SIZE
The size of one square in pixels. |
private int |
tileHeight
The face height in tiles. |
private int |
tileWidth
The face width in tiles. |
| Constructor Summary | |
|---|---|
Face(int faceNum,
java.lang.String faceName,
int faceChecksum)
Creates a new instance. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
int |
getFaceChecksum()
Returns the face checksum. |
FaceImages |
getFaceImages()
Returns the images. |
java.lang.String |
getFaceName()
Returns the face name. |
int |
getFaceNum()
Returns the unique face id. |
int |
getTileHeight()
Returns the face height in tiles. |
int |
getTileWidth()
Returns the face width in tiles. |
int |
hashCode()
|
void |
setFaceImages(FaceImages faceImages)
Sets the images. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final int faceChecksum
@Nullable private FaceImages faceImages
null if unknown.
@NotNull private final java.lang.String faceName
private final int faceNum
public static final int SQUARE_SIZE
private int tileHeight
private int tileWidth
| Constructor Detail |
|---|
public Face(int faceNum,
@NotNull
java.lang.String faceName,
int faceChecksum)
faceNum - the unique face idfaceName - the face namefaceChecksum - the image checksum as sent by the server| Method Detail |
|---|
public boolean equals(@Nullable
java.lang.Object obj)
equals in class java.lang.Objectpublic int getFaceChecksum()
@Nullable public FaceImages getFaceImages()
null if the images are not
yet known, or if they have been dropped from the cache.
null@NotNull public java.lang.String getFaceName()
public int getFaceNum()
public int getTileHeight()
public int getTileWidth()
public int hashCode()
hashCode in class java.lang.Object
public void setFaceImages(@NotNull
FaceImages faceImages)
faceImages - the images@NotNull public java.lang.String toString()
toString in class java.lang.Object