com.smartgwt.client.widgets.form.fields
Class CheckboxItem

java.lang.Object
  extended by com.smartgwt.client.core.JsObject
      extended by com.smartgwt.client.core.DataClass
          extended by com.smartgwt.client.core.RefDataClass
              extended by com.smartgwt.client.widgets.form.fields.FormItem
                  extended by com.smartgwt.client.widgets.form.fields.CheckboxItem
All Implemented Interfaces:
HasHandlers, HasBlurHandlers, HasChangedHandlers, HasChangeHandlers, HasClickHandlers, HasDoubleClickHandlers, HasFocusHandlers, HasIconClickHandlers, HasIconKeyPressHandlers, HasItemHoverHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasTitleHoverHandlers

public class CheckboxItem
extends FormItem

Checkbox form item, implemented with customizeable checkbox images


Field Summary
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
CheckboxItem()
           
CheckboxItem(com.google.gwt.core.client.JavaScriptObject jsObj)
           
CheckboxItem(java.lang.String name)
           
CheckboxItem(java.lang.String name, java.lang.String title)
           
 
Method Summary
 java.lang.Boolean getAllowEmptyValue()
          By default checkboxes allow the user to toggle between true and false values only. Setting this property to true will allow the user to toggle between three values - true, false and unset.
 java.lang.String getCheckedImage()
          URL for the image to display when this checkbox is selected, or checked. This is the base image name - if showValueIconOver et al are set, the state ("Over", "Down" and "Disabled") will be added to this name as the user intereacts with the checkbox, as well as the ".gif" extension
 java.lang.Boolean getLabelAsTitle()
          By default a checkboxItem sets showTitle:true, and so takes up two cells with the default TitleOrientation of "left" (see 'form layout overview').
static CheckboxItem getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
           
 java.lang.Boolean getShowLabel()
          Should we should the label text next to the checkbox item.
 java.lang.Boolean getShowTitle()
          CheckboxItem has special behavior for titles, see labelAsTitle.
 java.lang.String getTextBoxStyle()
          Base CSS class for this item's title text
 java.lang.String getUncheckedImage()
          URL for the image to display when this checkbox is not selected, or unchecked
 java.lang.String getUnsetImage()
          URL for the image to display when this checkbox is unset.
 void setAllowEmptyValue(java.lang.Boolean allowEmptyValue)
          By default checkboxes allow the user to toggle between true and false values only. Setting this property to true will allow the user to toggle between three values - true, false and unset.
 void setCheckedImage(java.lang.String checkedImage)
          URL for the image to display when this checkbox is selected, or checked. This is the base image name - if showValueIconOver et al are set, the state ("Over", "Down" and "Disabled") will be added to this name as the user intereacts with the checkbox, as well as the ".gif" extension
 void setLabelAsTitle(java.lang.Boolean labelAsTitle)
          By default a checkboxItem sets showTitle:true, and so takes up two cells with the default TitleOrientation of "left" (see 'form layout overview').
 void setShowLabel(java.lang.Boolean showLabel)
          Should we should the label text next to the checkbox item.
 void setShowTitle(java.lang.Boolean showTitle)
          CheckboxItem has special behavior for titles, see labelAsTitle.
 void setShowUnsetImage(java.lang.Boolean showUnsetImage)
          Determines what image to display when the value for this checkbox is unset.
 void setTextBoxStyle(java.lang.String textBoxStyle)
          Base CSS class for this item's title text
 void setUncheckedImage(java.lang.String uncheckedImage)
          URL for the image to display when this checkbox is not selected, or unchecked
 void setUnsetImage(java.lang.String unsetImage)
          URL for the image to display when this checkbox is unset.
 
Methods inherited from class com.smartgwt.client.widgets.form.fields.FormItem
addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addFocusHandler, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addTitleHoverHandler, blurItem, disable, enable, focusInItem, getAccessKey, getAlign, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsString, getCellStyle, getConfig, getCriteriaField, getCriterion, getDateFormatter, getDefaultIconSrc, getDisabled, getDisplayField, getDisplayFieldName, getDisplayValue, getDisplayValue, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getFetchMissingValues, getFieldName, getFilterLocally, getGlobalTabIndex, getHeight, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIconHeight, getIconPageRect, getIconPrompt, getIconRect, getIconVAlign, getIconWidth, getImageURLPrefix, getImageURLSuffix, getLeft, getName, getOperator, getPickerIconHeight, getPickerIconSrc, getPickerIconWidth, getPrompt, getRejectInvalidValueOnChange, getRequired, getRowSpan, getSelectOnFocus, getShouldSaveValue, getShowDisabled, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocused, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowOverIcons, getShowPickerIcon, getShowValueIconOnly, getStartRow, getSuppressValueIcon, getTabIndex, getTextAlign, getTimeFormatter, getTitle, getTitleAlign, getTitleOrientation, getTitleStyle, getTooltip, getTop, getType, getValidateOnChange, getValue, getValueField, getValueFieldName, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getVisible, getWidth, getWrapTitle, hide, isCreated, isDisabled, isDrawn, redraw, setAccessKey, setAlign, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setCellStyle, setColSpan, setColSpan, setCriteriaField, setDateFormatter, setDefaultIconSrc, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisplayField, setEditorType, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setFetchMissingValues, setFilterLocally, setGlobalTabIndex, setHeight, setHeight, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverHeight, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setIconHeight, setIconPrompt, setIcons, setIconVAlign, setIconWidth, setImageURLPrefix, setImageURLSuffix, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setLeft, setName, setOperator, setOptionDataSource, setPickerIconHeight, setPickerIconSrc, setPickerIconWidth, setPrompt, setProperty, setProperty, setProperty, setProperty, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRowSpan, setSelectOnFocus, setShouldSaveValue, setShowDisabled, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocused, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIfCondition, setShowOverIcons, setShowPickerIcon, setShowValueIconOnly, setStartRow, setSuppressValueIcon, setTabIndex, setTextAlign, setTimeFormatter, setTitle, setTitleAlign, setTitleOrientation, setTitleStyle, setTooltip, setTop, setType, setValidateOnChange, setValidators, setValue, setValue, setValue, setValue, setValue, setValue, setValueField, setValueIconHeight, setValueIconLeftPadding, setValueIconRightPadding, setValueIcons, setValueIconSize, setValueIconWidth, setValueMap, setValueMap, setVisible, setWidth, setWidth, setWrapTitle, show, stopHover, updateState
 
Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef
 
Methods inherited from class com.smartgwt.client.core.DataClass
doAddHandler, fireEvent, getAttributeAsIntArray, getAttributeAsMap, getAttributeAsObject, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute
 
Methods inherited from class com.smartgwt.client.core.JsObject
setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

CheckboxItem

public CheckboxItem()

CheckboxItem

public CheckboxItem(com.google.gwt.core.client.JavaScriptObject jsObj)

CheckboxItem

public CheckboxItem(java.lang.String name)

CheckboxItem

public CheckboxItem(java.lang.String name,
                    java.lang.String title)
Method Detail

getOrCreateRef

public static CheckboxItem getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

setTextBoxStyle

public void setTextBoxStyle(java.lang.String textBoxStyle)
Base CSS class for this item's title text

Overrides:
setTextBoxStyle in class FormItem
Parameters:
textBoxStyle - textBoxStyle Default value is "labelAnchor"

getTextBoxStyle

public java.lang.String getTextBoxStyle()
Base CSS class for this item's title text

Overrides:
getTextBoxStyle in class FormItem
Returns:
String

setShowTitle

public void setShowTitle(java.lang.Boolean showTitle)
CheckboxItem has special behavior for titles, see labelAsTitle.

Overrides:
setShowTitle in class FormItem
Parameters:
showTitle - showTitle Default value is true

getShowTitle

public java.lang.Boolean getShowTitle()
CheckboxItem has special behavior for titles, see labelAsTitle.

Overrides:
getShowTitle in class FormItem
Returns:
Boolean

setLabelAsTitle

public void setLabelAsTitle(java.lang.Boolean labelAsTitle)
By default a checkboxItem sets showTitle:true, and so takes up two cells with the default TitleOrientation of "left" (see 'form layout overview'). However, the title cell is left blank by default, and the title specified by title is shown inside the formItem's cell instead, in an element called the "label".

To instead show the title in it's original location, set labelAsTitle:true. You can also set showLabel:false to suppress the label and/or title altogether.

Parameters:
labelAsTitle - labelAsTitle Default value is null

getLabelAsTitle

public java.lang.Boolean getLabelAsTitle()
By default a checkboxItem sets showTitle:true, and so takes up two cells with the default TitleOrientation of "left" (see 'form layout overview'). However, the title cell is left blank by default, and the title specified by title is shown inside the formItem's cell instead, in an element called the "label".

To instead show the title in it's original location, set labelAsTitle:true. You can also set showLabel:false to suppress the label and/or title altogether.

Returns:
Boolean

setShowLabel

public void setShowLabel(java.lang.Boolean showLabel)
Should we should the label text next to the checkbox item.

Parameters:
showLabel - showLabel Default value is true

getShowLabel

public java.lang.Boolean getShowLabel()
Should we should the label text next to the checkbox item.

Returns:
Boolean

setCheckedImage

public void setCheckedImage(java.lang.String checkedImage)
URL for the image to display when this checkbox is selected, or checked. This is the base image name - if showValueIconOver et al are set, the state ("Over", "Down" and "Disabled") will be added to this name as the user intereacts with the checkbox, as well as the ".gif" extension

Parameters:
checkedImage - checkedImage Default value is "[SKIN]/DynamicForm/checked.gif"

getCheckedImage

public java.lang.String getCheckedImage()
URL for the image to display when this checkbox is selected, or checked. This is the base image name - if showValueIconOver et al are set, the state ("Over", "Down" and "Disabled") will be added to this name as the user intereacts with the checkbox, as well as the ".gif" extension

Returns:
String

setUncheckedImage

public void setUncheckedImage(java.lang.String uncheckedImage)
URL for the image to display when this checkbox is not selected, or unchecked

Parameters:
uncheckedImage - uncheckedImage Default value is "[SKIN]/DynamicForm/unchecked.gif"

getUncheckedImage

public java.lang.String getUncheckedImage()
URL for the image to display when this checkbox is not selected, or unchecked

Returns:
String

setUnsetImage

public void setUnsetImage(java.lang.String unsetImage)
URL for the image to display when this checkbox is unset. Note that if showUnsetImage is false or allowEmptyValue is false the uncheckedImage will be used for null values rather than this image.

Parameters:
unsetImage - unsetImage Default value is "[SKIN]/DynamicForm/unsetcheck.gif"

getUnsetImage

public java.lang.String getUnsetImage()
URL for the image to display when this checkbox is unset. Note that if showUnsetImage is false or allowEmptyValue is false the uncheckedImage will be used for null values rather than this image.

Returns:
String

setAllowEmptyValue

public void setAllowEmptyValue(java.lang.Boolean allowEmptyValue)
By default checkboxes allow the user to toggle between true and false values only. Setting this property to true will allow the user to toggle between three values - true, false and unset.

Parameters:
allowEmptyValue - allowEmptyValue Default value is false

getAllowEmptyValue

public java.lang.Boolean getAllowEmptyValue()
By default checkboxes allow the user to toggle between true and false values only. Setting this property to true will allow the user to toggle between three values - true, false and unset.

Returns:
Boolean

setShowUnsetImage

public void setShowUnsetImage(java.lang.Boolean showUnsetImage)
Determines what image to display when the value for this checkbox is unset. Set to true to display the unsetImage for null values, or false to use the uncheckedImage for both null and explicitly unchecked values.

If this attribute is not set, the unsetImage for null values if allowEmptyValue is true for this item, otherwise the unchecked image will be used.

Parameters:
showUnsetImage - showUnsetImage Default value is IRA