EchoPoint
1.0

echopoint.ui.layout
Class LayoutManagerPeerFactory

java.lang.Object
  extended byechopoint.ui.layout.LayoutManagerPeerFactory
All Implemented Interfaces:
java.io.Serializable

public final class LayoutManagerPeerFactory
extends java.lang.Object
implements java.io.Serializable

Creates LayoutManagerPeer objects for LayoutManagers.

This class now has an automatic layout manager peer discover mechanism. To add new layout manager to peer associations, simply put a properties file in a folder called

See Also:
Serialized Form

Field Summary
static java.lang.String PEER_DISCOVERY_NAME
           
 
Method Summary
static void addAssociation(java.lang.String layoutManagerName, java.lang.String layoutManagerPeerName)
          Adds additional LayoutManager-to-LayoutManagerPeer associations for a specific layout manager and layout manager peer.
static void addAssociations(java.lang.String propertiesFile)
          Adds additional LayoutManager-to-LayoutManagerPeer associations.
static LayoutManagerPeer createLayoutManagerPeer(LayoutManager l)
          Returns a new peer for the specified LayoutManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PEER_DISCOVERY_NAME

public static final java.lang.String PEER_DISCOVERY_NAME
See Also:
Constant Field Values
Method Detail

addAssociations

public static void addAssociations(java.lang.String propertiesFile)
Adds additional LayoutManager-to-LayoutManagerPeer associations.

Parameters:
propertiesFile - The name of a properties file containing additional associations.

addAssociation

public static void addAssociation(java.lang.String layoutManagerName,
                                  java.lang.String layoutManagerPeerName)
Adds additional LayoutManager-to-LayoutManagerPeer associations for a specific layout manager and layout manager peer.

Parameters:
layoutManagerName - the name of the layout manager class
layoutManagerPeerName - the name of the layout peer class

createLayoutManagerPeer

public static LayoutManagerPeer createLayoutManagerPeer(LayoutManager l)
Returns a new peer for the specified LayoutManager. The peer must be registered before it may be used. If a peer hsa been previously registered for the specific layout manager, then it will be returned. WeakReferences are used to keep these layout manager to peer associations and hence the associations may need to be re-created at any time.

Parameters:
l - The LayoutManager for which a peer is to be created.
Returns:
A LayoutManagerPeer bound to the specified LayoutManager.

EchoPoint
1.0