utils.ptplot5_2.ptolemy.gui
Class BasicJApplet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--javax.swing.JApplet
                                |
                                +--utils.ptplot5_2.ptolemy.gui.BasicJApplet
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable
Direct Known Subclasses:
QueryApplet, ShowRawDocumentApplet

public class BasicJApplet
extends javax.swing.JApplet

Base class for swing applets. This class provides basic management for background colors, a standardized mechanism for reporting errors and exceptions, and a minimal amount of information about the applet.

The applet parameter is:

Since:
Ptolemy II 0.4
Version:
$Id: BasicJApplet.html,v 1.1.1.1 2003/07/10 12:20:41 dsagnol Exp $
Author:
Edward A. Lee
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
BasicJApplet()
           
 
Method Summary
 java.lang.String getAppletInfo()
          Return generic applet information.
 java.lang.String[][] getParameterInfo()
          Describe the applet parameters.
 void init()
          Initialize the applet.
 void report(java.lang.Exception ex)
          Report an exception.
 void report(java.lang.String message)
          Report a message to the user.
 void report(java.lang.String message, java.lang.Exception ex)
          Report an exception with an additional message.
 
Methods inherited from class javax.swing.JApplet
getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicJApplet

public BasicJApplet()
Method Detail

getAppletInfo

public java.lang.String getAppletInfo()
Return generic applet information.

Overrides:
getAppletInfo in class java.applet.Applet
Returns:
A string giving minimal information about Ptolemy II.

getParameterInfo

public java.lang.String[][] getParameterInfo()
Describe the applet parameters. Derived classes should override this and append their own parameters. The protected method _concatStringArrays() is provided to make this easy to do.

Overrides:
getParameterInfo in class java.applet.Applet
Returns:
An array describing the applet parameters.

init

public void init()
Initialize the applet. This method is called by the browser or applet viewer to inform this applet that it has been loaded into the system. It is always called before the first time that the start() method is called. In this base class, this method reads the background color parameter. If the background color parameter has not been set, then the background color is set to white.

Overrides:
init in class java.applet.Applet

report

public void report(java.lang.Exception ex)
Report an exception. This prints a message to the standard error stream, followed by the stack trace, but displays on the screen only the error message associated with the exception.


report

public void report(java.lang.String message)
Report a message to the user. This shows the message on the browser's status bar.

Parameters:
message - The message to report.

report

public void report(java.lang.String message,
                   java.lang.Exception ex)
Report an exception with an additional message. This prints a message to standard error, followed by the stack trace, and pops up a window with the message and the message of the exception.