Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.faces.Face Class Reference

A. More...

+ Collaboration diagram for com.realtime.crossfire.jxclient.faces.Face:

Public Member Functions

boolean equals (@Nullable final Object obj)
 
 Face (final int faceNum, @NotNull final String faceName, final int faceChecksum)
 Creates a new instance. More...
 
int getFaceChecksum ()
 Returns the face checksum. More...
 
FaceImages getFaceImages ()
 Returns the images. More...
 
String getFaceName ()
 Returns the face name. More...
 
int getFaceNum ()
 Returns the unique face id. More...
 
int getTileHeight ()
 Returns the face height in tiles. More...
 
int getTileWidth ()
 Returns the face width in tiles. More...
 
int hashCode ()
 
void setFaceImages (@NotNull final FaceImages faceImages)
 Sets the images. More...
 
String toString ()
 

Static Public Attributes

static final int SQUARE_SIZE = 32
 The size of one square in pixels. More...
 

Private Attributes

final int faceChecksum
 The image checksum as sent by the server. More...
 
FaceImages faceImages
 The images for this face. More...
 
final String faceName
 The face name as sent by the server. More...
 
final int faceNum
 The face id as sent by the server. More...
 
int tileHeight = 1
 The face height in tiles. More...
 
int tileWidth = 1
 The face width in tiles. More...
 

Detailed Description

A.

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.

Author
Lauwenmark
Andreas Kirschbaum

Definition at line 36 of file Face.java.

Constructor & Destructor Documentation

◆ Face()

com.realtime.crossfire.jxclient.faces.Face.Face ( final int  faceNum,
@NotNull final String  faceName,
final int  faceChecksum 
)

Creates a new instance.

Parameters
faceNumthe unique face id
faceNamethe face name
faceChecksumthe image checksum as sent by the server

Definition at line 81 of file Face.java.

References com.realtime.crossfire.jxclient.faces.Face.faceChecksum, com.realtime.crossfire.jxclient.faces.Face.faceName, and com.realtime.crossfire.jxclient.faces.Face.faceNum.

Referenced by com.realtime.crossfire.jxclient.faces.Face.equals().

+ Here is the caller graph for this function:

Member Function Documentation

◆ equals()

boolean com.realtime.crossfire.jxclient.faces.Face.equals ( @Nullable final Object  obj)

Definition at line 173 of file Face.java.

References com.realtime.crossfire.jxclient.faces.Face.Face(), and com.realtime.crossfire.jxclient.faces.Face.faceNum.

+ Here is the call graph for this function:

◆ getFaceChecksum()

int com.realtime.crossfire.jxclient.faces.Face.getFaceChecksum ( )

Returns the face checksum.

Returns
the face checksum

Definition at line 132 of file Face.java.

References com.realtime.crossfire.jxclient.faces.Face.faceChecksum.

◆ getFaceImages()

FaceImages com.realtime.crossfire.jxclient.faces.Face.getFaceImages ( )

Returns the images.

May return

null

if the images are not yet known, or if they have been dropped from the cache.

Returns
the images or
null

Definition at line 115 of file Face.java.

References com.realtime.crossfire.jxclient.faces.Face.faceImages.

Referenced by com.realtime.crossfire.jxclient.faces.TestFacesManager.getFaceImages(), and com.realtime.crossfire.jxclient.faces.DefaultFacesManager.getFaceImages().

+ Here is the caller graph for this function:

◆ getFaceName()

String com.realtime.crossfire.jxclient.faces.Face.getFaceName ( )

◆ getFaceNum()

int com.realtime.crossfire.jxclient.faces.Face.getFaceNum ( )

◆ getTileHeight()

int com.realtime.crossfire.jxclient.faces.Face.getTileHeight ( )

Returns the face height in tiles.

Returns
the tile height

Definition at line 157 of file Face.java.

References com.realtime.crossfire.jxclient.faces.Face.tileHeight.

Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterState.mapFace().

+ Here is the caller graph for this function:

◆ getTileWidth()

int com.realtime.crossfire.jxclient.faces.Face.getTileWidth ( )

Returns the face width in tiles.

Returns
the tile width

Definition at line 149 of file Face.java.

References com.realtime.crossfire.jxclient.faces.Face.tileWidth.

Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterState.mapFace().

+ Here is the caller graph for this function:

◆ hashCode()

int com.realtime.crossfire.jxclient.faces.Face.hashCode ( )

◆ setFaceImages()

void com.realtime.crossfire.jxclient.faces.Face.setFaceImages ( @NotNull final FaceImages  faceImages)

Sets the images.

Parameters
faceImagesthe images

Definition at line 92 of file Face.java.

References com.realtime.crossfire.jxclient.faces.Face.faceImages, and com.realtime.crossfire.jxclient.faces.FaceImages.getOriginalImageIcon().

Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.defineFace(), and com.realtime.crossfire.jxclient.faces.TestFacesManager.getFaceImages().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toString()

String com.realtime.crossfire.jxclient.faces.Face.toString ( )

Definition at line 141 of file Face.java.

References com.realtime.crossfire.jxclient.faces.Face.faceName.

Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterStateTest.toString().

+ Here is the caller graph for this function:

Member Data Documentation

◆ faceChecksum

final int com.realtime.crossfire.jxclient.faces.Face.faceChecksum
private

◆ faceImages

FaceImages com.realtime.crossfire.jxclient.faces.Face.faceImages
private

The images for this face.

Set to

null

if unknown.

Definition at line 73 of file Face.java.

Referenced by com.realtime.crossfire.jxclient.faces.Face.getFaceImages(), and com.realtime.crossfire.jxclient.faces.Face.setFaceImages().

◆ faceName

final String com.realtime.crossfire.jxclient.faces.Face.faceName
private

◆ faceNum

final int com.realtime.crossfire.jxclient.faces.Face.faceNum
private

◆ SQUARE_SIZE

final int com.realtime.crossfire.jxclient.faces.Face.SQUARE_SIZE = 32
static

The size of one square in pixels.

Definition at line 41 of file Face.java.

Referenced by com.realtime.crossfire.jxclient.faces.FaceImagesUtils.newEmptyFaceImages().

◆ tileHeight

int com.realtime.crossfire.jxclient.faces.Face.tileHeight = 1
private

The face height in tiles.

Definition at line 67 of file Face.java.

Referenced by com.realtime.crossfire.jxclient.faces.Face.getTileHeight().

◆ tileWidth

int com.realtime.crossfire.jxclient.faces.Face.tileWidth = 1
private

The face width in tiles.

Definition at line 62 of file Face.java.

Referenced by com.realtime.crossfire.jxclient.faces.Face.getTileWidth().


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