|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hdcookbook.grinxlet.GrinXlet
public class GrinXlet
The xlet class for a grin-centric xlet project. This is the debug version of the xlet, with debug support turned on.
WARNING: There are actually three copies of this class: The debug version, the deploy version, and the GrinView version. The GrinView version can be found under AuthoringTools/grin/jdktools/grinviewer. It offers a subset of the public method of GrinXlet, e.g. to get and set the list of animation clients. This allows a GrinView simulation of a wider range of functionalities on a desktop.
If you add features to the xlet versions of this class (both debug and deploy), consider adding them to the GrinView version, too.
Field Summary | |
---|---|
Show |
show
|
static javax.tv.xlet.XletContext |
xletContext
The XletContext of our game xlet. |
Constructor Summary | |
---|---|
GrinXlet()
|
Method Summary | |
---|---|
void |
animationFinishInitialization()
Run the last part of initialization. |
void |
animationInitialize()
Run the first part of initialization. |
protected AnimationEngine |
createAnimationEngine()
Create the animation engine for this xlet, set up for the desired framerate. |
void |
destroyXlet(boolean unconditional)
|
protected void |
doInitXlet(java.lang.String[] args)
This method can be overridden by subclasses that want to look for xlet arguments in places other than the default XletContext.ARGS and "dvb.caller.parameters". |
AnimationClient[] |
getAnimationClients()
Get the list of animation clients |
AnimationEngine |
getAnimationEngine()
Get the animation engine |
static GrinXlet |
getInstance()
Get the instance of this singleton |
protected java.awt.Container |
getRootContainer()
Return the root container for this xlet, with the size set to the desired size. |
void |
initXlet(javax.tv.xlet.XletContext context)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Mouse clicked callback |
void |
mouseDragged(java.awt.event.MouseEvent e)
Mouse motion callback (when a button is down) |
void |
mouseEntered(java.awt.event.MouseEvent e)
Mouse entered callback |
void |
mouseExited(java.awt.event.MouseEvent e)
Mouse exited callback |
void |
mouseMoved(java.awt.event.MouseEvent e)
Mouse motion callback |
void |
mousePressed(java.awt.event.MouseEvent e)
Mouse pressed callback |
void |
mouseReleased(java.awt.event.MouseEvent e)
Mouse released callback |
void |
pauseXlet()
|
Show |
popKeyInterest()
Removes the show at the top of the key interest stack. |
void |
pushKeyInterest(Show show)
Inserts a new Show at the top of the key interest stack. |
void |
resetAnimationClients(AnimationClient[] clients)
Reset the list of animation clients |
void |
startXlet()
|
void |
userEventReceived(org.dvb.event.UserEvent e)
A remote control event that is coming in via org.dvb.event.UserEventListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static javax.tv.xlet.XletContext xletContext
This is not available in the GrinView version of GrinXlet.
public Show show
Constructor Detail |
---|
public GrinXlet()
Method Detail |
---|
public static GrinXlet getInstance()
public AnimationClient[] getAnimationClients()
public void resetAnimationClients(AnimationClient[] clients)
public AnimationEngine getAnimationEngine()
public void initXlet(javax.tv.xlet.XletContext context)
initXlet
in interface javax.tv.xlet.Xlet
protected java.awt.Container getRootContainer()
Subclasses may override this method to use a different container as the root container, or to set a different size. The implementation of the subclass method might also change the resolution of the player, e.g. from full HD (1920x1080) to QHD (960x540).
protected void doInitXlet(java.lang.String[] args)
protected AnimationEngine createAnimationEngine()
public void startXlet()
startXlet
in interface javax.tv.xlet.Xlet
public void pauseXlet()
pauseXlet
in interface javax.tv.xlet.Xlet
public void destroyXlet(boolean unconditional)
destroyXlet
in interface javax.tv.xlet.Xlet
public void animationInitialize() throws java.lang.InterruptedException
AnimationContext
If this initialization is time-consuming, it should poll AnimationEngine.destroyRequested() from time to time, and bail out if needed. A good way to do this is by calling checkDestroy().
animationInitialize
in interface AnimationContext
java.lang.InterruptedException
AnimationEngine.destroyRequested()
,
AnimationEngine.checkDestroy()
public void animationFinishInitialization()
AnimationContext
If this initialization is time-consuming, it should poll AnimationEngine.destroyRequested() from time to time, and bail out if needed. A good way to do this is by calling checkDestroy().
animationFinishInitialization
in interface AnimationContext
AnimationEngine.destroyRequested()
,
Show.activateSegment(com.hdcookbook.grin.Segment)
public void userEventReceived(org.dvb.event.UserEvent e)
userEventReceived
in interface org.dvb.event.UserEventListener
public void pushKeyInterest(Show show)
public Show popKeyInterest()
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |