Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class ncsa.horizon.awt.SimpleFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--ncsa.horizon.awt.SimpleFrame

public class SimpleFrame
extends java.awt.Frame
implements java.awt.event.ActionListener
A frame that provides minimal event handling, i.e., WINDOW_DESTROY.

See Also:
Serialized Form

Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
SimpleFrame()
           
SimpleFrame(java.lang.String title)
           
 
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
          handle action event from the File menu.
void addCloseToMenu()
          add a close command to this frame's File menu.
void addExitToMenu()
          add a close command to this frame's File menu.
static java.awt.Menu findMenuByName(java.awt.MenuBar mb, java.lang.String name)
          look for a Menu on a MenuBar with a given name
java.awt.Menu getFileMenu()
          return the FileMenu associated with this Frame, or create one if it does not exist.
void processWindowEvent(java.awt.event.WindowEvent ev)
          Provide minimal event handling: close window on WINDOW_DESTROY.
void setKillOnClose(boolean flag)
          Set flag to either hide frame or exit application when a WINDOW_DESTROY event is received.
void setKillOnClose()
          Destroy this frame and exit application when a WINDOW_DESTROY event is received.
 
Methods inherited from class java.awt.Frame
addNotify, dispose, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getTitle, isResizable, paramString, remove, setCursor, setIconImage, setMenuBar, setResizable, setTitle
 
Methods inherited from class java.awt.Window
addNotify, addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getComponent, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paint, paramString, preferredSize, printComponents, print, processContainerEvent, processEvent, removeAll, remove, remove, removeContainerListener, removeNotify, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

SimpleFrame

public SimpleFrame()

SimpleFrame

public SimpleFrame(java.lang.String title)
Method Detail

processWindowEvent

protected void processWindowEvent(java.awt.event.WindowEvent ev)
Provide minimal event handling: close window on WINDOW_DESTROY.
Parameters:
ev - the Frame event.
Overrides:
processWindowEvent in class java.awt.Window

setKillOnClose

public void setKillOnClose(boolean flag)
Set flag to either hide frame or exit application when a WINDOW_DESTROY event is received.
Parameters:
flag - True if exit application on window close; false to simply hide the frame.

setKillOnClose

public void setKillOnClose()
Destroy this frame and exit application when a WINDOW_DESTROY event is received.

addCloseToMenu

public void addCloseToMenu()
add a close command to this frame's File menu. If the frame does not have menu bar, one will be created. The close is accomplished sending a close WindowEvent to this Frame (via the System EventQueue).

addExitToMenu

public void addExitToMenu()
add a close command to this frame's File menu. If the frame does not have menu bar, one will be created. The close is accomplished sending a close WindowEvent to this Frame (via the System EventQueue).

getFileMenu

public java.awt.Menu getFileMenu()
return the FileMenu associated with this Frame, or create one if it does not exist.

findMenuByName

public static java.awt.Menu findMenuByName(java.awt.MenuBar mb,
                                  java.lang.String name)
look for a Menu on a MenuBar with a given name

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
handle action event from the File menu. An action command of "Close" will cause a close event to be sent to this frame (via the event queue). If setKillOnClose() is true, the application will be killed. An action command of "Exit" will result in a call to System.exit(0) to end the application.
Specified by:
actionPerformed(java.awt.event.ActionEvent) in interface java.awt.event.ActionListener

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD