|
||||||||||
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, no player-event handler, no speed provider,
and with the player's cyclic-play and "single-sign" flags both
initially false. |
|
JAFramesPlayer(JAOptions jopts,
JACanvasEmbedder embedder,
AvatarEventHandler aehdlr,
JAPlayerEventHandler pehdlr,
SpeedProvider sp)
Constructs a new JAFramesPlayer : sets up the JA avatar
canvas, with the given JA options, canvas-embedder, avatar-event
handler, player-event handler, speed provider, and with the player's
cyclic-play and "single-sign" flags both initially false. |
|
JAFramesPlayer(JAOptions jopts,
JACanvasEmbedder embedder,
AvatarEventHandler aehdlr,
JAPlayerEventHandler pehdlr,
SpeedProvider sp,
boolean cyclic,
boolean onesign)
Constructs a new JAFramesPlayer : sets up the JA avatar
canvas, with the given JA options, canvas-embedder, avatar-event
handler, player-event handler, speed provider, 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()
Detaches its current animation, if any, from this player. |
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()
Creates a standard camera change monitor implementation attached to this player. |
AnimatedSign |
currentSign()
Returns the current sign for this player's animation scan, or null if the player currently has no animation scan. |
void |
doVideoGen(java.lang.String V_PATH,
boolean DO_LOG)
Initiates video generation from this player's current animation; assumes that the player and the video service are in a state for this to be possible, as indicated by videoGenIsPossible()
and videoServiceIsAvailable() . |
void |
ensureAnimationIsComplete()
Ensures that if this player has an animation then the animation is completely loaded. |
void |
framePlayFinishes()
Responds to the completion of a single frame play operation. |
void |
framePlayStarts()
Responds to the start of a single frame play operation. |
SiGMLAnimation |
getAnimation()
Returns the animation currently associated with this player if there is one, or null otherwise. |
FrameIndexScanAccess |
getFrameIndexAccess()
Returns a frame index access object for this player's current animation scanner if it has one, or null otherwise. |
void |
handleDoIdleAmbientChange()
Responds to a change in the do.idle.ambient scale option setting. |
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 animation 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 into this player's JA view. |
void |
resumePlaying()
Resumes the playing of this player's animation after an earlier suspension, or logs a message if there was no earlier suspension. |
void |
sequencePlayFinishes()
Responds to the completion of a sequence play operation. |
void |
sequencePlayStarts()
Responds to the start of a sequence play operation. |
void |
setAnimation(SiGMLAnimation anim)
Sets the given animation sequence to be the current one for this player. |
void |
setCyclicPlay(boolean cyclic)
Sets this player's cyclic-play flag to the given value. |
void |
setSingleSignPlay(boolean single)
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. |
void |
startPlaying()
Starts playing this player's current animation. |
void |
startPlayingStreamed()
Starts playing this player's current animation, assuming the input is streamed and should therefore (a) do lookahead for sign data in units of one sign and (b) allow for a delay at the start of each new sign. |
void |
stopPlaying()
Aborts this player's current animation, if any. |
void |
suspendPlaying()
Suspends this player's current animation, if any. |
void |
terminate()
Terminates this player and its display. |
boolean |
videoGenIsPossible()
Tests whether this player's current state are such as to allow the generation of a video for the latest animation. |
boolean |
videoServiceIsAvailable()
Tests whether this player has access to a local video generation server. |
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, no player-event handler, no speed provider,
and with the player's cyclic-play and "single-sign" flags both
initially false.
public JAFramesPlayer(JAOptions jopts, JACanvasEmbedder embedder, AvatarEventHandler aehdlr, JAPlayerEventHandler pehdlr, SpeedProvider sp)
JAFramesPlayer
: sets up the JA avatar
canvas, with the given JA options, canvas-embedder, avatar-event
handler, player-event handler, speed provider, and with the player's
cyclic-play and "single-sign" flags both initially false.
public JAFramesPlayer(JAOptions jopts, JACanvasEmbedder embedder, AvatarEventHandler aehdlr, JAPlayerEventHandler pehdlr, SpeedProvider sp, boolean cyclic, boolean onesign)
JAFramesPlayer
: sets up the JA avatar
canvas, with the given JA options, canvas-embedder, avatar-event
handler, player-event handler, speed provider, and with the given
initial settings of the player's cyclic-play and "single-sign" flags.
Method Detail |
---|
public void setCyclicPlay(boolean cyclic)
public void setSingleSignPlay(boolean single)
public void requestSwitchAvatar(java.lang.String avatar)
public void avatarIsLoaded(java.lang.String avatar)
avatarIsLoaded
in interface AvatarEventHandler
public void avatarIsUnloaded(java.lang.String avatar)
avatarIsUnloaded
in interface AvatarEventHandler
public void createStandardCameraChangeMonitor()
public FrameIndexScanAccess getFrameIndexAccess()
null
otherwise.
public void clearAnimation()
public void setAnimation(SiGMLAnimation anim)
public SiGMLAnimation getAnimation()
null
otherwise.
public void ensureAnimationIsComplete()
public SignStatusRecord makeSignStatusRecord()
SignStatusRecord
associated with this
player's animation 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 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 stopPlaying()
public void suspendPlaying()
public void startPlayingStreamed()
public void startPlaying()
public void resumePlaying()
public boolean videoServiceIsAvailable()
public boolean videoGenIsPossible()
public void doVideoGen(java.lang.String V_PATH, boolean DO_LOG)
videoGenIsPossible()
and videoServiceIsAvailable()
.
public boolean playerIsActive()
public void handleDoIdleAmbientChange()
public void sequencePlayStarts()
public void sequencePlayFinishes()
public void framePlayStarts()
public void framePlayFinishes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |