Venice 0.751beta

nz.org.venice.ui
Class FrameRegister

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended bynz.org.venice.ui.FrameRegister
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class FrameRegister
extends java.util.HashMap

FrameRegister is a collection of ModuleFrames. It is an implementation of a simple monitor and it's purpose is to serialise the creation of new ModuleFrames. FrameRegister was written initially for the purpose of restoring saved windows as a way of accessing the new ModuleFrame objects but also as a way of serialising their creation. The use of some non thread safe objects were discovered when trying to create multiple ChartModules and the decision was made to serialise their creation under restoration rather than attempt to modify code that otherwise works perfectly well. This class is deprecated.

Author:
Mark Humel
See Also:
Serialized Form

Constructor Summary
FrameRegister()
           
 
Method Summary
 void add(ModuleFrame frame)
          Add new ModuleFrame to register, using size as key
 void delete(ModuleFrame frame)
          Remove all references to the ModuleFrame
 boolean find(java.lang.String key)
          Return true if there is a mapping to
 boolean findChild(java.lang.String childKey)
          Return true if there is a moduleframe which has a module of key childkey
 ModuleFrame get(java.lang.String key)
          Return the ModuleFrame identified by key The method will block if there is no ModuleFrame associated with the key.
 ModuleFrame getFrameOfType(java.lang.String type)
          Return true if there is a frame of a certain type in the register.
 void put(java.lang.String key, ModuleFrame frame)
          Register a new ModuleFrame identified by key
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

FrameRegister

public FrameRegister()
Method Detail

add

public void add(ModuleFrame frame)
Add new ModuleFrame to register, using size as key

Parameters:
frame - A new ModuleFrame

put

public void put(java.lang.String key,
                ModuleFrame frame)
Register a new ModuleFrame identified by key

Parameters:
key - The Identifier for a ModuleFrame
frame - The ModuleFrame to associate with key

get

public ModuleFrame get(java.lang.String key)
Return the ModuleFrame identified by key The method will block if there is no ModuleFrame associated with the key.

Parameters:
key - The identifier for the ModuleFrame

find

public boolean find(java.lang.String key)
Return true if there is a mapping to


findChild

public boolean findChild(java.lang.String childKey)
Return true if there is a moduleframe which has a module of key childkey

Parameters:
childKey - The identifier of a module

delete

public void delete(ModuleFrame frame)
Remove all references to the ModuleFrame

Parameters:
frame - The ModuleFrame to delete

getFrameOfType

public ModuleFrame getFrameOfType(java.lang.String type)
Return true if there is a frame of a certain type in the register.


Venice 0.751beta