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

public class CheckboxItem extends FormItem
Checkbox form item, implemented with customizable checkbox images.
  • Constructor Details

    • CheckboxItem

      public CheckboxItem()
    • CheckboxItem

      public CheckboxItem(JavaScriptObject jsObj)
    • CheckboxItem

      public CheckboxItem(String name)
    • CheckboxItem

      public CheckboxItem(String name, String title)
  • Method Details

    • getOrCreateRef

      public static CheckboxItem getOrCreateRef(JavaScriptObject jsObj)
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, Canvas defaults)
      Changes the defaults for Canvas AutoChildren named autoChildName.
      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, see SGWTProperties.
      See Also:
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, FormItem defaults)
      Changes the defaults for FormItem AutoChildren named autoChildName.
      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, see SGWTProperties.
      See Also:
    • changePickerIconDefaults

      public static void changePickerIconDefaults(FormItemIcon defaults)
    • setAllowEmptyValue

      public CheckboxItem setAllowEmptyValue(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 - New allowEmptyValue value. Default value is false
      Returns:
      CheckboxItem instance, for chaining setter calls
    • getAllowEmptyValue

      public 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:
      Current allowEmptyValue value. Default value is false
    • setBooleanBaseStyle

      public CheckboxItem setBooleanBaseStyle(String booleanBaseStyle)
      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

      public String 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

      public CheckboxItem setCheckedDescription(String checkedDescription)
      The description shown in a hover when FormItem.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

      public String getCheckedDescription()
      The description shown in a hover when FormItem.showOldValueInHover is enabled and a value represents the checked state.
      Returns:
      Current checkedDescription value. Default value is "checked"
      See Also:
    • setCheckedImage

      public CheckboxItem setCheckedImage(String checkedImage)
      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 as valueIconWidth

      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 extension

      The special value "blank" means that no image will be shown.

      Spriting can be used for this image, by setting this property to a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle 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

      public String 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 as valueIconWidth

      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 extension

      The special value "blank" means that no image will be shown.

      Spriting can be used for this image, by setting this property to a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle property to provide a "checked" appearance.

      Returns:
      Current checkedImage value. Default value is "[SKIN]/DynamicForm/checked.gif"
      See Also:
    • getDefaultValue

      public Boolean getDefaultValue()
      Overridden to assign class-appropriate type.
      Overrides:
      getDefaultValue in class FormItem
      Returns:
      Current defaultValue value. Default value is null
      See Also:
    • setEditProxyConstructor

      public CheckboxItem setEditProxyConstructor(String editProxyConstructor)
      Default class used to construct the EditProxy for this component when the component is first placed into edit mode.
      Overrides:
      setEditProxyConstructor in class FormItem
      Parameters:
      editProxyConstructor - New editProxyConstructor value. Default value is "CheckboxItemEditProxy"
      Returns:
      CheckboxItem instance, for chaining setter calls
      See Also:
    • getEditProxyConstructor

      public String getEditProxyConstructor()
      Default class used to construct the EditProxy for this component when the component is first placed into edit mode.
      Overrides:
      getEditProxyConstructor in class FormItem
      Returns:
      Current editProxyConstructor value. Default value is "CheckboxItemEditProxy"
      See Also:
    • setLabelAsTitle

      public CheckboxItem setLabelAsTitle(Boolean labelAsTitle)
      By default a checkboxItem sets showTitle:true, and so takes up two cells with the default TitleOrientation of "left" (see form layout\n overview). However, the title cell is left blank by default, and the title specified by FormItem.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 - New labelAsTitle value. Default value is null
      Returns:
      CheckboxItem instance, for chaining setter calls
    • getLabelAsTitle

      public Boolean getLabelAsTitle()
      By default a checkboxItem sets showTitle:true, and so takes up two cells with the default TitleOrientation of "left" (see form layout\n overview). However, the title cell is left blank by default, and the title specified by FormItem.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:
      Current labelAsTitle value. Default value is null
    • setPartialSelectedDescription

      public CheckboxItem setPartialSelectedDescription(String partialSelectedDescription)
      The description shown in a hover when FormItem.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

      public String getPartialSelectedDescription()
      The description shown in a hover when FormItem.showOldValueInHover is enabled and a value represents the partial selected state.
      Returns:
      Current partialSelectedDescription value. Default value is "partially selected"
      See Also:
    • setPartialSelectedImage

      public CheckboxItem setPartialSelectedImage(String partialSelectedImage)
      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 a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle 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

      public String 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 a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle property to provide a "partially checked" appearance.

      Returns:
      Current partialSelectedImage value. Default value is "[SKIN]/DynamicForm/partialcheck.gif"
      See Also:
    • setPrintBooleanBaseStyle

      public CheckboxItem setPrintBooleanBaseStyle(String printBooleanBaseStyle)
      If set, the booleanBaseStyle to use when printing.

      Note : This is an advanced setting

      Parameters:
      printBooleanBaseStyle - New printBooleanBaseStyle value. Default value is null
      Returns:
      CheckboxItem instance, for chaining setter calls
      See Also:
    • getPrintBooleanBaseStyle

      public String getPrintBooleanBaseStyle()
      If set, the booleanBaseStyle to use when printing.
      Returns:
      Current printBooleanBaseStyle value. Default value is null
      See Also:
    • setPrintCheckedImage

      public CheckboxItem setPrintCheckedImage(String printCheckedImage)
      If set, the checkedImage to use when printing.
      Parameters:
      printCheckedImage - New printCheckedImage value. Default value is null
      Returns:
      CheckboxItem instance, for chaining setter calls
      See Also:
    • getPrintCheckedImage

      public String getPrintCheckedImage()
      If set, the checkedImage to use when printing.
      Returns:
      Current printCheckedImage value. Default value is null
      See Also:
    • setPrintPartialSelectedImage

      public CheckboxItem setPrintPartialSelectedImage(String printPartialSelectedImage)
      If set, the partialSelectedImage to use when printing.
      Parameters:
      printPartialSelectedImage - New printPartialSelectedImage value. Default value is null
      Returns:
      CheckboxItem instance, for chaining setter calls
      See Also:
    • getPrintPartialSelectedImage

      public String getPrintPartialSelectedImage()
      If set, the partialSelectedImage to use when printing.
      Returns:
      Current printPartialSelectedImage value. Default value is null
      See Also:
    • setPrintUncheckedImage

      public CheckboxItem setPrintUncheckedImage(String printUncheckedImage)
      If set, the uncheckedImage to use when printing.
      Parameters:
      printUncheckedImage - New printUncheckedImage value. Default value is null
      Returns:
      CheckboxItem instance, for chaining setter calls
      See Also:
    • getPrintUncheckedImage

      public String getPrintUncheckedImage()
      If set, the uncheckedImage to use when printing.
      Returns:
      Current printUncheckedImage value. Default value is null
      See Also:
    • setPrintUnsetImage

      public CheckboxItem setPrintUnsetImage(String printUnsetImage)
      If set, the unsetImage to use when printing.
      Parameters:
      printUnsetImage - New printUnsetImage value. Default value is null
      Returns:
      CheckboxItem instance, for chaining setter calls
      See Also:
    • getPrintUnsetImage

      public String getPrintUnsetImage()
      If set, the unsetImage to use when printing.
      Returns:
      Current printUnsetImage value. Default value is null
      See Also:
    • setShowLabel

      public CheckboxItem setShowLabel(Boolean showLabel)
      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

      public Boolean getShowLabel()
      Should we show the label text next to the checkbox item.
      Returns:
      Current showLabel value. Default value is true
    • setShowNullAsTrue

      public CheckboxItem setShowNullAsTrue(Boolean showNullAsTrue)
      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

      public Boolean getShowNullAsTrue()
      Should a null value be shown as checked (i.e. true)?
      Returns:
      Current showNullAsTrue value. Default value is false
    • setShowNullAsTrueIf

      public CheckboxItem 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. 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

      public String 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

      public CheckboxItem setShowTitle(Boolean showTitle)
      CheckboxItem has special behavior for titles, see labelAsTitle.
      Overrides:
      setShowTitle in class FormItem
      Parameters:
      showTitle - New showTitle value. Default value is true
      Returns:
      CheckboxItem instance, for chaining setter calls
    • getShowTitle

      public Boolean getShowTitle()
      CheckboxItem has special behavior for titles, see labelAsTitle.
      Overrides:
      getShowTitle in class FormItem
      Returns:
      Current showTitle value. Default value is true
    • setShowValueIconDisabled

      public CheckboxItem setShowValueIconDisabled(Boolean showValueIconDisabled)
      Should a "Disabled" state icon be shown when the item is disabled

      Note : This is an advanced setting

      Parameters:
      showValueIconDisabled - New showValueIconDisabled value. Default value is true
      Returns:
      CheckboxItem instance, for chaining setter calls
    • getShowValueIconDisabled

      public Boolean getShowValueIconDisabled()
      Should a "Disabled" state icon be shown when the item is disabled
      Returns:
      Current showValueIconDisabled value. Default value is true
    • setShowValueIconDown

      public CheckboxItem setShowValueIconDown(Boolean showValueIconDown)
      Should a "Down" state icon be shown when the mouse goes down over this checkbox

      Note : This is an advanced setting

      Parameters:
      showValueIconDown - New showValueIconDown value. Default value is true
      Returns:
      CheckboxItem instance, for chaining setter calls
    • getShowValueIconDown

      public Boolean 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

      public CheckboxItem setShowValueIconError(Boolean showValueIconError)
      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 as Over or Disabled, 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

      public Boolean 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 as Over or Disabled, 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

      public CheckboxItem setShowValueIconOver(Boolean showValueIconOver)
      Should an "Over" state icon be shown when the user rolls over this checkbox

      Note : This is an advanced setting

      Parameters:
      showValueIconOver - New showValueIconOver value. Default value is true
      Returns:
      CheckboxItem instance, for chaining setter calls
    • getShowValueIconOver

      public Boolean getShowValueIconOver()
      Should an "Over" state icon be shown when the user rolls over this checkbox
      Returns:
      Current showValueIconOver value. Default value is true
    • setSizeToCheckboxImage

      public CheckboxItem setSizeToCheckboxImage(boolean sizeToCheckboxImage)
      If this checkbox item is not showing a label, should it ignore any specified FormItem.width and instead size to fit its checkbox 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 is not showing a label, should it ignore any specified FormItem.width and instead size to fit its checkbox 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

      public CheckboxItem setTextBoxStyle(String textBoxStyle)
      Base CSS class for this item's title text
      Overrides:
      setTextBoxStyle in class FormItem
      Parameters:
      textBoxStyle - New textBoxStyle value. Default value is "labelAnchor"
      Returns:
      CheckboxItem instance, for chaining setter calls
      See Also:
    • getTextBoxStyle

      public String getTextBoxStyle()
      Base CSS class for this item's title text
      Overrides:
      getTextBoxStyle in class FormItem
      Returns:
      Current textBoxStyle value. Default value is "labelAnchor"
      See Also:
    • setTitleStyle

      public CheckboxItem setTitleStyle(String titleStyle)
      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, use textBoxStyle instead.

      Overrides:
      setTitleStyle in class FormItem
      Parameters:
      titleStyle - New titleStyle value. Default value is null
      Returns:
      CheckboxItem instance, for chaining setter calls
      See Also:
    • getTitleStyle

      public String 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, use textBoxStyle instead.

      Overrides:
      getTitleStyle in class FormItem
      Returns:
      Current titleStyle value. Default value is null
      See Also:
    • setUncheckedDescription

      public CheckboxItem setUncheckedDescription(String uncheckedDescription)
      The description shown in a hover when FormItem.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

      public String getUncheckedDescription()
      The description shown in a hover when FormItem.showOldValueInHover is enabled and a value represents the unchecked state.
      Returns:
      Current uncheckedDescription value. Default value is "unchecked"
      See Also:
    • setUncheckedImage

      public CheckboxItem setUncheckedImage(String uncheckedImage)
      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 a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle 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

      public String 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 a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle property to provide an "unchecked" appearance.

      Returns:
      Current uncheckedImage value. Default value is "[SKIN]/DynamicForm/unchecked.gif"
      See Also:
    • setUnsetDescription

      public CheckboxItem setUnsetDescription(String unsetDescription)
      The description shown in a hover when FormItem.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

      public String getUnsetDescription()
      The description shown in a hover when FormItem.showOldValueInHover is enabled and a value represents the unset state.
      Returns:
      Current unsetDescription value. Default value is "unset"
      See Also:
    • setUnsetImage

      public CheckboxItem setUnsetImage(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.

      The special value "blank" means that no image will be shown.

      Spriting can be used for this image, by setting this property to a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle 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

      public 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.

      The special value "blank" means that no image will be shown.

      Spriting can be used for this image, by setting this property to a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle property to provide an "unset" appearance.

      Returns:
      Current unsetImage value. Default value is "[SKIN]/DynamicForm/unsetcheck.gif"
      See Also:
    • setWidth

      public CheckboxItem setWidth(int width)
      Width for the CheckboxItem, including both checkbox image and label. Note that if showLabel is false, this property will have no effect - the item will render at the size required to contain the icon.
      Overrides:
      setWidth in class FormItem
      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 and label. Note that if showLabel is false, this property will have no effect - the item will render at the size required to contain the icon.
      Overrides:
      getWidth in class FormItem
      Returns:
      Current width value. Default value is 150
      See Also:
    • pendingStatusChanged

      public boolean pendingStatusChanged(DynamicForm form, FormItem item, boolean pendingStatus, Object newValue, Object value)
      Notification method called when showPending 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. Returning false will cancel this default behavior.

      Parameters:
      form - the managing DynamicForm 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 to DynamicForm.resetValues().
      Returns:
      false to cancel the default behavior.
    • setDefaultProperties

      public static void setDefaultProperties(CheckboxItem checkboxItemProperties)
      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

      public void setShowUnsetImage(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
    • getValueAsBoolean

      public Boolean 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