com.iplanet.jato.view
Interface TiledView

All Superinterfaces:
ContainerView, View
All Known Implementing Classes:
TiledViewBase

public interface TiledView
extends ContainerView

A tiled view is a type of container view that displays tiles, or repeated sets, of its child views. TiledViews are commonly used to display tables of data, though there is no specific layout implied by this interface. Tiled views typically maintain a current tile position, which is used to implicitly qualify those ContainerView methods that do not take tile position infomation. Tiled views that do not support a current position may handle such invocations as they see fit.

Version:
JATO/1.2.2 $Id: TiledView.java,v 1.7 2002/03/16 03:26:41 todd Exp $

Fields inherited from interface com.iplanet.jato.view.View
QUALIFIED_VIEW_NAME_SEPARATOR
 
Method Summary
 View getChild(java.lang.String name, int tile)
          Returns the named child in the specified tile.
 int getMaxDisplayTiles()
          Returns the maximum number of tiles this view can contain.
 int getNumTiles()
          Returns the current number of tiles in this view.
 int getTileIndex()
          Returns the index of the current tile.
 boolean nextTile()
          Moves the current tile position to the next available tile.
 void resetTileIndex()
          Sets the current tile position to the default position (normally, to the first tile).
 void setMaxDisplayTiles(int value)
          Sets the maximum number of tiles this view can contain.
 void setTileIndex(int value)
          Sets the index of the current tile.
 
Methods inherited from interface com.iplanet.jato.view.ContainerView
beginChildDisplay, beginDisplay, endChildDisplay, endDisplay, getChild, getChildNames, getChildType, getDefaultModel, getDisplayField, getDisplayFieldValue, getNumChildren, mapRequestParameters, resetChildren, setDisplayFieldValue
 
Methods inherited from interface com.iplanet.jato.view.View
getName, getParent, getQualifiedName, setParent
 

Method Detail

getChild

public View getChild(java.lang.String name,
                     int tile)
              throws ModelControlException
Returns the named child in the specified tile. Implementations are free to allocate child views for each tile or virtualize tile access through a single child view--users of the tiled view should not generally concern themselves with such details. This also means that users of tiled views should in general not cache references to child views.
Parameters:
name - The logical, non-qualified name of the child view
tile - The tile number from which to retrieve the child view
Returns:
The child specified by name and tile, or null if the child does not exist. Instead, this method may throw an IllegalArgumentException if the child or tile parameter does not contain a legal value.
Throws:
ModelControlException - Thrown if manipulation of a model fails during this operation

getNumTiles

public int getNumTiles()
Returns the current number of tiles in this view. This number may change over time as tiles are added or removed from this view (such functionality is implementation-dependent). This value should always be less than or equal to the value reported by getMaxDisplayTiles().
Returns:
The current number of tiles

getTileIndex

public int getTileIndex()
                 throws ModelControlException
Returns the index of the current tile. This position is maintained by the container view and can be changed in an implementation-dependent way.
Returns:
The current tile index
Throws:
ModelControlException - Thrown if manipulation of a model fails during this operation

setTileIndex

public void setTileIndex(int value)
                  throws ModelControlException
Sets the index of the current tile. This position is maintained by the container view. Not all views support this operation.
Parameters:
value - The new tile index
Throws:
ModelControlException - Thrown if manipulation of a model fails during this operation

resetTileIndex

public void resetTileIndex()
                    throws ModelControlException
Sets the current tile position to the default position (normally, to the first tile).
Throws:
ModelControlException - Thrown if manipulation of a model fails during this operation

getMaxDisplayTiles

public int getMaxDisplayTiles()
Returns the maximum number of tiles this view can contain. This number may be fixed or variable depending on the implementation. This number should always be larger than or equal to the value reported by getNumTiles().
Returns:
The max number of possible tiles for this view

setMaxDisplayTiles

public void setMaxDisplayTiles(int value)
Sets the maximum number of tiles this view can contain. This number should always be larger than or equal to the value reported by getNumTiles(). Not all views support this operation. The behavior of the view if the current tile position is greater than the supplied max tile value is implementation dependent.
Parameters:
value - The max number of possible tiles for this view

nextTile

public boolean nextTile()
                 throws ModelControlException
Moves the current tile position to the next available tile. Operations on child views after calling this method should reflect the new position.
Returns:
True if another tile was available, false if the position remained unchanged because no next tile was available.
Throws:
ModelControlException - Thrown if manipulation of a model fails during this operation