app
Class MultimediaApplication

java.lang.Object
  extended by app.JApplication
      extended by app.MultimediaApplication
All Implemented Interfaces:
MultimediaRootPaneContainer, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener, javax.swing.RootPaneContainer

public abstract class MultimediaApplication
extends JApplication
implements MultimediaRootPaneContainer

A MultimediaApplication is a JApplication that delegates all calls to "transition" methods to a MultimediaApp. The calls to the MultimediaApp object's "transition" methods will be made in the event dispatch thread.

See Also:
"The Design and Implementation of Multimedia Software © 2011"

Field Summary
 
Fields inherited from class app.JApplication
icondata, mainWindow
 
Constructor Summary
MultimediaApplication(java.lang.String[] args, MultimediaApp app, int width, int height)
          Explicit Value Constructor
 
Method Summary
 void destroy()
          This method is called just after the main window is disposed.
protected  MultimediaApp getMultimediaApp()
          Get a reference to the MultimediaApp that is being delegated to
 java.lang.String getParameter(java.lang.String name)
          Returns the value of the "named" parameter (required by MultimediaRootPaneContainer)
 void init()
          This method is called just before the main window is first made visible
 void start()
          This method is called when the main window is first made visible and then each time it is de-iconified.
 void stop()
          This method is called each time the main window is iconified and just before it is disposed.
 
Methods inherited from class app.JApplication
getContentPane, getGlassPane, getLayeredPane, getRootPane, run, setContentPane, setGlassPane, setLayeredPane, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.RootPaneContainer
getContentPane, getGlassPane, getLayeredPane, getRootPane, setContentPane, setGlassPane, setLayeredPane
 

Constructor Detail

MultimediaApplication

public MultimediaApplication(java.lang.String[] args,
                             MultimediaApp app,
                             int width,
                             int height)
Explicit Value Constructor

Parameters:
args - The command-line aguments
app - The MultimediaApp to delegate to
width - The width (in pixels) of the main window
height - The width (in pixels) of the main window
Method Detail

destroy

public void destroy()
This method is called just after the main window is disposed. The default implementation does nothing.

Overrides:
destroy in class JApplication

getMultimediaApp

protected MultimediaApp getMultimediaApp()
Get a reference to the MultimediaApp that is being delegated to

Returns:
The MultimediaApp

getParameter

public java.lang.String getParameter(java.lang.String name)
Returns the value of the "named" parameter (required by MultimediaRootPaneContainer)

Specified by:
getParameter in interface MultimediaRootPaneContainer
Parameters:
name - The name/index of the parameter

init

public void init()
This method is called just before the main window is first made visible

Specified by:
init in class JApplication

start

public void start()
This method is called when the main window is first made visible and then each time it is de-iconified. The default implementation does nothing.

Overrides:
start in class JApplication

stop

public void stop()
This method is called each time the main window is iconified and just before it is disposed. The default implementation does nothing.

Overrides:
stop in class JApplication


Design and Implementation of Multimedia Software, Jones and Bartlett Publishers