|
|||||||||
| 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
anecho.gui.SyncFrame
public class SyncFrame
The JamochaMUD Frame synchroniser: SyncFrame.java handles the synchronising of frame minimize/maximize, and potentially, movement events
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
java.awt.Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
java.awt.Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
|---|
| 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 java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
SyncFrame(java.lang.String title)
Creates a new SyncFrame. |
|
SyncFrame(java.lang.String title,
boolean sync,
SyncFrameGroup group)
Creates a new SyncFrame. |
|
SyncFrame(java.lang.String title,
SyncFrameGroup group)
Creates a new SyncFrame. |
|
| Method Summary | |
|---|---|
void |
dispose()
dispose of public class Window is handled to remove this frame from it's * registered SyncFrameGroups first before letting the super-class handle the rest |
boolean |
getCloseState()
Report the "Close state" of this frame. |
boolean |
getTerminationState()
Report the "termination state" of this frame |
boolean |
isLocked()
Returns the "lock" state of this frame. |
boolean |
isSynced()
Get the synchronisation status of this frame |
java.lang.String |
paramString()
A paramString so that other classes can identify individual SyncFrames. |
void |
processComponentEvent(java.awt.event.ComponentEvent event)
|
void |
processWindowEvent(java.awt.event.WindowEvent event)
|
void |
setAllStates(boolean state)
Set the state of all the frames in this group to be the same |
void |
setBounds(int newX,
int newY,
int width,
int height)
This method is overridden to keep us up to date with the component's location |
void |
setBounds(java.awt.Rectangle bounds)
setBounds is overridden to keep us up to date with the component's location |
void |
setCloseState(boolean state)
Set the frame to close when the "close" icon of the frame is activated |
void |
setGroupSync(boolean sync)
Set the synchronisation of the entire frame group |
void |
setLocation(int newX,
int newY)
setLocation is overridden to keep us up to date with the component's location |
void |
setLocation(java.awt.Point newLoc)
setBounds is overridden to keep us up to date with the component's location |
void |
setLock(boolean status)
Sets the "lock" status of this frame. |
void |
setSync(boolean sync)
Set the synchronisation of this frame |
void |
setSyncFrameGroup(SyncFrameGroup group)
Set the SyncFrameGroup for this frame |
void |
setTerminationState(boolean state)
Set the "termination state" of this frame (whether it kills the JVM or not) |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.awt.Window |
|---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, firePropertyChange, firePropertyChange, firePropertyChange, 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, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, 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, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, 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 java.awt.MenuContainer |
|---|
getFont, postEvent |
| Constructor Detail |
|---|
public SyncFrame(java.lang.String title)
title - The title of our Frame.
public SyncFrame(java.lang.String title,
SyncFrameGroup group)
title - The title of our Frame.group - The SyncFrameGroup that this SyncFrame will belong to.
public SyncFrame(java.lang.String title,
boolean sync,
SyncFrameGroup group)
title - The title of our Frame.sync - true - This SyncFrame is the be synchronised with the other SyncFrames in the group
false - This SyncFrame is to not be synchronised with its given SyncFrameGroup.group - The SyncFrameGroup that this SyncFrame will belong to.| Method Detail |
|---|
public void setSync(boolean sync)
sync - true - This frame is to be synchronised with its SyncFrameGroup.
false - This frame is not to be synchronised with its SyncFrameGroup.public void setGroupSync(boolean sync)
sync - true - Set all frames in this group to be synchronized
false - Set all frames in this group to not be synchronizedpublic boolean isSynced()
gui.SyncFrame#setSyncpublic void setSyncFrameGroup(SyncFrameGroup group)
group - The SyncFrameGroup that this SyncFrame is to become a member of.public void setTerminationState(boolean state)
state - A true state indicates that closing
this SyncFrame will terminate the JVM.
A false indicates this SyncFrame will
simply terminate itself, leaving the JVM to runpublic boolean getTerminationState()
true state indicates that the closing
of this frame will terminate the JVM,
a false will simply close the framepublic void setCloseState(boolean state)
state - A true closes the appropriate frame.
A false does not close the frame when activatepublic boolean getCloseState()
public void processWindowEvent(java.awt.event.WindowEvent event)
processWindowEvent in class java.awt.Windowevent - public void processComponentEvent(java.awt.event.ComponentEvent event)
processComponentEvent in class java.awt.Componentevent - public void setAllStates(boolean state)
state - If true, all the frames in
the group will be synchronised
If false the frames will act
independantly of each other.
public void setBounds(int newX,
int newY,
int width,
int height)
setBounds in class java.awt.WindownewX - New X-axis position for this frame.newY - New Y-axis position for this frame.width - New width for this frameheight - Newheight for this framepublic void setBounds(java.awt.Rectangle bounds)
setBounds in class java.awt.Componentbounds - New position and size for this component
public void setLocation(int newX,
int newY)
setLocation in class java.awt.ComponentnewX - New X-axis position for this frame.newY - New Y-axis position for this frame.public void setLocation(java.awt.Point newLoc)
setLocation in class java.awt.ComponentnewLoc - New position for this componentpublic void dispose()
dispose in class java.awt.Windowpublic java.lang.String paramString()
paramString in class java.awt.Framepublic void setLock(boolean status)
true by default if another SyncFrame is moved, hidden, or shown.
Without the lock, certain OSes activate the other SyncFrame's events after the
original event has been completed, making terrible loops. Once a locked frame has
received an event, it is unlocked (set false) again.
status - the SyncFrame's lock statusgui.SyncFrameGrouppublic boolean isLocked()
gui.SyncFrame#setLock
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||