anecho.gui
Class SyncFrameGroup

java.lang.Object
  extended by anecho.gui.SyncFrameGroup

public class SyncFrameGroup
extends java.lang.Object

The JamochaMUD Frame Group handler: SyncFrame.java handles the synchronising of frame minimize/maximize, and potentially, movement events. This class coordinates the SyncFrames in each group.


Field Summary
static int HIDE
          A variable representing the "hide" option for the frame state.
static int SET_ALL_FALSE
           
static int SET_ALL_TRUE
           
static int SHOW
          A variable representing the "Show" option for the frame state.
 
Constructor Summary
SyncFrameGroup()
          Create a SyncFrameGroup
 
Method Summary
 void add(java.awt.Frame newFrame)
          Add a new SyncFrame to the group
 void changeState(java.awt.Frame origin, int action)
          A common loop using switches
 void moveFrames(java.awt.Frame origin, int xMove, int yMove)
          Move all the frames in this group with the exception of the "origin" frame
 void remove(java.awt.Frame origin)
          Remove a SyncFrame from the group
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHOW

public static final int SHOW
A variable representing the "Show" option for the frame state.

See Also:
Constant Field Values

HIDE

public static final int HIDE
A variable representing the "hide" option for the frame state.

See Also:
Constant Field Values

SET_ALL_TRUE

public static final int SET_ALL_TRUE
See Also:
Constant Field Values

SET_ALL_FALSE

public static final int SET_ALL_FALSE
See Also:
Constant Field Values
Constructor Detail

SyncFrameGroup

public SyncFrameGroup()
Create a SyncFrameGroup

Method Detail

add

public void add(java.awt.Frame newFrame)
Add a new SyncFrame to the group

Parameters:
newFrame - A SyncFrame to be added to the SyncFrame group.

remove

public void remove(java.awt.Frame origin)
Remove a SyncFrame from the group

Parameters:
origin - The given SyncFrame to be removed from the SyncFrame group.

moveFrames

public void moveFrames(java.awt.Frame origin,
                       int xMove,
                       int yMove)
Move all the frames in this group with the exception of the "origin" frame

Parameters:
origin - The frame that originated the move request.
xMove - The relative number of pixels to move the frames horizontally.
yMove - The relative number of pixels to move the frames vertically.

changeState

public void changeState(java.awt.Frame origin,
                        int action)
A common loop using switches

Parameters:
origin - The frame that originated the change state request.
action - The action to be performed by the frames, such as HIDE.