|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscone.accesstracking.FrameAccess
public class FrameAccess
This Class stores all active frames in a list. To allow only
one instance of this class, get your instance by calling the
getInstance()
method.
If you want to be notified about changes in the list of frames,
you have to implement the method
public void framesChanged (Set contents)
and call the notifyMe
method. e.g.
Object fa = FrameAccess.getInstance();
Object notifyObject = fa.notifyMe(this);
You will need the notifyObject to unregister by calling
stopNotifyMe(notifyObject)
.
The parameter contents holds a set of Strings, one for each
frame, holding the concatinated parent frame name (if existing)
and actual frame name.
Method Summary | |
---|---|
void |
add(java.lang.String parentFrameName,
java.lang.String frameName,
AppletConnector appletConnector)
This method adds a new Frame to the list of frames and notifys the registered objects as soon as all data is collected |
void |
addAccessObject(java.lang.String parentFrameName,
java.lang.String frameName,
Access accessObject)
This method adds the corresponding access object to a specific frame |
boolean |
contains(java.lang.String parentFrameAndFrameName)
Returns true if the frameName exists. |
boolean |
contains(java.lang.String parentFrameName,
java.lang.String frameName)
Returns true if the frameName exists. |
AppletConnector |
get(java.lang.String parentFrameAndFrameName)
Gets the AppletConnector object for a specific parentFrameAndFrameName. |
AppletConnector |
get(java.lang.String parentFrameName,
java.lang.String frameName)
Gets the AppletConnector object for a specific frameName. |
Access |
getAccessObject(java.lang.String parentFrameAndFrameName)
Gets the Access object for a specific parentFrameAndFrameName. |
Access |
getAccessObject(java.lang.String parentFrameName,
java.lang.String frameName)
Gets the Access object for a specific frameName. |
static FrameAccess |
getInstance()
Get a sole instance of FrameAccess, using the Singleton pattern. |
java.util.Set |
getSetOfContents()
Returns a Set of frame names which are open right now. |
java.lang.Object |
notifyMe(java.lang.Object callersRef)
notifyMe allows other objects to register for a callback on any change of the FrameList and send the new Framelist. |
void |
remove(java.lang.String parentFrameName,
java.lang.String frameName)
This method removes a Frame from the map of frames |
void |
showOpenFrames()
Show all parent frame names concatinated with the frame names in the list to stdout. |
void |
stopNotifyMe(java.lang.Object notifyObject)
stopNotifyMe clears the caller's reference from the list of regeistered objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static FrameAccess getInstance()
public void add(java.lang.String parentFrameName, java.lang.String frameName, AppletConnector appletConnector)
parentframeName
- The name of the parent frameframeName
- The name of the frameappletConnector
- The instance of appletConnector to send
commands to the Appletpublic void addAccessObject(java.lang.String parentFrameName, java.lang.String frameName, Access accessObject)
parentframeName
- The name of the parent frameframeName
- The name of the frameappletConnector
- The instance of appletConnector to send
commands to the Appletpublic void remove(java.lang.String parentFrameName, java.lang.String frameName)
parentFrameName
- The name of the parent frameframeName
- The name of the frame to removepublic boolean contains(java.lang.String parentFrameName, java.lang.String frameName)
parentframeName
- The name of the parent frameframeName
- The String to be tested
public boolean contains(java.lang.String parentFrameAndFrameName)
parentFrameAndFrameName
- The name of the parent frame name and frame name concatinated
public AppletConnector get(java.lang.String parentFrameName, java.lang.String frameName)
parentframeName
- The name of the parent frameframeName
- The name of the frame
public AppletConnector get(java.lang.String parentFrameAndFrameName)
parentFrameAndFrameName
- parentFrameName and frameName concatinated
public Access getAccessObject(java.lang.String parentFrameName, java.lang.String frameName)
parentframeName
- The name of the parent frameframeName
- The name of the frame
public Access getAccessObject(java.lang.String parentFrameAndFrameName)
parentFrameAndFrameName
- parentFrameName and frameName concatinated
public void showOpenFrames()
public java.util.Set getSetOfContents()
public java.lang.Object notifyMe(java.lang.Object callersRef)
callersRef
- Reference of the caller's class with the implemented
method FramesChanged.
public void stopNotifyMe(java.lang.Object notifyObject)
notifyObject
- The object from the notifyMe method to remove from
the list of registered threads
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |