CSLib
Class ClosableFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--CSLib.ClosableFrame
Direct Known Subclasses:
DrawingBox, OutputBox

public class ClosableFrame
extends Frame
implements WindowListener

ClosableFrame is a base class that obeys the
windowClosing event. It is intended that the
student extend this class instead of Frame.

Author:
M. Dennis Mickunas
See Also: Frame, WindowListener

Fields inherited from class java.awt.Frame
DEFAULT_CURSOR, CROSSHAIR_CURSOR, TEXT_CURSOR, WAIT_CURSOR, SW_RESIZE_CURSOR, SE_RESIZE_CURSOR, NW_RESIZE_CURSOR, NE_RESIZE_CURSOR, N_RESIZE_CURSOR, S_RESIZE_CURSOR, W_RESIZE_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, MOVE_CURSOR, NORMAL, ICONIFIED

Fields inherited from class java.awt.Component
TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT

Constructor Summary
ClosableFrame()
          Class constructor, creating a frame that can respond to the
"window closing" event; the frame will have a blank title.
ClosableFrame(String title)
          Class constructor, creating a frame that can respond to the
"window closing" event; the frame will have a specific title.

Method Summary
 voidwindowActivated(WindowEvent e)
          Vacuous implementation.
 voidwindowClosed(WindowEvent e)
          Vacuous implementation.
 voidwindowClosing(WindowEvent e)
          Cleans up the window, and terminates the program.
 voidwindowDeactivated(WindowEvent e)
          Vacuous implementation.
 voidwindowDeiconified(WindowEvent e)
          Vacuous implementation.
 voidwindowIconified(WindowEvent e)
          Vacuous implementation.
 voidwindowOpened(WindowEvent e)
          Vacuous implementation.

Methods inherited from class java.awt.Frame
addNotify, getTitle, setTitle, getIconImage, setIconImage, getMenuBar, setMenuBar, isResizable, setResizable, setState, getState, remove, removeNotify, setCursor, getCursorType, getFrames, getAccessibleContext

Methods inherited from class java.awt.Window
pack, show, hide, dispose, toFront, toBack, getToolkit, getWarningString, getLocale, getInputContext, setCursor, getOwner, getOwnedWindows, addWindowListener, removeWindowListener, getListeners, getFocusOwner, postEvent, isShowing, applyResourceBundle, applyResourceBundle, getGraphicsConfiguration

Methods inherited from class java.awt.Container
getComponentCount, countComponents, getComponent, getComponents, getInsets, insets, add, add, add, add, add, remove, remove, removeAll, getLayout, setLayout, doLayout, layout, invalidate, validate, setFont, getPreferredSize, preferredSize, getMinimumSize, minimumSize, getMaximumSize, getAlignmentX, getAlignmentY, paint, update, print, paintComponents, printComponents, addContainerListener, removeContainerListener, deliverEvent, getComponentAt, locate, getComponentAt, findComponentAt, findComponentAt, isAncestorOf, list, list

Methods inherited from class java.awt.Component
getName, setName, getParent, getPeer, setDropTarget, getDropTarget, getTreeLock, isValid, isDisplayable, isVisible, isEnabled, setEnabled, enable, enable, disable, isDoubleBuffered, enableInputMethods, setVisible, show, getForeground, setForeground, getBackground, setBackground, getFont, setLocale, getColorModel, getLocation, getLocationOnScreen, location, setLocation, move, setLocation, getSize, size, setSize, resize, setSize, resize, getBounds, bounds, setBounds, reshape, setBounds, getX, getY, getWidth, getHeight, getBounds, getSize, getLocation, isOpaque, isLightweight, getGraphics, getFontMetrics, getCursor, paintAll, repaint, repaint, repaint, repaint, printAll, imageUpdate, createImage, createImage, prepareImage, prepareImage, checkImage, checkImage, contains, inside, contains, dispatchEvent, addComponentListener, removeComponentListener, addFocusListener, removeFocusListener, addHierarchyListener, removeHierarchyListener, addHierarchyBoundsListener, removeHierarchyBoundsListener, addKeyListener, removeKeyListener, addMouseListener, removeMouseListener, addMouseMotionListener, removeMouseMotionListener, addInputMethodListener, removeInputMethodListener, getInputMethodRequests, handleEvent, mouseDown, mouseDrag, mouseUp, mouseMove, mouseEnter, mouseExit, keyDown, keyUp, action, gotFocus, lostFocus, isFocusTraversable, requestFocus, transferFocus, nextFocus, hasFocus, add, toString, list, list, list, addPropertyChangeListener, removePropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, setComponentOrientation, getComponentOrientation

Methods inherited from class java.lang.Object
getClass, hashCode, equals, notify, notifyAll, wait, wait, wait

Constructor Detail

ClosableFrame

public ClosableFrame()
Class constructor, creating a frame that can respond to the
"window closing" event; the frame will have a blank title.

ClosableFrame

public ClosableFrame(String title)
Class constructor, creating a frame that can respond to the
"window closing" event; the frame will have a specific title.
Parameters:
title the specific title for this frame.
Method Detail

windowActivated

public void windowActivated(WindowEvent e)
Vacuous implementation.

windowClosed

public void windowClosed(WindowEvent e)
Vacuous implementation.

windowClosing

public void windowClosing(WindowEvent e)
Cleans up the window, and terminates the program.
Parameters:
e the specific WindowEvent that occurred.

windowDeactivated

public void windowDeactivated(WindowEvent e)
Vacuous implementation.

windowDeiconified

public void windowDeiconified(WindowEvent e)
Vacuous implementation.

windowIconified

public void windowIconified(WindowEvent e)
Vacuous implementation.

windowOpened

public void windowOpened(WindowEvent e)
Vacuous implementation.