Class Face
- java.lang.Object
-
- com.realtime.crossfire.jxclient.faces.Face
-
public class Face extends java.lang.ObjectAFacerepresents 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
Fields Modifier and Type Field Description static intSQUARE_SIZEThe size of one square in pixels.
-
Constructor Summary
Constructors Constructor Description Face(int faceNum, @NotNull java.lang.String faceName, int faceChecksum)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(@Nullable java.lang.Object obj)intgetFaceChecksum()Returns the face checksum.@Nullable FaceImagesgetFaceImages()Returns the images.@NotNull java.lang.StringgetFaceName()Returns the face name.intgetFaceNum()Returns the unique face id.intgetTileHeight()Returns the face height in tiles.intgetTileWidth()Returns the face width in tiles.inthashCode()voidsetFaceImages(@NotNull FaceImages faceImages)Sets the images.@NotNull java.lang.StringtoString()
-
-
-
Field Detail
-
SQUARE_SIZE
public static final int SQUARE_SIZE
The size of one square in pixels.- See Also:
- Constant Field Values
-
-
Method Detail
-
setFaceImages
public void setFaceImages(@NotNull @NotNull FaceImages faceImages)Sets the images.- Parameters:
faceImages- the images
-
getFaceNum
public int getFaceNum()
Returns the unique face id.- Returns:
- the face id
-
getFaceImages
@Nullable public @Nullable FaceImages getFaceImages()
Returns the images. May returnnullif the images are not yet known, or if they have been dropped from the cache.- Returns:
- the images or
null
-
getFaceName
@NotNull public @NotNull java.lang.String getFaceName()
Returns the face name.- Returns:
- the face name
-
getFaceChecksum
public int getFaceChecksum()
Returns the face checksum.- Returns:
- the face checksum
-
toString
@NotNull public @NotNull java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getTileWidth
public int getTileWidth()
Returns the face width in tiles.- Returns:
- the tile width
-
getTileHeight
public int getTileHeight()
Returns the face height in tiles.- Returns:
- the tile height
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(@Nullable @Nullable java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
-