facets.core.app.avatar
Class AvatarPolicy

java.lang.Object
  extended by facets.core.app.avatar.AvatarPolicy

public abstract class AvatarPolicy
extends java.lang.Object

Defines how a custom avatar should paint its content.

An AvatarPolicy supplies the Painters needed by an avatar to paint its content in different selection and pick states.


Field Summary
static java.lang.Integer STATE_NORMAL
           
static java.lang.Integer STATE_PICKED_SELECTED
           
 
Constructor Summary
AvatarPolicy()
           
 
Method Summary
 void avatarNotPicked()
          Allows the policy to define a response where no avatar has been picked.
abstract  Painter[] newPickPainters(java.lang.Object hit, boolean selected)
          Return motion painters to appear over the view painters.
abstract  Painter[] newViewPainters(boolean selected, boolean active)
          Return painters for the unpicked avatar.
 java.lang.Object stateCursor(java.lang.Object state)
          Defines the cursor to appear over the avatar in different pick states.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_NORMAL

public static final java.lang.Integer STATE_NORMAL

STATE_PICKED_SELECTED

public static final java.lang.Integer STATE_PICKED_SELECTED
Constructor Detail

AvatarPolicy

public AvatarPolicy()
Method Detail

newViewPainters

public abstract Painter[] newViewPainters(boolean selected,
                                          boolean active)
Return painters for the unpicked avatar.

Parameters:
selected - is the avatar selected?
active - is the view active?

newPickPainters

public abstract Painter[] newPickPainters(java.lang.Object hit,
                                          boolean selected)
Return motion painters to appear over the view painters.

Parameters:
selected - is the avatar selected?
hit - defines where the hit occurred that triggered the change in painters

stateCursor

public java.lang.Object stateCursor(java.lang.Object state)
Defines the cursor to appear over the avatar in different pick states. @param state an implementation-dependent object

Returns:
an implementation-dependent object

avatarNotPicked

public void avatarNotPicked()
Allows the policy to define a response where no avatar has been picked.