EchoPoint
1.0

echopoint.layout
Class AbstractLayoutManager

java.lang.Object
  extended byechopoint.layout.AbstractLayoutManager
All Implemented Interfaces:
LayoutManager, java.io.Serializable
Direct Known Subclasses:
BrowserLayoutManager, GridLayoutManager, HorizontalLayoutManager, HtmlTemplateLayoutManager, JspTemplateLayoutManager, XyLayoutManager

public class AbstractLayoutManager
extends java.lang.Object
implements LayoutManager, java.io.Serializable

The AbstractLayoutManager class defines the base functionality required in a LayoutManager. This class contains a HashMap of Components and constraints, as well as some helper functions to aid layout.

See Also:
Serialized Form

Field Summary
protected  java.util.HashMap componentMap
          the map of components to constaints, where the Component is the key.
protected  java.lang.ref.WeakReference layoutManageableWR
          The LayoutManagerable associated with this LayoutManager
 
Constructor Summary
AbstractLayoutManager()
          AbstractLayoutManager constructor.
 
Method Summary
 void addLayoutComponent(nextapp.echo.Component comp, java.lang.Object constraints)
          Adds a component to the LayoutManager with the specified contraints object.
 nextapp.echo.Component getComponent(java.lang.Object constraints)
          Returns the Component associated with the contraints object or null if there is no association.
 java.util.Map getComponentMap()
          returns a map of the constraint/component.
 java.lang.Object getContraints(nextapp.echo.Component comp)
          Returns the contraints object associated to the given component or null if there is no association.
 LayoutManageable getLayoutManageable()
          This lifecycle method is called to retrieve the LayoutManageable component that is currently associated with this LayoutManager.
 void invalidateLayout(nextapp.echo.Component targetComp)
          Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
 void removeLayoutComponent(nextapp.echo.Component comp)
          Removes a component from the LayoutManager.
 void setLayoutManageable(LayoutManageable layoutManageable)
          This lifecycle method is called to inform the LayoutManager if its associated LayoutManageable component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

componentMap

protected java.util.HashMap componentMap
the map of components to constaints, where the Component is the key.


layoutManageableWR

protected transient java.lang.ref.WeakReference layoutManageableWR
The LayoutManagerable associated with this LayoutManager

Constructor Detail

AbstractLayoutManager

public AbstractLayoutManager()
AbstractLayoutManager constructor.

Method Detail

addLayoutComponent

public void addLayoutComponent(nextapp.echo.Component comp,
                               java.lang.Object constraints)
Adds a component to the LayoutManager with the specified contraints object. This method is called by the containing component when a new child component is added, with a contraints.

This method is not intended to be called by any other than an LayoutManageable during Component add().

The contraints object is allowed to be null.

Specified by:
addLayoutComponent in interface LayoutManager

getComponent

public nextapp.echo.Component getComponent(java.lang.Object constraints)
Returns the Component associated with the contraints object or null if there is no association.

Specified by:
getComponent in interface LayoutManager

getComponentMap

public java.util.Map getComponentMap()
returns a map of the constraint/component.


getContraints

public java.lang.Object getContraints(nextapp.echo.Component comp)
Returns the contraints object associated to the given component or null if there is no association.

Specified by:
getContraints in interface LayoutManager

getLayoutManageable

public LayoutManageable getLayoutManageable()
This lifecycle method is called to retrieve the LayoutManageable component that is currently associated with this LayoutManager. The LayoutManager is expected retrive the association that was previously set with setLayoutManageable or null.

Specified by:
getLayoutManageable in interface LayoutManager

invalidateLayout

public void invalidateLayout(nextapp.echo.Component targetComp)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.

Specified by:
invalidateLayout in interface LayoutManager

removeLayoutComponent

public void removeLayoutComponent(nextapp.echo.Component comp)
Removes a component from the LayoutManager. This method is called by the containing component when a child component is to be removed.

This method is not intended to be called by any other than an LayoutManageable during Component add().

Specified by:
removeLayoutComponent in interface LayoutManager

setLayoutManageable

public void setLayoutManageable(LayoutManageable layoutManageable)
This lifecycle method is called to inform the LayoutManager if its associated LayoutManageable component. The LayoutManager is expected hold this association and return it should getLayoutManageable() be called.

Specified by:
setLayoutManageable in interface LayoutManager

EchoPoint
1.0