SilverStream
Application Server 3.5

com.sssw.shr.page
Class AgpContainer

java.lang.Object
 |
 +--com.sssw.shr.page.AgpTag
       |
       +--com.sssw.shr.page.AgpControlBase
             |
             +--com.sssw.shr.page.AgpBlock
                   |
                   +--com.sssw.shr.page.AgpContainer
All Implemented Interfaces:
AgiJavaScriptEnhanced, AgiPageControl, Cloneable, Externalizable, Serializable
Direct Known Subclasses:
AgpLayoutPanel, AgpTable, AgpTabPanel, AgpViewPanel

public class AgpContainer
extends AgpBlock

AgpContainer implements AgiPageContainer and serves as the base classes for the specific container classes, AgpTable, AgpViewPanel, AgpLayoutPanel and AgpTabPanel.

See Also:
Serialized Form

Fields inherited from class com.sssw.shr.page.AgpTag
UNIT_PERCENT, UNIT_PIXEL
 
Constructor Summary
AgpContainer()
           
 
Method Summary
 AgpBlock getBlock(int groupid, int index)
          Returns the cell in the specified row and column.
 int getBlockCount(int groupid)
          Returns the number of cells in the specified row.
 Vector getGroup(int groupid)
          Returns a vector containing all the blocks in the specified row.
 int getGroupCount()
          Returns the number of rows.
 
Methods inherited from class com.sssw.shr.page.AgpBlock
getControls
 
Methods inherited from class com.sssw.shr.page.AgpControlBase
getName
 
Methods inherited from class com.sssw.shr.page.AgpTag
getBoolProperty, getEnableHTMLGeneration, getIntArrayProperty, getIntProperty, getIntPropertyUnit, getProperty, getStringArrayProperty, invalidateHTML, removeProperty, setEnableHTMLGeneration, setIntProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods implemented from interface com.sssw.shr.page.AgiJavaScriptEnhanced
generateFunction, generateRepaintScript, generateScriptInitializers, getFunctionNameForMethod, getFunctionNames, getMethodNames, getScriptObjectName, isHTMLRepaintPending, isJavaScriptRepaintPending
 
Methods implemented from interface com.sssw.shr.page.AgiPageControl
generateHTML, getPrefix, notifyPageLoaded, notifyPageRequestBegin, notifyPageRequestEnd, notifyPostValue, notifyPostValues
 
Methods implemented from interface java.io.Externalizable
readExternal, writeExternal
 

Constructor Detail

AgpContainer

public AgpContainer()
Method Detail

getGroupCount

public int getGroupCount()
Returns the number of rows.
Usage:

Refer to getBlock for an example.

See Also:
AgpContainer.getBlockCount(int groupid)

getGroup

public Vector getGroup(int groupid)
Returns a vector containing all the blocks in the specified row.
Parameters:
groupid - a zero-based index representing the groupid (row number).
Usage:

The vector should not be modified. Refer to getBlock for an example.

See Also:
AgpContainer.getBlock(int groupid, int index)

getBlockCount

public int getBlockCount(int groupid)
Returns the number of cells in the specified row.
Parameters:
groupid - a zero-based index representing the groupid (row number).
Usage:

Refer to getBlock for an example.

See Also:
AgpContainer.getGroupCount()

getBlock

public AgpBlock getBlock(int groupid,
                         int index)
Returns the cell in the specified row and column.
Parameters:
groupid - a zero-based index representing the groupid (the row number).
int - a zero-based index representing the index (the column number).
Example:

This code fragment goes through all the cells in a container and sets the background color to red.

 	int row, rowcount, col, colcount;
 	AgpTable table = ...
 	rowcount = table.getGroupCount();
 	for (row = 0; row < rowcount; row++)
 	{
 	    colcount = table.getBlockCount(row);
 	    for (col = 0; col < colcount; coll++)
 	    {
 	        AgpBlock block = getBlock(row, col);
 	        if (block != null)
 	        {
 	            // if there are spanning cells, some
 	            // block may be empty. Therefore, it
 	            // is a good idea to test for null.
 	            block.setProperty("BGCOLOR", "RED");
 	        }
 	    }
 	}
 
See Also:
AgpContainer.getGroup(int groupid)

SilverStream
Application Server 3.5