com.mamarce.mhp.mf.examples.example01
Class Example01

java.lang.Object
  extended by com.mamarce.mhp.mf.xlet.MXLet
      extended by com.mamarce.mhp.mf.examples.example01.Example01
All Implemented Interfaces:
MListener, javax.tv.xlet.Xlet

public class Example01
extends MXLet
implements MListener


Constructor Summary
Example01()
           
 
Method Summary
 void destroyXlet(boolean unconditional)
          Signals the Xlet to terminate and enter the Destroyed state.
 void initXlet(javax.tv.xlet.XletContext xletContext)
          Signals the Xlet to initialize itself and enter the Paused state.
 void manageEvent(java.awt.event.KeyEvent event)
          Handles KeyEvent.
 void startXlet()
          Signals the Xlet to start providing service and enter the Active state.
 
Methods inherited from class com.mamarce.mhp.mf.xlet.MXLet
addToScene, addToScene, getActiveListener, getOldListener, getXletContext, notifyDestroied, pauseXlet, setActiveListener, setExitContainerEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Example01

public Example01()
Method Detail

initXlet

public void initXlet(javax.tv.xlet.XletContext xletContext)
              throws javax.tv.xlet.XletStateChangeException
Description copied from class: MXLet
Signals the Xlet to initialize itself and enter the Paused state. The Xlet shall initialize itself in preparation for providing service. It should not hold shared resources but should be prepared to provide service in a reasonable amount of time.

An XletContext is used by the Xlet to access properties associated with its runtime environment. After this method returns successfully, the Xlet is in the Paused state and should be quiescent.

Note:his method shall only be called once.

Specified by:
initXlet in interface javax.tv.xlet.Xlet
Overrides:
initXlet in class MXLet
Parameters:
xletContext - the XletContext of the Xlet.
Throws:
javax.tv.xlet.XletStateChangeException - If the Xlet cannot be initialized.
See Also:
Xlet.initXlet(javax.tv.xlet.XletContext)

startXlet

public void startXlet()
               throws javax.tv.xlet.XletStateChangeException
Description copied from class: MXLet
Signals the Xlet to start providing service and enter the Active state. In the Active state the Xlet may hold shared resources. The method will only be called when the Xlet is in the paused state.

Specified by:
startXlet in interface javax.tv.xlet.Xlet
Overrides:
startXlet in class MXLet
Throws:
javax.tv.xlet.XletStateChangeException - is thrown if the Xlet cannot start providing service.
See Also:
Xlet.startXlet()

destroyXlet

public void destroyXlet(boolean unconditional)
                 throws javax.tv.xlet.XletStateChangeException
Description copied from class: MXLet
Signals the Xlet to terminate and enter the Destroyed state. In the destroyed state the Xlet must release all resources and save any persistent state. This method may be called from the Loaded, Paused or Active states. Xlets should perform any operations required before being terminated, such as releasing resources or saving preferences or state.

NOTE: The Xlet can request that it not enter the Destroyed state by throwing an XletStateChangeException. This is only a valid response if the unconditional flag is set to false. If it is true the Xlet is assumed to be in the Destroyed state regardless of how this method terminates. If it is not an unconditional request, the Xlet can signify that it wishes to stay in its current state by throwing the Exception. This request may be honored and the destroyXlet() method called again at a later time.

Specified by:
destroyXlet in interface javax.tv.xlet.Xlet
Overrides:
destroyXlet in class MXLet
Parameters:
unconditional - If unconditional is true when this method is called, requests by the Xlet to not enter the destroyed state will be ignored.
Throws:
javax.tv.xlet.XletStateChangeException - is thrown if the Xlet wishes to continue to execute (Not enter the Destroyed state). This exception is ignored if unconditional is equal to true.

manageEvent

public void manageEvent(java.awt.event.KeyEvent event)
Description copied from interface: MListener
Handles KeyEvent.

Specified by:
manageEvent in interface MListener
Parameters:
event - KeyEventObject.