com.sapportals.htmlb

Class CheckboxGroup

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.Container
          extended bycom.sapportals.htmlb.StatefulButtonGroupBase
              extended bycom.sapportals.htmlb.CheckboxGroup

public class CheckboxGroup
extends com.sapportals.htmlb.StatefulButtonGroupBase

Checkboxes grouped together. This is primarily a layout control, i.e. the main purpose of this control is to create a typical layout for a group of checkboxes

Copyright 2004 SAP AG


Field Summary
static String UI_ID
           
static int VAR_BEGIN
           
static int VAR_BEGIN_ITEM
           
static int VAR_END
           
static int VAR_END_ITEM
           
 
Fields inherited from class com.sapportals.htmlb.Container
elements
 
Constructor Summary
CheckboxGroup(String name)
          create new group wih name
 
Method Summary
 Component addComponent(Component component)
          Add a component to this container.
 Component addComponent(Component component, String key)
          add a component to this container.
 Checkbox addItem(String key)
          Add Item without text
 Checkbox addItem(String key, String text)
          Add Item with text to be displayed and according access key.
 String getAccessibilityDescription()
          get the semantical description of the component in it's applicationcontext used by screenreaders
 int getColumnCount()
          Get number of columns.
 StatefulButtonBase getComponentForKey(String key)
          Get inner component with given key.
 int getCurrentItem()
          Get current item.
 String getTextForKey(String key)
          Get Text of inner component with given key.
 String getUI()
          Get String specifier for this component.
 String getWidth()
           
 void remove(String key)
          Remove component by key.
 void setAccessibilityDescription(String accessibilityDescription)
          sets the sematical description for the component in it's applicationcontext used by screenreaders
 void setColumnCount(int columnCount)
          Set number of columns for rendering.
 void setCurrentItem(int currentItem)
          Set current item.
 void setWidth(String width)
           
 
Methods inherited from class com.sapportals.htmlb.Container
addRawText, addText, getChildCount, iterator, preRender, removeComponent, render
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, render, renderAsString, requiresForm, 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

VAR_BEGIN

public static final int VAR_BEGIN
See Also:
Constant Field Values

VAR_END

public static final int VAR_END
See Also:
Constant Field Values

VAR_BEGIN_ITEM

public static final int VAR_BEGIN_ITEM
See Also:
Constant Field Values

VAR_END_ITEM

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

CheckboxGroup

public CheckboxGroup(String name)
create new group wih name

Method Detail

addItem

public Checkbox addItem(String key)
Add Item without text


addItem

public Checkbox addItem(String key,
                        String text)
Add Item with text to be displayed and according access key.


addComponent

public Component addComponent(Component component,
                              String key)
add a component to this container. If component is a Checkbox it will be added unmodified. If it is another Component a new Checkbox will be generated and the given component will be set as element type.

Parameters:
component - the component to add
key - component key

addComponent

public Component addComponent(Component component)
Add a component to this container. It is better use addComponent(Component component, String key). If component is a Checkbox it will be added unmodified. If it is another Component a new Checkbox will be generated and the given component will be set as element type. DONT FORGET TO SET KEY OF Checkbox BEFORE RENDERING!

Overrides:
addComponent in class Container
Parameters:
component - the component to add
Returns:
the added checkbox (WARNING: no key set)
See Also:
addComponent(Component,String)

getUI

public String getUI()
Get String specifier for this component.

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

getWidth

public String getWidth()

setWidth

public void setWidth(String width)

getAccessibilityDescription

public String getAccessibilityDescription()
get the semantical description of the component in it's applicationcontext used by screenreaders

Returns:
description text

setAccessibilityDescription

public void setAccessibilityDescription(String accessibilityDescription)
sets the sematical description for the component in it's applicationcontext used by screenreaders

Parameters:
accessibilityDescription - description text
Returns:

getTextForKey

public String getTextForKey(String key)
Get Text of inner component with given key.

Parameters:
key - String specifying the inner component key

getComponentForKey

public StatefulButtonBase getComponentForKey(String key)
Get inner component with given key.

Parameters:
key - String specifying the inner component key

getColumnCount

public int getColumnCount()
Get number of columns.

Returns:
int specifying number of columns (defaults to 1)

setColumnCount

public void setColumnCount(int columnCount)
Set number of columns for rendering.

Parameters:
columnCount - specify number of columns

remove

public void remove(String key)
Remove component by key.

Parameters:
key - Key of component to remove

getCurrentItem

public int getCurrentItem()
Get current item. ONLY FOR INTERNAL USE IN RENDER CLASSES!

Returns:
current item.

setCurrentItem

public void setCurrentItem(int currentItem)
Set current item. ONLY FOR INTERNAL USE IN RENDER CLASSES!

Parameters:
currentItem - int


Copyright 2006 SAP AG Complete Copyright Notice