com.sapportals.htmlb

Class GridLayoutCell

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.GridLayoutCell

public class GridLayoutCell
extends Component

Title: GridLayoutCell Description: GridLayoutCell defines a cell of a grid

Copyright 2004 SAP AG


Field Summary
static String UI_ID
           
 
Constructor Summary
GridLayoutCell(Component component)
          Constructor for a GridLayoutCell object.
GridLayoutCell(Component component, int colSpan)
          Constructor for a GridLayoutCell object.
GridLayoutCell(String text)
          Constructor for a GridLayoutCell object.
GridLayoutCell(String text, int colSpan)
          Constructor for a GridLayoutCell object.
 
Method Summary
 GridCellBackgroundDesign getCellBackgroundDesign()
          Return the design, which should be used to display the cell.
 int getColSpan()
          Return the used column span for the cell.
 Object getContent()
          Return the content of the cell (i.e. a component of a simple text).
 CellHAlign getHAlignment()
          Return the horizontal aligment, which should be used to display the cell.
 String getHeight()
          Return the used height of the cell.
 int getHeightPercentage()
          Return the used height of the cell.
 String getStyle()
          Return the style, which should be used to display the cell.
 String getUI()
          get a identification String for the renderer that is unique across all supported components.
 CellVAlign getVAlignment()
          Return the vertical aligment, which should be used to display the cell.
 String getWidth()
          Return the width of the cell.
 boolean requiresForm()
          check if a special component really requires a form around it.
 void setCellBackgroundDesign(GridCellBackgroundDesign design)
          Set the design, which should be used to display the cell.
 void setColSpan(int colSpan)
          Set the used column span for the cell.
 void setContent(Component component)
          Set the component, which sould be displayed in the cell.
 void setContent(String text)
          Set the text, which sould be displayed in the cell.
 void setHAlignment(CellHAlign align)
          Set the horizontal aligment, which should be used to display the cell.
 void setHeightPercentage(int height)
          Set the used height of the cell.
 void setStyle(String style)
          Set the style, which should be used to display the cell.
 void setVAlignment(CellVAlign valign)
          Set the vertical aligment, which should be used to display the cell.
 void setWidth(String width)
          Set the width of the cell.
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, preRender, 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
Constructor Detail

GridLayoutCell

public GridLayoutCell(Component component)
Constructor for a GridLayoutCell object.

Parameters:
component - the component, which should be displayed in the cell

GridLayoutCell

public GridLayoutCell(String text)
Constructor for a GridLayoutCell object.

Parameters:
text - the text, which should be displayed in the cell

GridLayoutCell

public GridLayoutCell(Component component,
                      int colSpan)
Constructor for a GridLayoutCell object.

Parameters:
component - the component, which should be displayed in the cell
colSpan - the used column span for the cell

GridLayoutCell

public GridLayoutCell(String text,
                      int colSpan)
Constructor for a GridLayoutCell object.

Parameters:
text - the text, which should be displayed in the cell
colSpan - the used column span for the cell
Method Detail

setColSpan

public void setColSpan(int colSpan)
Set the used column span for the cell.

Parameters:
colSpan - the used column span for the cell

getColSpan

public int getColSpan()
Return the used column span for the cell.

Returns:
the used column span for the cell

setWidth

public void setWidth(String width)
Set the width of the cell.

Parameters:
width - the width of the cell

getWidth

public String getWidth()
Return the width of the cell.

Returns:
the width of the cell

setHeightPercentage

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

Parameters:
height - the used height of the cell

getHeightPercentage

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

Returns:
the used width of the cell

getHeight

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

Returns:
the used width of the cell

getContent

public Object getContent()
Return the content of the cell (i.e. a component of a simple text).

Returns:
the content of the cell

setContent

public void setContent(Component component)
Set the component, which sould be displayed in the cell.

Parameters:
component - the component, which should be displayed in the cell

setContent

public void setContent(String text)
Set the text, which sould be displayed in the cell.

Parameters:
text - the text, which should be displayed in the cell

setStyle

public void setStyle(String style)
Set the style, which should be used to display the cell.

Parameters:
style - the style, which should be used to display the cell

getStyle

public String getStyle()
Return the style, which should be used to display the cell.

Returns:
the style, which should be used to display the cell

setCellBackgroundDesign

public void setCellBackgroundDesign(GridCellBackgroundDesign design)
Set the design, which should be used to display the cell.

Parameters:
design - the design, which should be used to display the cell

getCellBackgroundDesign

public GridCellBackgroundDesign getCellBackgroundDesign()
Return the design, which should be used to display the cell.

Returns:
the design, which should be used to display the cell

setHAlignment

public void setHAlignment(CellHAlign align)
Set the horizontal aligment, which should be used to display the cell.

Parameters:
align - the horizontal alignment, which should be used to display the cell

getHAlignment

public CellHAlign getHAlignment()
Return the horizontal aligment, which should be used to display the cell.

Returns:
the horizontal aligment, which should be used to display the cell

setVAlignment

public void setVAlignment(CellVAlign valign)
Set the vertical aligment, which should be used to display the cell.

Parameters:
valign - the vertical alignment, which should be used to display the cell

getVAlignment

public CellVAlign getVAlignment()
Return the vertical aligment, which should be used to display the cell.

Returns:
the vertical aligment, which should be used to display the cell

requiresForm

public boolean requiresForm()
Description copied from class: Component
check if a special component really requires a form around it. Subclasses should override this if they do not require a form.

Basically, any Component that is capable of firing a server side event or that contains user input must be placed in a form.

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

getUI

public String getUI()
Description copied from class: Component
get a identification String for the renderer that is unique across all supported components. E.g. you could simply return the class name of the component class. The reason for using a separate method and not some internal reflection method is that you can more easily extend the functionality or your Component class without having to rewrite the view class.

Specified by:
getUI in class Component
Returns:
a unique identification string for this Component


Copyright 2006 SAP AG Complete Copyright Notice