|
Graphics2D Actor API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
g2d.swing.IOPFrame
g2d.mwa.MWAFrame
public class MWAFrame
Implements a window in an Multi-Window Application. One can build up a hierachy of MWA windows using the notion of a parent window at object creation time.
Note: This class has a natural ordering based on the title of the frame
that is inconsistent with equals.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected static Dimension |
initialSize
|
protected JMenu |
windowMenu
|
| 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 | |
|---|---|
MWAFrame(String title)
Creates this frame with the given title. |
|
MWAFrame(String title,
int hgap,
int vgap)
Creates this frame with the given title and sets gaps of layout manager of the content pane. |
|
MWAFrame(String title,
int hgap,
int vgap,
MWAFrame parent)
Creates this frame with the given title and sets gaps of layout manager and assigns a given parent. |
|
MWAFrame(String title,
MWAFrame parent)
Creates this frame with the given title and with a given parent. |
|
| Method Summary | |
|---|---|
void |
close()
Called when MWAControl wants to shut-down. |
int |
compareTo(Object o)
|
void |
componentHidden(ComponentEvent event)
|
void |
componentMoved(ComponentEvent event)
|
void |
componentResized(ComponentEvent event)
|
void |
componentShown(ComponentEvent event)
|
MWAFrame[] |
getChildrenFrames()
Obtain array of frames that are children of this frame. |
static Dimension |
getInitialSize()
|
JMenuBar |
getJMenuBar()
Get menu bar without the "Window" menu. |
MWAFrame |
getParentFrame()
Obtain parent frame of this frame. |
MWAFrame |
getTopFrame()
Walks up the ancestors of this frame until one is found that doesn't have a parent. |
void |
setDefaultCloseOperation(int i)
Do not allow users of this class to override default close operation. |
static void |
setInitialSize(Dimension initialSize)
|
void |
setJMenuBar(JMenuBar menubar)
Set menu bar and append the "Window" menu at end. |
void |
setTitle(String s)
|
void |
updateWindows()
Called when the population of windows controlled by MWAControl
changes. |
void |
windowActivated(WindowEvent event)
|
void |
windowClosed(WindowEvent event)
|
void |
windowClosing(WindowEvent event)
|
void |
windowDeactivated(WindowEvent event)
|
void |
windowDeiconified(WindowEvent event)
|
void |
windowIconified(WindowEvent event)
|
void |
windowOpened(WindowEvent event)
|
| Methods inherited from class g2d.swing.IOPFrame |
|---|
add, add, add, getScreenSize, main, setSize, setSize |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setUndecorated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
protected static Dimension initialSize
protected JMenu windowMenu
| Constructor Detail |
|---|
public MWAFrame(String title)
title - String with title to be used for windowIOPFrame.IOPFrame(String)
public MWAFrame(String title,
int hgap,
int vgap)
title - String with title to be used for windowhgap - number of pixels used as horizontal gapvgap - number of pixels used as vertical gapIOPFrame.IOPFrame(String, int, int)
public MWAFrame(String title,
MWAFrame parent)
title - String with title to be used for windowparent - MWAFrame that is the parent of this frame
public MWAFrame(String title,
int hgap,
int vgap,
MWAFrame parent)
title - String with title to be used for windowhgap - number of pixels used as horizontal gapvgap - number of pixels used as vertical gapparent - MWAFrame that is the parent of this frame| Method Detail |
|---|
public MWAFrame getParentFrame()
null
if this frame does not have a parent.
null)public MWAFrame getTopFrame()
public MWAFrame[] getChildrenFrames()
public static Dimension getInitialSize()
public static void setInitialSize(Dimension initialSize)
public void setTitle(String s)
setTitle in class Framepublic void setDefaultCloseOperation(int i)
setDefaultCloseOperation in class JFramei - (not used)public JMenuBar getJMenuBar()
getJMenuBar in class JFramepublic void setJMenuBar(JMenuBar menubar)
null is given, new menu bar will only
contain the "Window" menu.
setJMenuBar in class JFramemenubar - JMenuBar to be used for this frame
(without "Window" menu); can be nullpublic void updateWindows()
ControlListenerMWAControl
changes.
updateWindows in interface ControlListenerpublic void close()
ControlListenerMWAControl wants to shut-down.
close in interface ControlListenerpublic int compareTo(Object o)
compareTo in interface Comparablepublic void componentResized(ComponentEvent event)
componentResized in interface ComponentListenerpublic void componentMoved(ComponentEvent event)
componentMoved in interface ComponentListenerpublic void componentShown(ComponentEvent event)
componentShown in interface ComponentListenerpublic void componentHidden(ComponentEvent event)
componentHidden in interface ComponentListenerpublic void windowOpened(WindowEvent event)
windowOpened in interface WindowListenerpublic void windowClosing(WindowEvent event)
windowClosing in interface WindowListenerpublic void windowClosed(WindowEvent event)
windowClosed in interface WindowListenerpublic void windowIconified(WindowEvent event)
windowIconified in interface WindowListenerpublic void windowDeiconified(WindowEvent event)
windowDeiconified in interface WindowListenerpublic void windowActivated(WindowEvent event)
windowActivated in interface WindowListenerpublic void windowDeactivated(WindowEvent event)
windowDeactivated in interface WindowListener
|
Graphics2D Actor API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||