org.jhotdraw.app
Class DefaultAppletApplication

java.lang.Object
  extended by org.jhotdraw.beans.AbstractBean
      extended by org.jhotdraw.app.AbstractApplication
          extended by org.jhotdraw.app.DefaultAppletApplication
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Application

public class DefaultAppletApplication
extends AbstractApplication

Default Application that can be run as an Applet. FIXME - To be implemented.

Version:
$Id: DefaultAppletApplication.java 604 2010-01-09 12:00:29Z rawcoder $
Author:
Werner Randelshofer
See Also:
Serialized Form

Field Summary
private  javax.swing.JApplet applet
           
private  View view
           
 
Fields inherited from class org.jhotdraw.app.AbstractApplication
labels, model, VIEW_COUNT_PROPERTY
 
Fields inherited from class org.jhotdraw.beans.AbstractBean
propertySupport
 
Fields inherited from interface org.jhotdraw.app.Application
ACTIVE_VIEW_PROPERTY, RECENT_URIS_PROPERTY
 
Constructor Summary
DefaultAppletApplication(javax.swing.JApplet applet)
          Creates a new instance of DefaultAppletApplication
 
Method Summary
 javax.swing.JMenu createEditMenu(View v)
          Creates an edit menu for the specified view.
 javax.swing.JMenu createFileMenu(View v)
          Creates a file menu for the specified view.
 javax.swing.JMenu createHelpMenu(View v)
          Creates a help menu for the specified view.
protected  javax.swing.ActionMap createViewActionMap(View p)
           
 javax.swing.JMenu createViewMenu(View v)
          Creates a view menu for the specified view.
 javax.swing.JMenu createWindowMenu(View v)
          Creates a window menu for the specified view.
 View getActiveView()
          Gets the active view.
 java.awt.Component getComponent()
          Returns the application component.
 void hide(View v)
          Hides a view.
 void init()
          Initializes the application.
 boolean isSharingToolsAmongViews()
          Returns true, if this application shares tools among multiple views.
 void show(View v)
          Shows a view.
 
Methods inherited from class org.jhotdraw.app.AbstractApplication
add, addAction, addAction, addMenuItem, addPalette, addRecentURI, addWindow, basicCreateView, clearRecentURIs, configure, createContainer, createOpenRecentFileMenu, createView, destroy, dispose, getAction, getActionMap, getCopyright, getExportChooser, getImportChooser, getModel, getName, getOpenChooser, getRecentURIs, getSaveChooser, getVersion, initLabels, isEnabled, launch, maybeAddSeparator, remove, removePalette, removeWindow, setActionMap, setActiveView, setEnabled, setModel, start, stop, views
 
Methods inherited from class org.jhotdraw.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jhotdraw.app.Application
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

applet

private javax.swing.JApplet applet

view

private View view
Constructor Detail

DefaultAppletApplication

public DefaultAppletApplication(javax.swing.JApplet applet)
Creates a new instance of DefaultAppletApplication

Method Detail

init

public void init()
Description copied from interface: Application
Initializes the application. configure() should have been invoked before the application is inited. Alternatively an application can be configured using setter methods.

Specified by:
init in interface Application
Overrides:
init in class AbstractApplication

show

public void show(View v)
Description copied from interface: Application
Shows a view.


hide

public void hide(View v)
Description copied from interface: Application
Hides a view.


getActiveView

public View getActiveView()
Description copied from class: AbstractApplication
Gets the active view.

Specified by:
getActiveView in interface Application
Overrides:
getActiveView in class AbstractApplication
Returns:
The active view can be null.

isSharingToolsAmongViews

public boolean isSharingToolsAmongViews()
Description copied from interface: Application
Returns true, if this application shares tools among multiple views.


getComponent

public java.awt.Component getComponent()
Description copied from interface: Application
Returns the application component. This may return null, if the application is not represented by a component of its own on the user interface.


createViewActionMap

protected javax.swing.ActionMap createViewActionMap(View p)
Specified by:
createViewActionMap in class AbstractApplication

createFileMenu

public javax.swing.JMenu createFileMenu(View v)
Description copied from interface: Application
Creates a file menu for the specified view. Returns null, if the menu is empty.


createEditMenu

public javax.swing.JMenu createEditMenu(View v)
Description copied from interface: Application
Creates an edit menu for the specified view. Returns null, if the menu is empty.


createViewMenu

public javax.swing.JMenu createViewMenu(View v)
Description copied from interface: Application
Creates a view menu for the specified view. Returns null, if the menu is empty.


createWindowMenu

public javax.swing.JMenu createWindowMenu(View v)
Description copied from interface: Application
Creates a window menu for the specified view. Returns null, if the menu is empty.


createHelpMenu

public javax.swing.JMenu createHelpMenu(View v)
Description copied from interface: Application
Creates a help menu for the specified view. Returns null, if the menu is empty.