utils.ptplot5_2.ptolemy.gui
Class GraphicalMessageHandler

java.lang.Object
  |
  +--utils.ptplot5_2.ptolemy.gui.MessageHandler
        |
        +--utils.ptplot5_2.ptolemy.gui.GraphicalMessageHandler

public class GraphicalMessageHandler
extends MessageHandler

This is a message handler that reports errors in a graphical dialog box. When an applet or application starts up, it should call setContext() to specify a component with respect to which the display window should be created. This ensures that if the application is iconified or deiconified, that the display window goes with it. If the context is not specified, then the display window is centered on the screen, but iconifying and deiconifying may not work as desired.

This class is based on (and contains code from) the diva GUIUtilities class.

Since:
Ptolemy II 1.0
Version:
$Id: GraphicalMessageHandler.html,v 1.1.1.1 2003/07/10 12:20:41 dsagnol Exp $
Author:
Edward A. Lee, Steve Neuendorffer, and John Reekie

Constructor Summary
GraphicalMessageHandler()
           
 
Method Summary
static java.awt.Component getContext()
          Get the component set by a call to setContext(), or null if none.
static void setContext(java.awt.Component context)
          Set the component with respect to which the display window should be created.
 
Methods inherited from class utils.ptplot5_2.ptolemy.gui.MessageHandler
error, error, getMessageHandler, message, setMessageHandler, warning, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicalMessageHandler

public GraphicalMessageHandler()
Method Detail

getContext

public static java.awt.Component getContext()
Get the component set by a call to setContext(), or null if none.

Returns:
The component with respect to which the display window is iconified, or null if none has been specified.
See Also:
setContext(Component)

setContext

public static void setContext(java.awt.Component context)
Set the component with respect to which the display window should be created. This ensures that if the application is iconified or deiconified, that the display window goes with it.

Parameters:
context - The component context.
See Also:
getContext()