com.sapportals.htmlb

Class GridLayout

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.Container
          extended bycom.sapportals.htmlb.GridLayout

public class GridLayout
extends Container

Title: GridLayout Description: GridLayout defines a grid

Copyright 2004 SAP AG


Field Summary
static int GRID_BEGIN
           
static int GRID_CELL_BEGIN
           
static int GRID_CELL_CONTENT
           
static int GRID_CELL_END
           
static int GRID_END
           
static int GRID_ROW_BEGIN
           
static int GRID_ROW_END
           
static String UI_ID
           
 
Fields inherited from class com.sapportals.htmlb.Container
elements
 
Constructor Summary
GridLayout()
           
GridLayout(int rowSize, int columnSize)
          Constrcutor for a GridLayout object.
 
Method Summary
 void addCell(int rowIndex, int columnIndex, GridLayoutCell cell)
          Add a cell at the specified position in the grid.
 void addColSpanComponent(int rowIndex, int columnIndex, Component component, int colSpan)
          Add a component at the specified position in the grid.
 void addColSpanText(int rowIndex, int columnIndex, String text, int colSpan)
          Add a simple text at the specified position in the grid.
 void addComponent(int rowIndex, int columnIndex, Component component)
          Add a component at the specified position in the grid.
 void addText(int rowIndex, int columnIndex, String text)
          Add a simple text at the specified position in the grid.
 GridLayoutCell getCell(int rowIndex, int columnIndex)
          Return the cell at the specified grid position or NULL if the postition is invalid.
 int getCellPadding()
          Return the used cell padding of the grid.
 Object[][] getCells()
          Return a array of all cells defined in the grid.
 int getCellSpacing()
          Return the used cell spacing for the grid.
 int getColumnSize()
          Return the column size of the grid.
 int getCurrentColumnIndex()
          returns the current column index Note: internal use only.
 int getCurrentRowIndex()
          returns the current row index Note: internal use only.
 String getHeight()
          Return the used height of the grid.
 int getHeightPercentage()
          Return the used height of the grid.
 int getRowSize()
          Return the row size of the grid.
 String getUI()
          Return the UI key of the GridLayout component.
 String getWidth()
          Return the used width of the grid.
 boolean hasDebugMode()
          Return TRUE if the grid shoud be displayed in "debug mode".
 boolean isFixedLayout()
          Returns the fixedLayout attribute
 boolean isNN4Optimized()
          Deprecated. method not released ye
 Iterator iterator()
          Return an iterator of the grid cells
 boolean requiresForm()
          A GridLayout does not require an outer Form
 void setCellPadding(int cellPadding)
          Set the used cell padding for the grid.
 void setCellSpacing(int cellSpacing)
          Set the used cell spacing for the grid.
 void setColumnSize(int columnSize)
          Set the column size of the grid.
 void setCurrentColumnIndex(int currentColumnIndex)
          sets the current column index Note: Internal use only.
 void setCurrentRowIndex(int currentRowIndex)
          sets the current row index Note: internal use only.
 void setDebugMode(boolean debugMode)
          Set whether the grid should be displayed in "debug mode" (i.e. with border="1") or not (border="0").
 void setFixedLayout(boolean fixedLayout)
          Sets the fixedLayout attribute on the table
 void setHeightPercentage(int height)
          Set the used height of the grid.
 void setNN4Optimized(boolean NN4Optimized)
          Deprecated. method not released ye
 void setRowSize(int rowSize)
          Set the row size of the grid.
 void setWidth(String width)
          Set the used width of the grid.
 
Methods inherited from class com.sapportals.htmlb.Container
addComponent, addRawText, addText, getChildCount, preRender, removeComponent, render
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, render, renderAsString, setId, setJsObjectNeeded, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UI_ID

public static final String UI_ID
See Also:
Constant Field Values

GRID_BEGIN

public static final int GRID_BEGIN
See Also:
Constant Field Values

GRID_END

public static final int GRID_END
See Also:
Constant Field Values

GRID_ROW_BEGIN

public static final int GRID_ROW_BEGIN
See Also:
Constant Field Values

GRID_ROW_END

public static final int GRID_ROW_END
See Also:
Constant Field Values

GRID_CELL_BEGIN

public static final int GRID_CELL_BEGIN
See Also:
Constant Field Values

GRID_CELL_END

public static final int GRID_CELL_END
See Also:
Constant Field Values

GRID_CELL_CONTENT

public static final int GRID_CELL_CONTENT
See Also:
Constant Field Values
Constructor Detail

GridLayout

public GridLayout()

GridLayout

public GridLayout(int rowSize,
                  int columnSize)
Constrcutor for a GridLayout object.

Parameters:
rowSize - the row size of the grid
columnSize - the column size of the grid
Method Detail

setRowSize

public void setRowSize(int rowSize)
Set the row size of the grid.

Parameters:
rowSize - the row size of the grid

getRowSize

public int getRowSize()
Return the row size of the grid.

Returns:
the row size of the grid

setColumnSize

public void setColumnSize(int columnSize)
Set the column size of the grid.

Parameters:
columnSize - the column size of the grid

getColumnSize

public int getColumnSize()
Return the column size of the grid.

Returns:
the column size of the grid

addComponent

public void addComponent(int rowIndex,
                         int columnIndex,
                         Component component)
Add a component at the specified position in the grid.

Parameters:
rowIndex - the row position of the new component
columnIndex - the column position of the new component
component - the component, which should be added to the grid

addColSpanComponent

public void addColSpanComponent(int rowIndex,
                                int columnIndex,
                                Component component,
                                int colSpan)
Add a component at the specified position in the grid. You can define a colum span for the grid cell, which should contain the component additionally.

Parameters:
rowIndex - the row position of the new component
columnIndex - the column position of the new component
component - the component, which should be added to the grid
colSpan - the needed colum span of the component cell

addText

public void addText(int rowIndex,
                    int columnIndex,
                    String text)
Add a simple text at the specified position in the grid.

Parameters:
rowIndex - the row position of the new text
columnIndex - the column position of the new text
text - the text, which should be added to the grid

addColSpanText

public void addColSpanText(int rowIndex,
                           int columnIndex,
                           String text,
                           int colSpan)
Add a simple text at the specified position in the grid. You can define a colum span for the grid cell, which should contain the text additionally.

Parameters:
rowIndex - the row position of the new text
columnIndex - the column position of the new text
text - the text, which should be added to the grid
colSpan - the needed colum span of the text cell

addCell

public void addCell(int rowIndex,
                    int columnIndex,
                    GridLayoutCell cell)
Add a cell at the specified position in the grid.

Parameters:
rowIndex - the row position of the new cell
columnIndex - the column position of the new cell
cell - the cell, which should be added to the grid

setCellSpacing

public void setCellSpacing(int cellSpacing)
Set the used cell spacing for the grid.

Parameters:
cellSpacing - the used cell spacing

getCellSpacing

public int getCellSpacing()
Return the used cell spacing for the grid.

Returns:
the used cell spacing

setCellPadding

public void setCellPadding(int cellPadding)
Set the used cell padding for the grid.

Parameters:
cellPadding - the used cell padding for the grid

getCellPadding

public int getCellPadding()
Return the used cell padding of the grid.

Returns:
the used cell padding

setWidth

public void setWidth(String width)
Set the used width of the grid. You could use any HTML-like definitions (like "100%").

Parameters:
width - the used width of the grid

getWidth

public String getWidth()
Return the used width of the grid.

Returns:
the used width of the grid

setHeightPercentage

public void setHeightPercentage(int height)
Set the used height of the grid. You could use percentage values

Parameters:
height - the used height of the grid

getHeightPercentage

public int getHeightPercentage()
Return the used height of the grid.

Returns:
the used width of the grid

getHeight

public String getHeight()
Return the used height of the grid.

Returns:
the used width of the grid

getUI

public String getUI()
Return the UI key of the GridLayout component. This UI key MUST be unique within all defined HTMLB components.

Specified by:
getUI in class Component
Returns:
the UI key

setDebugMode

public void setDebugMode(boolean debugMode)
Set whether the grid should be displayed in "debug mode" (i.e. with border="1") or not (border="0").

Parameters:
debugMode - TRUE if the grid should be displayed in "debug mode"

hasDebugMode

public boolean hasDebugMode()
Return TRUE if the grid shoud be displayed in "debug mode".

Returns:
TRUE if the grid should be displayed in "debug mode"

getCell

public GridLayoutCell getCell(int rowIndex,
                              int columnIndex)
Return the cell at the specified grid position or NULL if the postition is invalid.

Parameters:
rowIndex - the row position of the requested cell
columnIndex - the column position of the requested cell

getCells

public Object[][] getCells()
Return a array of all cells defined in the grid.

Returns:
the array of all cells defined in the grid

iterator

public Iterator iterator()
Return an iterator of the grid cells

Overrides:
iterator in class Container
Returns:
an iterator of the grid cells

requiresForm

public boolean requiresForm()
A GridLayout does not require an outer Form

Overrides:
requiresForm in class Component
Returns:
true if the component must be placed in a form.

setNN4Optimized

public void setNN4Optimized(boolean NN4Optimized)
Deprecated. method not released ye

This method is not released yet


isNN4Optimized

public boolean isNN4Optimized()
Deprecated. method not released ye

This method is not released yet


getCurrentRowIndex

public int getCurrentRowIndex()
returns the current row index Note: internal use only. Used by the class DefaultGridLayoutRenderer during rendering


setCurrentRowIndex

public void setCurrentRowIndex(int currentRowIndex)
sets the current row index Note: internal use only. Used by the class DefaultGridLayoutRenderer during rendering


getCurrentColumnIndex

public int getCurrentColumnIndex()
returns the current column index Note: internal use only. Used by the class DefaultGridLayoutRenderer during rendering


setCurrentColumnIndex

public void setCurrentColumnIndex(int currentColumnIndex)
sets the current column index Note: Internal use only. Used by the class DefaultGridLayoutRenderer during rendering


isFixedLayout

public boolean isFixedLayout()
Returns the fixedLayout attribute

Returns:

setFixedLayout

public void setFixedLayout(boolean fixedLayout)
Sets the fixedLayout attribute on the table

Parameters:
fixedLayout -


Copyright 2006 SAP AG Complete Copyright Notice