com.realtime.crossfire.jxclient.faces
Class MagicMapFacesProvider

java.lang.Object
  extended by com.realtime.crossfire.jxclient.faces.MagicMapFacesProvider
All Implemented Interfaces:
FacesProvider

public class MagicMapFacesProvider
extends java.lang.Object
implements FacesProvider

A FacesProvider that returns faces scaled to 4x4 pixels.


Field Summary
private  FacesManager facesManager
          The FacesManager to query.
private static int SIZE
          The size of faces in pixels.
 
Constructor Summary
MagicMapFacesProvider(FacesManager facesManager)
          Creates a new instance.
 
Method Summary
 javax.swing.ImageIcon getImageIcon(int faceNum)
          Returns the face for a face ID.
 int getSize()
          Returns the size of faces in pixels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

facesManager

@NotNull
private final FacesManager facesManager
The FacesManager to query.


SIZE

private static final int SIZE
The size of faces in pixels.

See Also:
Constant Field Values
Constructor Detail

MagicMapFacesProvider

public MagicMapFacesProvider(@NotNull
                             FacesManager facesManager)
Creates a new instance.

Parameters:
facesManager - the faces manager to query
Method Detail

getImageIcon

@NotNull
public javax.swing.ImageIcon getImageIcon(int faceNum)
Returns the face for a face ID. This function returns immediately even if the face is not loaded. A not loaded face will be updated as soon as loading has finished.

Specified by:
getImageIcon in interface FacesProvider
Parameters:
faceNum - the face ID
Returns:
the face, or the "unknown" face if the face is not loaded

getSize

public int getSize()
Returns the size of faces in pixels.

Specified by:
getSize in interface FacesProvider
Returns:
the size in pixels