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

## scone.accesstracking
Class FrameAccess

    java.lang.Object
      scone.accesstracking.FrameAccess

    public class FrameAccess

extends java.lang.Object

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.

Version:
  1.0b, 12/8/2002
Author:
  Torsten Hass

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

### getInstance

    public static FrameAccess getInstance()

  Get a sole instance of FrameAccess, using the Singleton pattern.

### add

    public 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

  Parameters:
    `parentframeName` - The name of the parent frame
    `frameName` - The name of the frame
    `appletConnector` - The instance of appletConnector to send commands to the Applet

### addAccessObject

    public void addAccessObject(java.lang.String parentFrameName,
                                java.lang.String frameName,
                                Access accessObject)

  This method adds the corresponding access object to a specific frame

  Parameters:
    `parentframeName` - The name of the parent frame
    `frameName` - The name of the frame
    `appletConnector` - The instance of appletConnector to send commands to the Applet

### remove

    public void remove(java.lang.String parentFrameName,
                       java.lang.String frameName)

  This method removes a Frame from the map of frames

  Parameters:
    `parentFrameName` - The name of the parent frame
    `frameName` - The name of the frame to remove

### contains

    public boolean contains(java.lang.String parentFrameName,
                            java.lang.String frameName)

  Returns true if the frameName exists.

  Parameters:
    `parentframeName` - The name of the parent frame
    `frameName` - The String to be tested
  Returns:
    True if the string exists.

### contains

    public boolean contains(java.lang.String parentFrameAndFrameName)

  Returns true if the frameName exists.

  Parameters:
    `parentFrameAndFrameName` - The name of the parent frame name and frame name concatinated
  Returns:
    True if the string exists.

### get

    public AppletConnector get(java.lang.String parentFrameName,
                               java.lang.String frameName)

  Gets the AppletConnector object for a specific frameName. If there is no entry for frameName, null will be returned.

  Parameters:
    `parentframeName` - The name of the parent frame
    `frameName` - The name of the frame
  Returns:
    The corresponding AppletConnector

### get

    public AppletConnector get(java.lang.String parentFrameAndFrameName)

  Gets the AppletConnector object for a specific parentFrameAndFrameName. This frameName is a concatination of parentFrameName and frameName. If the list contains no entry for the given frameName, null will be returned.

  Parameters:
    `parentFrameAndFrameName` - parentFrameName and frameName concatinated
  Returns:
    The corresponding AppletConnector

### getAccessObject

    public Access getAccessObject(java.lang.String parentFrameName,
                                  java.lang.String frameName)

  Gets the Access object for a specific frameName. If there is no entry for frameName, null will be returned.

  Parameters:
    `parentframeName` - The name of the parent frame
    `frameName` - The name of the frame
  Returns:
    The corresponding Access object

### getAccessObject

    public Access getAccessObject(java.lang.String parentFrameAndFrameName)

  Gets the Access object for a specific parentFrameAndFrameName. This frameName is a concatination of parentFrameName and frameName. If the list contains no entry for the given frameName, null will be returned.

  Parameters:
    `parentFrameAndFrameName` - parentFrameName and frameName concatinated
  Returns:
    The corresponding Access object

### showOpenFrames

    public void showOpenFrames()

  Show all parent frame names concatinated with the frame names in the list to stdout.

### getSetOfContents

    public java.util.Set getSetOfContents()

  Returns a Set of frame names which are open right now.

  Returns:
    a Set of parent frame names concatinated with frame names (strings)

### notifyMe

    public 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.

  Parameters:
    `callersRef` - Reference of the caller's class with the implemented method FramesChanged.
  Returns:
    The returned notifyObject is needed for the stopNotifyMe method

### stopNotifyMe

    public void stopNotifyMe(java.lang.Object notifyObject)

  stopNotifyMe clears the caller's reference from the list of regeistered objects.

  Parameters:
    `notifyObject` - The object from the notifyMe method to remove from the list of registered threads

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