com.plumtree.portaluiinfrastructure.tags.displaytree
Class CompositeDisplayElement

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement
All Implemented Interfaces:
IDisplayElement

public class CompositeDisplayElement
extends java.lang.Object
implements IDisplayElement

This class contains multiple Display Elements. This is a framework only class and should not be used by external developers.

Author:
donh

Field Summary
protected  XPArrayList m_DisplayElements
          The child display elements of this element.
protected  CompositeDisplayElement m_ParentContainer
          The container that this element is stored in.
protected  TagDisplayElement m_ParentTag
          The immediate parent tag of this element.
 
Constructor Summary
CompositeDisplayElement(TagDisplayElement _parentTag, CompositeDisplayElement _parentContainer)
          Constructor for CompositeDisplayElement.
 
Method Summary
 void AddChildElement(IDisplayElement _child)
          Add a child display element to this container.
 HTMLElement Display(TagVisitor _tagVisitor)
          Displays this element and it's child elements and returns the result.
 XPArrayList GetDisplayElements()
          Returns the unprocessed display elements Only used for Tag definitions.
 CompositeDisplayElement GetParentContainer()
          Get the parent container of this container.
 TagDisplayElement GetParentTag()
          Get the parent tag of this container.
 boolean HasChildElements(ITagMetaData[] _childTags, java.lang.Object[] _results, TagLibraryMetaData _library, int _nCurrentDepth)
          This method searches for child tags of the current tag and fills in the results array with an Object if the tag has been found.
 int HasParentElement(ITagMetaData _parentTag, TagLibraryMetaData _library)
          This method searches for a parent tag of the current tag.
 void Release()
          This method is called to release any data that needs special handling before being allowed to go out of scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_DisplayElements

protected XPArrayList m_DisplayElements
The child display elements of this element.


m_ParentTag

protected TagDisplayElement m_ParentTag
The immediate parent tag of this element.


m_ParentContainer

protected CompositeDisplayElement m_ParentContainer
The container that this element is stored in. This may be an internal child container of the parent tag element.

Constructor Detail

CompositeDisplayElement

public CompositeDisplayElement(TagDisplayElement _parentTag,
                               CompositeDisplayElement _parentContainer)
Constructor for CompositeDisplayElement. This should only be called by the tag framework.

Parameters:
_parentTag - The immediate parent tag of this element.
_parentContainer - The container that this element is stored in. This may be an internal child container of the parent tag element.
Method Detail

Display

public HTMLElement Display(TagVisitor _tagVisitor)
Description copied from interface: IDisplayElement
Displays this element and it's child elements and returns the result.

Specified by:
Display in interface IDisplayElement
Returns:
HTMLElement The result of displaying this element
See Also:
IDisplayElement.Display(TagVisitor)

Release

public void Release()
Description copied from interface: IDisplayElement
This method is called to release any data that needs special handling before being allowed to go out of scope.

Specified by:
Release in interface IDisplayElement
See Also:
IDisplayElement.Release()

AddChildElement

public void AddChildElement(IDisplayElement _child)
Add a child display element to this container.

Parameters:
IDisplayElement - _child The child to add

GetParentTag

public TagDisplayElement GetParentTag()
Get the parent tag of this container. The parent tag is the next TagDisplayElement above this element in the display tree.

Returns:
CompositeDisplayElement The parent tag.

GetParentContainer

public CompositeDisplayElement GetParentContainer()
Get the parent container of this container. The parent container is the next CompositeDisplayElement above this element in the display tree, not the next element (which will often be a TagDisplayElement), but rather the composite element above that one.

Returns:
CompositeDisplayElement The parent container.

GetDisplayElements

public XPArrayList GetDisplayElements()
Returns the unprocessed display elements Only used for Tag definitions.

Returns:

HasChildElements

public boolean HasChildElements(ITagMetaData[] _childTags,
                                java.lang.Object[] _results,
                                TagLibraryMetaData _library,
                                int _nCurrentDepth)
Description copied from interface: IDisplayElement
This method searches for child tags of the current tag and fills in the results array with an Object if the tag has been found. This method will not work if _results is not an array of null objects of the same length as _childTags.

Specified by:
HasChildElements in interface IDisplayElement
Parameters:
_childTags - An array of ITagMetaData objects for each child tag to search for.
_results - An array of null Objects. On execution, when a child tag is found, the location in the _results array that corresponds to the location of the tag in the _ChildTags array will be filled in with an Integer containing the positive depth of the child tag.
_library - The Tag Library of the tags to look for.
_nCurrentDepth - The depth of the current tag.
Returns:
boolean implies that all of the Child Tags have been found.
See Also:
IDisplayElement.HasChildElements(ITagMetaData[], Object[], TagLibraryMetaData, int)

HasParentElement

public int HasParentElement(ITagMetaData _parentTag,
                            TagLibraryMetaData _library)
Description copied from interface: IDisplayElement
This method searches for a parent tag of the current tag.

Specified by:
HasParentElement in interface IDisplayElement
_library - The Tag Library of the tag to look for.
Returns:
int 0 implies the parent tag was not found and a positive integer implies that the parent tag was found n levels above the current tag.
See Also:
IDisplayElement.HasParentElement(ITagMetaData, TagLibraryMetaData)



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.