com.cc.framework.ui.painter.html
Class HtmlCheckboxGroupPainter

java.lang.Object
  extended bycom.cc.framework.ui.painter.ControlPainter
      extended bycom.cc.framework.ui.painter.html.HtmlPainterBase
          extended bycom.cc.framework.ui.painter.html.HtmlCheckboxGroupPainter
Direct Known Subclasses:
HtmlRadioGroupPainter

public class HtmlCheckboxGroupPainter
extends HtmlPainterBase

Painter for the Select Control

Since:
1.0
Version:
$Revision: 1.14 $
Author:
Gernot Schulz

Field Summary
private static int WIDTH_DECORATION
           
 
Fields inherited from class com.cc.framework.ui.painter.ControlPainter
log
 
Constructor Summary
HtmlCheckboxGroupPainter(PainterContext painterContext, CheckboxGroupControl ctrl)
          Constructor for HtmlSelectPainter
 
Method Summary
protected  OptionsIterator createIterator()
          Creates an option iterator
protected  OptionsComparator createOptionsComparator()
          Creates the comparator that is used to determine if a item of the group is checked
protected  org.apache.ecs.ConcreteElement doCreateColGroup(int columns, int decorations)
          Creates the HTML colgroup Element for the list
protected  org.apache.ecs.ConcreteElement doCreateElement()
          Creates the HTML-Element.
protected  org.apache.ecs.ConcreteElement doCreateGrid()
          Creates the pure select control without images
protected  org.apache.ecs.ConcreteElement doCreateItem(java.lang.Object itemKey, java.lang.Object itemLabel, java.lang.Object itemTooltip, ImageModel itemImage, boolean checked, boolean disabled)
          Creates a single item of the group
protected  CheckboxGroupControl getCtrl()
          Retrieves the control for this painter
protected  java.lang.String getType()
           
protected  java.lang.Object[] getValues()
          Retrieves the value for the text control
protected  boolean showImages()
          Retruns true when this select control shoud show images for it's option elements
 
Methods inherited from class com.cc.framework.ui.painter.ControlPainter
ajaxPaint, attr, attr, attr, beginPaint, createActionPainter, createActionPainter, createElement, createImage, createImage, createImage, createInput, createInput, createSpacer, createSpacer, createSpacer, decorateURL, doAddDecorationsToRow, doAddDecorationsToRow, doAfterCreate, doAttachDecorations, doBeforeCreate, encodeURL, endPaint, forceControlName, getAsString, getAwtColor, getColor, getContextPath, getControlName, getDecorationsOnce, getElementClass, getElementName, getFramePainter, getFrameworkString, getFrameworkString, getImage, getImage, getImage, getImageSrc, getImageSrc, getImageSrc, getLocale, getPageContext, getPainterContext, getPrincipal, getRequest, getResponse, getSession, getSmartCaption, getSmartDetail, getSource, getSource, getStringResource, getStyleId, html, html, html, init, isRunAtClient, localize, localize, localize, paint, removeHtml, removeHtml, request, response, session, showComments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIDTH_DECORATION

private static final int WIDTH_DECORATION
See Also:
Constant Field Values
Constructor Detail

HtmlCheckboxGroupPainter

public HtmlCheckboxGroupPainter(PainterContext painterContext,
                                CheckboxGroupControl ctrl)
Constructor for HtmlSelectPainter

Parameters:
painterContext - The PainterContext
ctrl - The Control to render
Method Detail

getType

protected java.lang.String getType()
Returns:
returns the type of input element to create

getCtrl

protected CheckboxGroupControl getCtrl()
Retrieves the control for this painter

Returns:
Control

showImages

protected boolean showImages()
Retruns true when this select control shoud show images for it's option elements

Returns:
boolean

createIterator

protected OptionsIterator createIterator()
Creates an option iterator

Returns:
Iterator

doCreateItem

protected org.apache.ecs.ConcreteElement doCreateItem(java.lang.Object itemKey,
                                                      java.lang.Object itemLabel,
                                                      java.lang.Object itemTooltip,
                                                      ImageModel itemImage,
                                                      boolean checked,
                                                      boolean disabled)
Creates a single item of the group

Parameters:
itemKey - the items key
itemLabel - the label
itemTooltip - optional tooltip
itemImage - optional image
checked - when true the item is checked
disabled - when true the item is disabled
Returns:
html element

doCreateColGroup

protected org.apache.ecs.ConcreteElement doCreateColGroup(int columns,
                                                          int decorations)
Creates the HTML colgroup Element for the list

Parameters:
columns - The column painters
Returns:
ConcreteElement

createOptionsComparator

protected OptionsComparator createOptionsComparator()
Creates the comparator that is used to determine if a item of the group is checked

Returns:
comparator

doCreateGrid

protected org.apache.ecs.ConcreteElement doCreateGrid()
Creates the pure select control without images

Returns:
Select Control element

doCreateElement

protected org.apache.ecs.ConcreteElement doCreateElement()
Description copied from class: ControlPainter
Creates the HTML-Element. This Method must be implemented by the concrete Sub-Class

Specified by:
doCreateElement in class ControlPainter
Returns:
ConcreteElement
See Also:
ControlPainter.doCreateElement()

getValues

protected java.lang.Object[] getValues()
Retrieves the value for the text control

Returns:
value


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.