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

diva.gui
Class ApplicationContext

java.lang.Object
 extended byjava.awt.Component
 extended byjava.awt.Container
 extended byjava.awt.Window
 extended byjava.awt.Frame
 extended byjavax.swing.JFrame
 extended bydiva.gui.ApplicationContext
All Implemented Interfaces:
javax.accessibility.Accessible, AppContext, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants
Direct Known Subclasses:
BasicFrame

public class ApplicationContext
extends javax.swing.JFrame
implements AppContext

A context for an application in the diva.gui infrastructure. This class represents an AppContext as a JFrame. Generally, all this class does is to pipe the AppContext method through to the appropriate method in the JFrame class. In addition, a listener is attached to the frame that fires the context's exit action when a WINDOW_CLOSING event is created. In this class, the default exit action kills the JVM. This class does not contain a menu bar or a toolbar by default.

Version:
$Id: ApplicationContext.java,v 1.12 2005年07月08日 19:55:10 cxh Exp $
Author:
Steve Neuendorffer, Michael Shilman, John Reekie
See Also:
Serialized Form

Nested Class Summary
Nested classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, 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
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
ApplicationContext()
Create a new ApplicationContext.
Method Summary
javax.swing.Action getExitAction()
Return the action that is called back when the user exits the app.
java.awt.Image getIconImage()
Get the image that represents this frame.
javax.swing.JMenuBar getJMenuBar()
Return the menu bar that the container uses.
java.lang.String getTitle()
Return the title of the context.
boolean isVisible()
Return whether or not the frame is visible.
java.awt.Component makeComponent()
Return "this" as a component.
void setExitAction(javax.swing.Action exitAction)
Set the action that is called back when the user exits the app.
void setIconImage(java.awt.Image image)
Set the icon that represents this frame.
void setJMenuBar(javax.swing.JMenuBar menu)
Set the menu bar that the container uses.
void setTitle(java.lang.String title)
Set the title of the context.
void setVisible(boolean visible)
Set the frame's visibility.
void showStatus(java.lang.String status)
Show the given status string at the bottom of the context.
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getMaximizedBounds, getMenuBar, getState, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface diva.gui.AppContext
setSize
Methods inherited from interface javax.swing.RootPaneContainer
getContentPane, getGlassPane, getLayeredPane, getRootPane, setContentPane, setGlassPane, setLayeredPane
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent

Constructor Detail

ApplicationContext

public ApplicationContext()
Create a new ApplicationContext. Add a hook to the frame that will cause the exit action to be fired when a user attempts to close the window. Set the default close operation of the frame to be DO_NOTHING_ON_CLOSE, since this is handled by the default exit action.

Method Detail

getExitAction

public javax.swing.Action getExitAction()
Return the action that is called back when the user exits the app.

Specified by:
getExitAction in interface AppContext

getIconImage

public java.awt.Image getIconImage()
Get the image that represents this frame.

Specified by:
getIconImage in interface AppContext

getTitle

public java.lang.String getTitle()
Return the title of the context.

Specified by:
getTitle in interface AppContext

getJMenuBar

public javax.swing.JMenuBar getJMenuBar()
Return the menu bar that the container uses.

Specified by:
getJMenuBar in interface AppContext

isVisible

public boolean isVisible()
Return whether or not the frame is visible.

Specified by:
isVisible in interface AppContext

makeComponent

public java.awt.Component makeComponent()
Return "this" as a component.

Specified by:
makeComponent in interface AppContext

showStatus

public void showStatus(java.lang.String status)
Show the given status string at the bottom of the context. This base class does nothing.

Specified by:
showStatus in interface AppContext

setVisible

public void setVisible(boolean visible)
Set the frame's visibility.

Specified by:
setVisible in interface AppContext

setExitAction

public void setExitAction(javax.swing.Action exitAction)
Set the action that is called back when the user exits the app.

Specified by:
setExitAction in interface AppContext

setTitle

public void setTitle(java.lang.String title)
Set the title of the context.

Specified by:
setTitle in interface AppContext

setIconImage

public void setIconImage(java.awt.Image image)
Set the icon that represents this frame.

Specified by:
setIconImage in interface AppContext

setJMenuBar

public void setJMenuBar(javax.swing.JMenuBar menu)
Set the menu bar that the container uses.

Specified by:
setJMenuBar in interface AppContext

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

AltStyle によって変換されたページ (->オリジナル) /