|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplayer.JAFramesPlayer
public class JAFramesPlayer
A JAFramesPlayer
provides a Java ARP avatar canvas together
with the capability of playing sequences of CAS animation frames on
that avatar.
Field Summary | |
---|---|
static int |
SZ_CAM_DATA
Length of the camera-settings data array. |
Constructor Summary | |
---|---|
JAFramesPlayer(JAOptions jopts,
JACanvasEmbedder embedder)
Constructs a new JAFramesPlayer : sets up the JA avatar
canvas, with the given JA options and canvas-embedder, but with no
avatar-event handler, and with the player's cyclic-play and
"single-sign" flags both initially false. |
|
JAFramesPlayer(JAOptions jopts,
JACanvasEmbedder embedder,
AvatarEventHandler aehdlr)
Constructs a new JAFramesPlayer : sets up the JA avatar
canvas, with the given JA options, canvas-embedder, and avatar-event
handler, and with the player's cyclic-play and "single-sign" flags
both initially false. |
|
JAFramesPlayer(JAOptions jopts,
JACanvasEmbedder embedder,
AvatarEventHandler aehdlr,
boolean cyclic,
boolean onesign)
Constructs a new JAFramesPlayer : sets up the JA avatar
canvas, with the given JA options, canvas-embedder, and avatar-event
handler, and with the given initial settings of the player's
cyclic-play and "single-sign" flags. |
Method Summary | |
---|---|
void |
avatarIsLoaded(java.lang.String avatar)
Handler for the avatar-loaded event generated by our view: sets up a camera controller for the view, and forwards the event to this player's own handler if it has one. |
void |
avatarIsUnloaded(java.lang.String avatar)
Handler for the avatar-unloaded event generated by our view: updates the preferences with the camera settings, and forwards the event to this player's own handler if it has one. |
void |
awaitPlayerInactive()
Delays until this player is inactive. |
void |
clearAnimation()
Clears this player's animation scan. |
int |
countFrames()
Returns the number of frames in the currently loaded animation, or 0 if there is none. |
int |
countSigns()
Returns the number of signs in the currently loaded animation, or -1 if there are none. |
void |
createStandardCameraChangeMonitor()
|
AnimatedSign |
currentSign()
Returns the current sign for this player's animation scan, or null if the player currently has no animation scan. |
boolean |
cyclicPlayIsOn()
Returns this player's current cyclic-play flag value. |
SiGMLAnimation |
getAnimation()
Returns the animation currently associated with this player if there is one, or null otherwise. |
CameraChangeMonitor |
getCameraChangeMonitor()
Creates a new camera change monitor for this player. |
float[] |
getCameraSettings()
Returns the current camera settings data as an array of length SZ_CAM_DATA . |
boolean |
hasAnimationData()
Returns a flag value indicating whether or not this player has a playable animation loaded. |
SignStatusRecord |
makeSignStatusRecord()
Returns a new SignStatusRecord associated with this
player's scan if it has one; otherwise returns null . |
boolean |
playerIsActive()
Indicates whether this player is currently active. |
void |
requestSwitchAvatar(java.lang.String avatar)
Initiates loading of the specified avatar be loaded into this player's JA view. |
void |
requestSwitchAvatar(java.lang.String avatar,
java.lang.String nonstddef)
Initiates loading of the specified avatar be loaded into this player's JA view, using the given special definition file URL if it is non-null. |
void |
setAnimation(SiGMLAnimation anim)
Sets the given animation sequence to be the current one for this player. |
void |
setCamera(float[] cam)
Sets the camera for this player's view in accordance with the settings in the given array, whose length should be SZ_CAM_DATA . |
void |
setCyclicPlay(boolean cyclic)
Sets this player's cyclic-play flag to the given value. |
void |
setSingleSignPlay(boolean ss)
Sets this player's single-sign flag to the given value. |
void |
showFrame(int F)
Displays the given frame on this player's avatar, assuming that the player is not already active, and that it is otherwise equipped to do so. |
void |
showFrame(int F,
SignStatusRecord ss)
Displays the given frame on this player's avatar, assuming that the player is not already active, and that it is otherwise equipped to do so; the given status record is updated accordingly. |
boolean |
singleSignPlayIsOn()
Returns this player's current single-sign flag value. |
void |
startPlayer(JAPlayerEventHandler peh)
Initiates the playing by this player of its current animation, assuming it has one, with no speed control and using the given player event handler to announce animation events as they occur. |
void |
startPlayer(SpeedProvider SP,
JAPlayerEventHandler peh)
Initiates the playing by this player of its current animation, assuming it has one, using the given speed controller, and using the given player event handler to announce animation events as they occur. |
void |
stopPlayer()
Aborts this player's current animation, if any. |
void |
terminate()
Terminates this player and its display. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SZ_CAM_DATA
Constructor Detail |
---|
public JAFramesPlayer(JAOptions jopts, JACanvasEmbedder embedder)
JAFramesPlayer
: sets up the JA avatar
canvas, with the given JA options and canvas-embedder, but with no
avatar-event handler, and with the player's cyclic-play and
"single-sign" flags both initially false.
public JAFramesPlayer(JAOptions jopts, JACanvasEmbedder embedder, AvatarEventHandler aehdlr)
JAFramesPlayer
: sets up the JA avatar
canvas, with the given JA options, canvas-embedder, and avatar-event
handler, and with the player's cyclic-play and "single-sign" flags
both initially false.
public JAFramesPlayer(JAOptions jopts, JACanvasEmbedder embedder, AvatarEventHandler aehdlr, boolean cyclic, boolean onesign)
JAFramesPlayer
: sets up the JA avatar
canvas, with the given JA options, canvas-embedder, and avatar-event
handler, and with the given initial settings of the player's
cyclic-play and "single-sign" flags.
Method Detail |
---|
public void requestSwitchAvatar(java.lang.String avatar)
public void requestSwitchAvatar(java.lang.String avatar, java.lang.String nonstddef)
public void setCyclicPlay(boolean cyclic)
public boolean cyclicPlayIsOn()
public void setSingleSignPlay(boolean ss)
public boolean singleSignPlayIsOn()
public void avatarIsLoaded(java.lang.String avatar)
avatarIsLoaded
in interface AvatarEventHandler
public void avatarIsUnloaded(java.lang.String avatar)
avatarIsUnloaded
in interface AvatarEventHandler
public SignStatusRecord makeSignStatusRecord()
SignStatusRecord
associated with this
player's scan if it has one; otherwise returns null
.
public int countFrames()
public int countSigns()
public boolean hasAnimationData()
public AnimatedSign currentSign()
null
if the player currently has no animation scan.
public void setAnimation(SiGMLAnimation anim)
public void clearAnimation()
public SiGMLAnimation getAnimation()
null
otherwise.
public float[] getCameraSettings()
SZ_CAM_DATA
.
public void setCamera(float[] cam)
SZ_CAM_DATA
.
public void createStandardCameraChangeMonitor()
public CameraChangeMonitor getCameraChangeMonitor()
public void terminate() throws java.lang.InterruptedException
java.lang.InterruptedException
public void awaitPlayerInactive() throws java.lang.InterruptedException
java.lang.InterruptedException
public void showFrame(int F)
public void showFrame(int F, SignStatusRecord ss)
public void stopPlayer()
public void startPlayer(JAPlayerEventHandler peh)
public void startPlayer(SpeedProvider SP, JAPlayerEventHandler peh)
public boolean playerIsActive()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |