Class CheckboxItem
- All Implemented Interfaces:
HasHandlers
,HasBlurHandlers
,HasChangedHandlers
,HasChangeHandlers
,HasClickHandlers
,HasDoubleClickHandlers
,HasEditorEnterHandlers
,HasEditorExitHandlers
,HasFocusHandlers
,HasIconClickHandlers
,HasIconKeyPressHandlers
,HasItemHoverHandlers
,HasKeyDownHandlers
,HasKeyPressHandlers
,HasKeyUpHandlers
,HasPendingStatusChangedHandlers
,HasPickerIconClickHandlers
,HasShowContextMenuHandlers
,HasTitleClickHandlers
,HasTitleDoubleClickHandlers
,HasTitleHoverHandlers
,HasValueHoverHandlers
,HasValueIconClickHandlers
- Direct Known Subclasses:
BooleanItem
-
Nested Class Summary
Nested classes/interfaces inherited from class com.smartgwt.client.widgets.form.fields.FormItem
FormItem.CustomStateGetter, FormItem.StateCustomizer
-
Field Summary
Fields inherited from class com.smartgwt.client.widgets.form.fields.FormItem
configOnly, scClassName, warnOnEditorTypeConversion, warnOnEditorTypeConversionDefault
Fields inherited from class com.smartgwt.client.core.RefDataClass
id
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
ConstructorDescriptionCheckboxItem
(JavaScriptObject jsObj) CheckboxItem
(String name) CheckboxItem
(String name, String title) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
changeAutoChildDefaults
(String autoChildName, Canvas defaults) Changes the defaults for Canvas AutoChildren namedautoChildName
.static void
changeAutoChildDefaults
(String autoChildName, FormItem defaults) Changes the defaults for FormItem AutoChildren namedautoChildName
.static void
changePickerIconDefaults
(FormItemIcon defaults) By default checkboxes allow the user to toggle between true and false values only.An optional base CSS style to apply to the checkbox image.The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the checked state.URL for the image to display when this checkbox is selected, or checked.Overridden to assign class-appropriate type.Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.By default a checkboxItem setsshowTitle
:true, and so takes up two cells with the defaultTitleOrientation
of "left" (seeform layout\n overview
).static CheckboxItem
getOrCreateRef
(JavaScriptObject jsObj) The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the partial selected state.URL for the image to display when this checkbox is partially selected.If set, thebooleanBaseStyle
to use whenprinting
.If set, thecheckedImage
to use whenprinting
.If set, thepartialSelectedImage
to use whenprinting
.If set, theuncheckedImage
to use whenprinting
.If set, theunsetImage
to use whenprinting
.Should we show the label text next to the checkbox item.Should a null value be shown as checked (i.e.Set this property to the name of another field in the same record, to have this field be shown as checked (i.e.CheckboxItem has special behavior for titles, seelabelAsTitle
.Should a "Disabled" state icon be shown when the item is disabledShould a "Down" state icon be shown when the mouse goes down over this checkboxWhether a separate "Error" state should be applied to icons when the item fails validation.Should an "Over" state icon be shown when the user rolls over this checkboxboolean
If this checkbox item isnot showing a label
, should it ignore any specifiedFormItem.width
and instead size to fit itscheckbox icon
?Base CSS class for this item's title textBase CSS class for this item's title cell.The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the unchecked state.URL for the image to display when this checkbox is not selected, or unchecked.The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the unset state.URL for the image to display when this checkbox is unset.Return the value of the checkbox as a Boolean.int
getWidth()
Width for the CheckboxItem, including both checkbox image andlabel
.boolean
pendingStatusChanged
(DynamicForm form, FormItem item, boolean pendingStatus, Object newValue, Object value) Notification method called whenshowPending
is enabled and this checkbox item should either clear or show its pending visual state.setAllowEmptyValue
(Boolean allowEmptyValue) By default checkboxes allow the user to toggle between true and false values only.setBooleanBaseStyle
(String booleanBaseStyle) An optional base CSS style to apply to the checkbox image.setCheckedDescription
(String checkedDescription) The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the checked state.setCheckedImage
(String checkedImage) URL for the image to display when this checkbox is selected, or checked.static void
setDefaultProperties
(CheckboxItem checkboxItemProperties) Class level method to set the default properties of this class.setEditProxyConstructor
(String editProxyConstructor) Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.setLabelAsTitle
(Boolean labelAsTitle) By default a checkboxItem setsshowTitle
:true, and so takes up two cells with the defaultTitleOrientation
of "left" (seeform layout\n overview
).setPartialSelectedDescription
(String partialSelectedDescription) The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the partial selected state.setPartialSelectedImage
(String partialSelectedImage) URL for the image to display when this checkbox is partially selected.setPrintBooleanBaseStyle
(String printBooleanBaseStyle) If set, thebooleanBaseStyle
to use whenprinting
.setPrintCheckedImage
(String printCheckedImage) If set, thecheckedImage
to use whenprinting
.setPrintPartialSelectedImage
(String printPartialSelectedImage) If set, thepartialSelectedImage
to use whenprinting
.setPrintUncheckedImage
(String printUncheckedImage) If set, theuncheckedImage
to use whenprinting
.setPrintUnsetImage
(String printUnsetImage) If set, theunsetImage
to use whenprinting
.setShowLabel
(Boolean showLabel) Should we show the label text next to the checkbox item.setShowNullAsTrue
(Boolean showNullAsTrue) Should a null value be shown as checked (i.e.setShowNullAsTrueIf
(String showNullAsTrueIf) Set this property to the name of another field in the same record, to have this field be shown as checked (i.e.setShowTitle
(Boolean showTitle) CheckboxItem has special behavior for titles, seelabelAsTitle
.void
setShowUnsetImage
(Boolean showUnsetImage) Determines what image to display when the value for this checkbox is unset.setShowValueIconDisabled
(Boolean showValueIconDisabled) Should a "Disabled" state icon be shown when the item is disabledsetShowValueIconDown
(Boolean showValueIconDown) Should a "Down" state icon be shown when the mouse goes down over this checkboxsetShowValueIconError
(Boolean showValueIconError) Whether a separate "Error" state should be applied to icons when the item fails validation.setShowValueIconOver
(Boolean showValueIconOver) Should an "Over" state icon be shown when the user rolls over this checkboxsetSizeToCheckboxImage
(boolean sizeToCheckboxImage) If this checkbox item isnot showing a label
, should it ignore any specifiedFormItem.width
and instead size to fit itscheckbox icon
?setTextBoxStyle
(String textBoxStyle) Base CSS class for this item's title textsetTitleStyle
(String titleStyle) Base CSS class for this item's title cell.setUncheckedDescription
(String uncheckedDescription) The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the unchecked state.setUncheckedImage
(String uncheckedImage) URL for the image to display when this checkbox is not selected, or unchecked.setUnsetDescription
(String unsetDescription) The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the unset state.setUnsetImage
(String unsetImage) URL for the image to display when this checkbox is unset.setWidth
(int width) Width for the CheckboxItem, including both checkbox image andlabel
.Methods inherited from class com.smartgwt.client.widgets.form.fields.FormItem
_getValue, addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addEditorEnterHandler, addEditorExitHandler, addFocusHandler, addIcon, addIcon, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addPendingStatusChangedHandler, addPickerIconClickHandler, addShowContextMenuHandler, addTitleClickHandler, addTitleDoubleClickHandler, addTitleHoverHandler, addValueHoverHandler, addValueIconClickHandler, applyFormula, asSGWTComponent, blurItem, canEditCriterion, checkFormItemType, clearErrors, clearValue, disable, disableIcon, enable, enableIcon, error, error, errorIfNotCreated, focusAfterItem, focusInItem, getAccessKey, getAlign, getAllowExpressions, getAlwaysFetchMissingValues, getAlwaysShowControlBox, getApplyAlignToText, getApplyHeightToTextBox, getAriaRole, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsObject, getAttributeAsString, getAutoComplete, getAutoCompleteKeywords, getBrowserInputType, getBrowserSpellCheck, getCanEdit, getCanEditOpaqueValues, getCanFocus, getCanHover, getCanSelectText, getCanTabToIcons, getCanvasAutoChild, getCellHeight, getCellStyle, getChangeOnKeypress, getClassName, getClipStaticValue, getClipTitle, getConfig, getContainerWidget, getControlStyle, getCriteriaField, getCriterion, getCriterion, getCursorPosition, getCustomState, getDataPath, getDateFormatter, getDecimalPad, getDecimalPrecision, getDefaultIconSrc, getDefaultOperator, getDestroyed, getDisabled, getDisabledHover, getDisableIconsOnReadOnly, getDisplayField, getDisplayFieldName, getDisplayValue, getDisplayValue, getEditorTypeConfig, getEditPendingCSSText, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconProperties, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getErrors, getEscapeHTML, getExportFormat, getFetchMissingValues, getFieldName, getFilterLocally, getForeignDisplayField, getForm, getFormat, getFormItemAutoChild, getFormula, getFullDataPath, getGlobalTabIndex, getGridColNum, getGridRowNum, getHeight, getHeightAsString, getHidden, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverFocusKey, getHoverHeight, getHoverHeightAsString, getHoverOpacity, getHoverPersist, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWidthAsString, getIcon, getIconBaseStyle, getIconHeight, getIconHSpace, getIconPageRect, getIconPrompt, getIconRect, getIcons, getIconTabPosition, getIconVAlign, getIconWidth, getID, getImageURLPrefix, getImageURLSuffix, getImplicitSave, getImplicitSaveOnBlur, getInputFormat, getLeft, getLinearColSpan, getLinearColSpanAsString, getLinearEndRow, getLinearEndRowAsString, getLinearStartRow, getLinearStartRowAsString, getLinearWidth, getLinearWidthAsString, getListGrid, getLoadingDisplayValue, getLocateItemBy, getMinHintWidth, getMultiple, getMultipleValueSeparator, getName, getNullOriginalValueText, getOperator, getOptionCriteria, getOptionDataSource, getOptionDataSourceAsString, getOptionFilterContext, getOptionOperationId, getOptionTextMatchStyle, getOriginalValueMessage, getPageLeft, getPageRect, getPageTop, getPaletteDefaults, getPicker, getPickerIcon, getPickerIcon, getPickerIconHeight, getPickerIconName, getPickerIconPrompt, getPickerIconProperties, getPickerIconSrc, getPickerIconStyle, getPickerIconTabPosition, getPickerIconWidth, getPixelHeight, getPixelWidth, getPrintReadOnlyTextBoxStyle, getPrintTextBoxStyle, getPrintTitleStyle, getPrompt, getReadOnlyCanSelectText, getReadOnlyControlStyle, getReadOnlyDisplay, getReadOnlyHover, getReadOnlyTextBoxStyle, getReadOnlyWhen, getRect, getRedrawOnChange, getRejectInvalidValueOnChange, getRequired, getRequiredMessage, getRequiredWhen, getRowSpan, getSaveOnEnter, getScClassName, getSelectedRecord, getSelectOnClick, getSelectOnFocus, getShouldSaveValue, getShowClippedTitleOnHover, getShowClippedValueOnHover, getShowDeletions, getShowDisabled, getShowDisabledIconsOnFocus, getShowDisabledPickerIconOnFocus, getShowErrorIcon, getShowErrorIconInline, getShowErrorStyle, getShowErrorText, getShowFocused, getShowFocusedErrorState, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowIconsOnFocus, getShowImageAsURL, getShowOldValueInHover, getShowOver, getShowOverIcons, getShowPending, getShowPickerIcon, getShowPickerIconOnFocus, getShowRTL, getShowValueIconOnly, getStartRow, getStaticHeight, getStopOnError, getStoreDisplayValues, getSupportsCutPasteEvents, getSuppressValueIcon, getSynchronousValidation, getTabIndex, getTextAlign, getTextFormula, getTimeFormatter, getTitle, getTitleAlign, getTitleColSpan, getTitleOrientation, getTitleVAlign, getTooltip, getTop, getType, getUpdateControlOnOver, getUpdatePickerIconOnOver, getUpdateTextBoxOnOver, getUseAdvancedCriteria, getUseDisabledHintStyleForReadOnly, getUseLocalDisplayFieldValue, getValidateOnChange, getValidateOnExit, getValidOperators, getVAlign, getValue, getValueAsFloat, getValueAsInteger, getValueAsLong, getValueAsRecordList, getValueDeselectedCSSText, getValueField, getValueFieldName, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getValueMap, getValueMapAsArray, getVisible, getVisibleHeight, getVisibleTitleWidth, getVisibleWhen, getVisibleWidth, getWarnOnEditorTypeConversion, getWarnOnEditorTypeConversionDefault, getWidthAsString, getWrapHintText, getWrapStaticValue, getWrapTitle, handleWarnOnEditorTypeConversion, hasAdvancedCriteria, hasErrors, hide, hideIcon, invalidateDisplayValueCache, isAssignableFrom, isConfigOnly, isCreated, isCutEvent, isDisabled, isDrawn, isFocused, isInGrid, isPasteEvent, isVisible, linkToInstanceUponCreate, mapDisplayToValue, mapValueToDisplay, mapValueToDisplay, mapValueToDisplay, redraw, redraw, removeIcon, selectedRecordChanged, setAccessKey, setAlign, setAllowExpressions, setAlwaysFetchMissingValues, setAlwaysShowControlBox, setApplyAlignToText, setApplyHeightToTextBox, setAriaRole, setAriaState, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoComplete, setAutoCompleteKeywords, setBrowserInputType, setBrowserSpellCheck, setCanEdit, setCanEditCriterionPredicate, setCanEditOpaqueValues, setCanFocus, setCanHover, setCanSelectText, setCanTabToIcons, setCellHeight, setCellStyle, setChangeOnKeypress, setClipStaticValue, setClipTitle, setColSpan, setColSpan, setConfigOnly, setControlStyle, setCriteriaField, setCriterion, setCriterionGetter, setCriterionSetter, setCustomStateGetter, setDataPath, setDateFormatter, setDecimalPad, setDecimalPrecision, setDefaultIconSrc, setDefaultOperator, setDefaultProperties, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisabledHover, setDisableIconsOnReadOnly, setDisplayField, setDisplayFormat, setDisplayFormat, setEditorProperties, setEditorType, setEditorType, setEditorType, setEditorValueFormatter, setEditorValueParser, setEditPendingCSSText, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconProperties, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setErrors, setErrors, setEscapeHTML, setExportFormat, setFetchMissingValues, setFilterLocally, setForeignDisplayField, setFormat, setFormula, setGlobalTabIndex, setHeight, setHeight, setHidden, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverFocusKey, setHoverHeight, setHoverHeight, setHoverOpacity, setHoverPersist, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWidth, setIconBaseStyle, setIconDisabled, setIconHeight, setIconHSpace, setIconPrompt, setIcons, setIconShowOnFocus, setIconVAlign, setIconWidth, setID, setImageURLPrefix, setImageURLSuffix, setImplicitSave, setImplicitSaveOnBlur, setInitHandler, setInputFormat, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setItemValueHoverFormatter, setJavaScriptObject, setLeft, setLinearColSpan, setLinearColSpan, setLinearEndRow, setLinearEndRow, setLinearStartRow, setLinearStartRow, setLinearWidth, setLinearWidth, setLoadingDisplayValue, setLocateItemBy, setMinHintWidth, setMultiple, setMultipleValueSeparator, setName, setNullOriginalValueText, setNullProperty, setOperator, setOptionCriteria, setOptionDataSource, setOptionDataSource, setOptionFilterContext, setOptionOperationId, setOptionTextMatchStyle, setOriginalValueMessage, setPickerIconHeight, setPickerIconName, setPickerIconPrompt, setPickerIconProperties, setPickerIconSrc, setPickerIconStyle, setPickerIconWidth, setPrintReadOnlyTextBoxStyle, setPrintTextBoxStyle, setPrintTitleStyle, setPrompt, setProperty, setProperty, setProperty, setProperty, setProperty, setReadOnlyCanSelectText, setReadOnlyControlStyle, setReadOnlyDisplay, setReadOnlyHover, setReadOnlyTextBoxStyle, setReadOnlyWhen, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRequiredMessage, setRequiredWhen, setRowSpan, setSaveOnEnter, setScClassName, setSelectOnClick, setSelectOnFocus, setShouldSaveValue, setShowClippedTitleOnHover, setShowClippedValueOnHover, setShowDeletions, setShowDisabled, setShowDisabledIconsOnFocus, setShowDisabledPickerIconOnFocus, setShowErrorIcon, setShowErrorIconInline, setShowErrorStyle, setShowErrorText, setShowFocused, setShowFocusedErrorState, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIconsOnFocus, setShowIfCondition, setShowImageAsURL, setShowOldValueInHover, setShowOver, setShowOverIcons, setShowPending, setShowPickerIcon, setShowPickerIconOnFocus, setShowRTL, setShowValueIconOnly, setStartRow, setStateCustomizer, setStaticHeight, setStopOnError, setStoreDisplayValues, setSupportsCutPasteEvents, setSuppressValueIcon, setSynchronousValidation, setTabIndex, setTextAlign, setTextFormula, setTimeFormatter, setTitle, setTitleAlign, setTitleColSpan, setTitleHoverFormatter, setTitleOrientation, setTitleVAlign, setTooltip, setTop, setType, setUpdateControlOnOver, setUpdatePickerIconOnOver, setUpdateTextBoxOnOver, setUseAdvancedCriteria, setUseDisabledHintStyleForReadOnly, setUseLocalDisplayFieldValue, setUseObjectFactoryForTypeFallback, setValidateOnChange, setValidateOnExit, setValidators, setValidOperators, setVAlign, setValue, setValue, setValue, setValue, setValue, setValue, setValueDeselectedCSSText, setValueField, setValueFormatter, setValueHoverFormatter, setValueIconHeight, setValueIconLeftPadding, setValueIconMapper, setValueIconRightPadding, setValueIcons, setValueIconSize, setValueIconWidth, setValueMap, setValueMap, setVisible, setVisibleWhen, setWarnOnEditorTypeConversion, setWarnOnEditorTypeConversionDefault, setWidth, setWrapHintText, setWrapStaticValue, setWrapTitle, shouldApplyHeightToTextBox, shouldFetchMissingValue, shouldSaveOnEnter, shouldStopKeyPressBubbling, show, showIcon, showPicker, stopHover, storeValue, storeValue, updateState, validate, valueClipped
Methods inherited from class com.smartgwt.client.data.Field
getCanExport, getExportTitle, getSortByField, setCanExport, setExportTitle, setSortByField
Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef, internalSetID
Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
CheckboxItem
public CheckboxItem() -
CheckboxItem
-
CheckboxItem
-
CheckboxItem
-
-
Method Details
-
getOrCreateRef
-
changeAutoChildDefaults
Changes the defaults for Canvas AutoChildren namedautoChildName
.- Parameters:
autoChildName
- name of an AutoChild to customize the defaults for.defaults
- Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, seeSGWTProperties
.- See Also:
-
changeAutoChildDefaults
Changes the defaults for FormItem AutoChildren namedautoChildName
.- Parameters:
autoChildName
- name of an AutoChild to customize the defaults for.defaults
- FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, seeSGWTProperties
.- See Also:
-
changePickerIconDefaults
-
setAllowEmptyValue
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
- New allowEmptyValue value. Default value is false- Returns:
CheckboxItem
instance, for chaining setter calls
-
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:
- Current allowEmptyValue value. Default value is false
-
setBooleanBaseStyle
An optional base CSS style to apply to the checkbox image. If supplied, the base style is suffixed with "True", "False", "Partial", or "Unset" if the checkbox is selected, unselected, partially selected, or unset. The style is then suffixed with the state of the value icon ("", "Over", "Down", "Disabled").Note : This is an advanced setting
- Parameters:
booleanBaseStyle
- New booleanBaseStyle value. Default value is null- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getBooleanBaseStyle
An optional base CSS style to apply to the checkbox image. If supplied, the base style is suffixed with "True", "False", "Partial", or "Unset" if the checkbox is selected, unselected, partially selected, or unset. The style is then suffixed with the state of the value icon ("", "Over", "Down", "Disabled").- Returns:
- Current booleanBaseStyle value. Default value is null
- See Also:
-
setCheckedDescription
The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the checked state.Note : This is an advanced setting
- Parameters:
checkedDescription
- New checkedDescription value. Default value is "checked"- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getCheckedDescription
The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the checked state.- Returns:
- Current checkedDescription value. Default value is "checked"
- See Also:
-
setCheckedImage
URL for the image to display when this checkbox is selected, or checked.This image is implemented using the
valueIcons subsystem
, and may be modified via the standard valueIcons properties such asvalueIconWidth
Note that 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 interacts with the checkbox, as well as the image extensionThe special value "blank" means that no image will be shown.
Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
property to provide a "checked" appearance.- Parameters:
checkedImage
- New checkedImage value. Default value is "[SKIN]/DynamicForm/checked.gif"- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getCheckedImage
URL for the image to display when this checkbox is selected, or checked.This image is implemented using the
valueIcons subsystem
, and may be modified via the standard valueIcons properties such asvalueIconWidth
Note that 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 interacts with the checkbox, as well as the image extensionThe special value "blank" means that no image will be shown.
Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
property to provide a "checked" appearance.- Returns:
- Current checkedImage value. Default value is "[SKIN]/DynamicForm/checked.gif"
- See Also:
-
getDefaultValue
Overridden to assign class-appropriate type.- Overrides:
getDefaultValue
in classFormItem
- Returns:
- Current defaultValue value. Default value is null
- See Also:
-
setEditProxyConstructor
Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.- Overrides:
setEditProxyConstructor
in classFormItem
- Parameters:
editProxyConstructor
- New editProxyConstructor value. Default value is "CheckboxItemEditProxy"- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getEditProxyConstructor
Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.- Overrides:
getEditProxyConstructor
in classFormItem
- Returns:
- Current editProxyConstructor value. Default value is "CheckboxItemEditProxy"
- See Also:
-
setLabelAsTitle
By default a checkboxItem setsshowTitle
:true, and so takes up two cells with the defaultTitleOrientation
of "left" (seeform layout\n overview
). However, the title cell is left blank by default, and the title specified byFormItem.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 setshowLabel
:false to suppress the label and/or title altogether.- Parameters:
labelAsTitle
- New labelAsTitle value. Default value is null- Returns:
CheckboxItem
instance, for chaining setter calls
-
getLabelAsTitle
By default a checkboxItem setsshowTitle
:true, and so takes up two cells with the defaultTitleOrientation
of "left" (seeform layout\n overview
). However, the title cell is left blank by default, and the title specified byFormItem.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 setshowLabel
:false to suppress the label and/or title altogether.- Returns:
- Current labelAsTitle value. Default value is null
-
setPartialSelectedDescription
The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the partial selected state.Note : This is an advanced setting
- Parameters:
partialSelectedDescription
- New partialSelectedDescription value. Default value is "partially selected"- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getPartialSelectedDescription
The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the partial selected state.- Returns:
- Current partialSelectedDescription value. Default value is "partially selected"
- See Also:
-
setPartialSelectedImage
URL for the image to display when this checkbox is partially selected.The special value "blank" means that no image will be shown.
Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
property to provide a "partially checked" appearance.- Parameters:
partialSelectedImage
- New partialSelectedImage value. Default value is "[SKIN]/DynamicForm/partialcheck.gif"- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getPartialSelectedImage
URL for the image to display when this checkbox is partially selected.The special value "blank" means that no image will be shown.
Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
property to provide a "partially checked" appearance.- Returns:
- Current partialSelectedImage value. Default value is "[SKIN]/DynamicForm/partialcheck.gif"
- See Also:
-
setPrintBooleanBaseStyle
- Parameters:
printBooleanBaseStyle
- New printBooleanBaseStyle value. Default value is null- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getPrintBooleanBaseStyle
If set, thebooleanBaseStyle
to use whenprinting
.- Returns:
- Current printBooleanBaseStyle value. Default value is null
- See Also:
-
setPrintCheckedImage
If set, thecheckedImage
to use whenprinting
.- Parameters:
printCheckedImage
- New printCheckedImage value. Default value is null- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getPrintCheckedImage
If set, thecheckedImage
to use whenprinting
.- Returns:
- Current printCheckedImage value. Default value is null
- See Also:
-
setPrintPartialSelectedImage
If set, thepartialSelectedImage
to use whenprinting
.- Parameters:
printPartialSelectedImage
- New printPartialSelectedImage value. Default value is null- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getPrintPartialSelectedImage
If set, thepartialSelectedImage
to use whenprinting
.- Returns:
- Current printPartialSelectedImage value. Default value is null
- See Also:
-
setPrintUncheckedImage
If set, theuncheckedImage
to use whenprinting
.- Parameters:
printUncheckedImage
- New printUncheckedImage value. Default value is null- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getPrintUncheckedImage
If set, theuncheckedImage
to use whenprinting
.- Returns:
- Current printUncheckedImage value. Default value is null
- See Also:
-
setPrintUnsetImage
If set, theunsetImage
to use whenprinting
.- Parameters:
printUnsetImage
- New printUnsetImage value. Default value is null- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getPrintUnsetImage
If set, theunsetImage
to use whenprinting
.- Returns:
- Current printUnsetImage value. Default value is null
- See Also:
-
setShowLabel
Should we show the label text next to the checkbox item.- Parameters:
showLabel
- New showLabel value. Default value is true- Returns:
CheckboxItem
instance, for chaining setter calls
-
getShowLabel
Should we show the label text next to the checkbox item.- Returns:
- Current showLabel value. Default value is true
-
setShowNullAsTrue
Should a null value be shown as checked (i.e. true)?- Parameters:
showNullAsTrue
- New showNullAsTrue value. Default value is false- Returns:
CheckboxItem
instance, for chaining setter calls
-
getShowNullAsTrue
Should a null value be shown as checked (i.e. true)?- Returns:
- Current showNullAsTrue value. Default value is false
-
setShowNullAsTrueIf
Set this property to the name of another field in the same record, to have this field be shown as checked (i.e. true) if this field is null and the other field is not null. For example, you could use this to show a "US Citizen" field as true if a value is entered into another field "US Social Security Number"- Parameters:
showNullAsTrueIf
- New showNullAsTrueIf value. Default value is null- Returns:
CheckboxItem
instance, for chaining setter calls
-
getShowNullAsTrueIf
Set this property to the name of another field in the same record, to have this field be shown as checked (i.e. true) if this field is null and the other field is not null. For example, you could use this to show a "US Citizen" field as true if a value is entered into another field "US Social Security Number"- Returns:
- Current showNullAsTrueIf value. Default value is null
-
setShowTitle
CheckboxItem has special behavior for titles, seelabelAsTitle
.- Overrides:
setShowTitle
in classFormItem
- Parameters:
showTitle
- New showTitle value. Default value is true- Returns:
CheckboxItem
instance, for chaining setter calls
-
getShowTitle
CheckboxItem has special behavior for titles, seelabelAsTitle
.- Overrides:
getShowTitle
in classFormItem
- Returns:
- Current showTitle value. Default value is true
-
setShowValueIconDisabled
Should a "Disabled" state icon be shown when the item is disabledNote : This is an advanced setting
- Parameters:
showValueIconDisabled
- New showValueIconDisabled value. Default value is true- Returns:
CheckboxItem
instance, for chaining setter calls
-
getShowValueIconDisabled
Should a "Disabled" state icon be shown when the item is disabled- Returns:
- Current showValueIconDisabled value. Default value is true
-
setShowValueIconDown
Should a "Down" state icon be shown when the mouse goes down over this checkboxNote : This is an advanced setting
- Parameters:
showValueIconDown
- New showValueIconDown value. Default value is true- Returns:
CheckboxItem
instance, for chaining setter calls
-
getShowValueIconDown
Should a "Down" state icon be shown when the mouse goes down over this checkbox- Returns:
- Current showValueIconDown value. Default value is true
-
setShowValueIconError
Whether a separate "Error" state should be applied to icons when the item fails validation. If set to true and this item has validation errors, the icon-src will be suffixed Error. If physical states also apply, such asOver
orDisabled
, these are appended - for example, ErrorOver or ErrorDisabled.Note that valid images must be made available for these
Error
states.Note : This is an advanced setting
- Parameters:
showValueIconError
- New showValueIconError value. Default value is false- Returns:
CheckboxItem
instance, for chaining setter calls
-
getShowValueIconError
Whether a separate "Error" state should be applied to icons when the item fails validation. If set to true and this item has validation errors, the icon-src will be suffixed Error. If physical states also apply, such asOver
orDisabled
, these are appended - for example, ErrorOver or ErrorDisabled.Note that valid images must be made available for these
Error
states.- Returns:
- Current showValueIconError value. Default value is false
-
setShowValueIconOver
Should an "Over" state icon be shown when the user rolls over this checkboxNote : This is an advanced setting
- Parameters:
showValueIconOver
- New showValueIconOver value. Default value is true- Returns:
CheckboxItem
instance, for chaining setter calls
-
getShowValueIconOver
Should an "Over" state icon be shown when the user rolls over this checkbox- Returns:
- Current showValueIconOver value. Default value is true
-
setSizeToCheckboxImage
If this checkbox item isnot showing a label
, should it ignore any specifiedFormItem.width
and instead size to fit itscheckbox icon
?When set to true (the default), the checkbox item ignores any specified width, ensuring that it does not impact the the containing DynamicForm's table geometry unnecessarily.
Note : This is an advanced setting
- Parameters:
sizeToCheckboxImage
- New sizeToCheckboxImage value. Default value is true- Returns:
CheckboxItem
instance, for chaining setter calls
-
getSizeToCheckboxImage
public boolean getSizeToCheckboxImage()If this checkbox item isnot showing a label
, should it ignore any specifiedFormItem.width
and instead size to fit itscheckbox icon
?When set to true (the default), the checkbox item ignores any specified width, ensuring that it does not impact the the containing DynamicForm's table geometry unnecessarily.
- Returns:
- Current sizeToCheckboxImage value. Default value is true
-
setTextBoxStyle
Base CSS class for this item's title text- Overrides:
setTextBoxStyle
in classFormItem
- Parameters:
textBoxStyle
- New textBoxStyle value. Default value is "labelAnchor"- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getTextBoxStyle
Base CSS class for this item's title text- Overrides:
getTextBoxStyle
in classFormItem
- Returns:
- Current textBoxStyle value. Default value is "labelAnchor"
- See Also:
-
setTitleStyle
Base CSS class for this item's title cell.Note: This styling applies to the standard form item title cell for this item - it does not apply to item's
label
. To modify the styling for that text, usetextBoxStyle
instead.- Overrides:
setTitleStyle
in classFormItem
- Parameters:
titleStyle
- New titleStyle value. Default value is null- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getTitleStyle
Base CSS class for this item's title cell.Note: This styling applies to the standard form item title cell for this item - it does not apply to item's
label
. To modify the styling for that text, usetextBoxStyle
instead.- Overrides:
getTitleStyle
in classFormItem
- Returns:
- Current titleStyle value. Default value is null
- See Also:
-
setUncheckedDescription
The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the unchecked state.Note : This is an advanced setting
- Parameters:
uncheckedDescription
- New uncheckedDescription value. Default value is "unchecked"- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getUncheckedDescription
The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the unchecked state.- Returns:
- Current uncheckedDescription value. Default value is "unchecked"
- See Also:
-
setUncheckedImage
URL for the image to display when this checkbox is not selected, or unchecked.The special value "blank" means that no image will be shown.
Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
property to provide an "unchecked" appearance.- Parameters:
uncheckedImage
- New uncheckedImage value. Default value is "[SKIN]/DynamicForm/unchecked.gif"- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getUncheckedImage
URL for the image to display when this checkbox is not selected, or unchecked.The special value "blank" means that no image will be shown.
Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
property to provide an "unchecked" appearance.- Returns:
- Current uncheckedImage value. Default value is "[SKIN]/DynamicForm/unchecked.gif"
- See Also:
-
setUnsetDescription
The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the unset state.Note : This is an advanced setting
- Parameters:
unsetDescription
- New unsetDescription value. Default value is "unset"- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getUnsetDescription
The description shown in a hover whenFormItem.showOldValueInHover
is enabled and a value represents the unset state.- Returns:
- Current unsetDescription value. Default value is "unset"
- See Also:
-
setUnsetImage
URL for the image to display when this checkbox is unset. Note that ifshowUnsetImage
is false orallowEmptyValue
is false theuncheckedImage
will be used for null values rather than this image.The special value "blank" means that no image will be shown.
Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
property to provide an "unset" appearance.- Parameters:
unsetImage
- New unsetImage value. Default value is "[SKIN]/DynamicForm/unsetcheck.gif"- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getUnsetImage
URL for the image to display when this checkbox is unset. Note that ifshowUnsetImage
is false orallowEmptyValue
is false theuncheckedImage
will be used for null values rather than this image.The special value "blank" means that no image will be shown.
Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
property to provide an "unset" appearance.- Returns:
- Current unsetImage value. Default value is "[SKIN]/DynamicForm/unsetcheck.gif"
- See Also:
-
setWidth
Width for the CheckboxItem, including both checkbox image andlabel
. Note that ifshowLabel
is false, this property will have no effect - the item will render at the size required to contain the icon.- Overrides:
setWidth
in classFormItem
- Parameters:
width
- New width value. Default value is 150- Returns:
CheckboxItem
instance, for chaining setter calls- See Also:
-
getWidth
public int getWidth()Width for the CheckboxItem, including both checkbox image andlabel
. Note that ifshowLabel
is false, this property will have no effect - the item will render at the size required to contain the icon. -
pendingStatusChanged
public boolean pendingStatusChanged(DynamicForm form, FormItem item, boolean pendingStatus, Object newValue, Object value) Notification method called whenshowPending
is enabled and this checkbox item should either clear or show its pending visual state.The default behavior is that the
cellStyle
and checkbox label style are updated to include/exclude the "Pending" suffix. Returningfalse
will cancel this default behavior.- Parameters:
form
- the managingDynamicForm
instance.item
- the form item itself (also available as "this").pendingStatus
-true
if the item should show its pending visual state;false
otherwise.newValue
- the current form item value.value
- the value that would be restored by a call toDynamicForm.resetValues()
.- Returns:
false
to cancel the default behavior.
-
setDefaultProperties
Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties of the class instance passed to this function. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.
- Parameters:
checkboxItemProperties
- properties that should be used as new defaults when instances of this class are created- See Also:
-
setShowUnsetImage
Determines what image to display when the value for this checkbox is unset. Set to true to display theunsetImage
for null values, or false to use theuncheckedImage
for both null and explicitly unchecked values.If this attribute is not set, the
unsetImage
for null values ifallowEmptyValue
is true for this item, otherwise the unchecked image will be used.- Parameters:
showUnsetImage
- showUnsetImage Default value is IRA
-
getValueAsBoolean
Return the value of the checkbox as a Boolean. If the value is not already a boolean, or is unset and (@link com.smartgwt.client.widgets.form.fields.CheckboxItem#getAllowEmptyValue} returns true, then null will be returned.- Returns:
- value of this element
-