org.apache.cocoon.portal.layout.impl
Class CompositeLayoutImpl

java.lang.Object
  extended byorg.apache.cocoon.portal.layout.AbstractParameters
      extended byorg.apache.cocoon.portal.layout.AbstractLayout
          extended byorg.apache.cocoon.portal.layout.impl.CompositeLayoutImpl
All Implemented Interfaces:
Cloneable, CompositeLayout, Layout

public class CompositeLayoutImpl
extends AbstractLayout
implements CompositeLayout

A composite layout is a layout that contains other layouts.

Version:
$Id: CompositeLayoutImpl.java 322471 2005-10-16 13:24:19Z cziegeler $

Field Summary
protected  String itemClassName
          The class name of the items
protected  List items
           
 
Fields inherited from class org.apache.cocoon.portal.layout.AbstractLayout
description, id, name, parent, rendererName, temporaryParameters
 
Fields inherited from class org.apache.cocoon.portal.layout.AbstractParameters
parameters
 
Constructor Summary
CompositeLayoutImpl()
          Constructor
 
Method Summary
 void addItem(int index, Item item)
          Add indexed item to the itemList.
 void addItem(Item item)
          Add Item to the ItemList.
protected  Object clone()
           
 Layout copy()
          Make a copy of this layout object and of all it's children.
 Item createNewItem()
          Create a new item.
 Item getItem(int index)
          Get Item from the ItemList.
 String getItemClassName()
           
 List getItems()
          Get the ItemList.
 int getSize()
          Get size of ItemList.
 void removeItem(Item item)
          Remove an item
 void setItemClassName(String value)
           
 
Methods inherited from class org.apache.cocoon.portal.layout.AbstractLayout
getId, getLayoutRendererName, getName, getParent, getRendererName, getTemporaryParameter, getTemporaryParameters, initialize, setDescription, setId, setLayoutRendererName, setName, setParent, setTemporaryParameter, toString
 
Methods inherited from class org.apache.cocoon.portal.layout.AbstractParameters
addParameter, getCastorParameters, getParameter, getParameters, setParameter
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.portal.layout.Layout
getId, getLayoutRendererName, getName, getParameter, getParameters, getParent, getRendererName, getTemporaryParameter, getTemporaryParameters, initialize, setDescription, setParameter, setParent, setTemporaryParameter
 

Field Detail

items

protected List items

itemClassName

protected String itemClassName
The class name of the items

Constructor Detail

CompositeLayoutImpl

public CompositeLayoutImpl()
Constructor

Method Detail

addItem

public final void addItem(int index,
                          Item item)
Add indexed item to the itemList.

Specified by:
addItem in interface CompositeLayout
Parameters:
index - index for the position inside the list
item - item to add

addItem

public final void addItem(Item item)
Add Item to the ItemList.

Specified by:
addItem in interface CompositeLayout
Parameters:
item - item to add

getItem

public final Item getItem(int index)
Get Item from the ItemList.

Specified by:
getItem in interface CompositeLayout
Parameters:
index -
Returns:
Item

getItems

public final List getItems()
Get the ItemList.

Specified by:
getItems in interface CompositeLayout
Returns:
items

getSize

public final int getSize()
Get size of ItemList.

Specified by:
getSize in interface CompositeLayout
Returns:
size

removeItem

public final void removeItem(Item item)
Description copied from interface: CompositeLayout
Remove an item

Specified by:
removeItem in interface CompositeLayout
Parameters:
item -
See Also:
CompositeLayout.removeItem(org.apache.cocoon.portal.layout.Item)

createNewItem

public Item createNewItem()
Description copied from interface: CompositeLayout
Create a new item. This item is not added to the composite layout

Specified by:
createNewItem in interface CompositeLayout
See Also:
CompositeLayout.createNewItem()

getItemClassName

public String getItemClassName()
Specified by:
getItemClassName in interface CompositeLayout
Returns:
Returns the item class name.

setItemClassName

public void setItemClassName(String value)
Specified by:
setItemClassName in interface CompositeLayout
Parameters:
value - The item class name to set.

clone

protected Object clone()
                throws CloneNotSupportedException
Overrides:
clone in class AbstractLayout
Throws:
CloneNotSupportedException
See Also:
Object.clone()

copy

public Layout copy()
Description copied from interface: Layout
Make a copy of this layout object and of all it's children. This includes copies of items and copletinstancedatas.

Specified by:
copy in interface Layout
Overrides:
copy in class AbstractLayout
See Also:
Layout.copy()


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.