to.etc.domui.component.misc
Class DisplayCheckbox

java.lang.Object
  extended by to.etc.domui.dom.css.CssBase
      extended by to.etc.domui.dom.html.NodeBase
          extended by to.etc.domui.dom.html.Img
              extended by to.etc.domui.component.misc.DisplayCheckbox
All Implemented Interfaces:
IModelBinding, IBindable, INodeErrorDelegate, IDisplayControl<java.lang.Boolean>

public class DisplayCheckbox
extends Img
implements IDisplayControl<java.lang.Boolean>, IBindable

Display-only checkbox which renders better than a disabled checkbox thingy.

Author:
Frits Jalvingh Created on Apr 9, 2010

Constructor Summary
DisplayCheckbox()
           
 
Method Summary
 IBinder bind()
          Return the binder for this control.
 java.lang.Boolean getValue()
          Returns the current value of this input component.
 boolean isBound()
          Returns T if this control is bound to some data value.
 boolean isChecked()
           
 void setChecked(boolean on)
           
 void setValue(java.lang.Boolean v)
          Set a new value into this control.
 
Methods inherited from class to.etc.domui.dom.html.Img
getAlign, getAlt, getImgBorder, getImgHeight, getImgWidth, getSrc, setAlign, setAlt, setImgBorder, setImgHeight, setImgWidth, setSrc, setSrc, visit
 
Methods inherited from class to.etc.domui.dom.html.NodeBase
$, acceptRequestParameter, addCssClass, addGlobalMessage, afterCreateContent, appendAfterMe, appendBeforeMe, appendCreateJS, appendJavascript, build, changed, clearFocusRequested, clearGlobalMessage, clearGlobalMessage, clearGlobalMessage, clearMessage, componentHandleWebAction, createContent, findComponentBundle, forceRebuild, getActualID, getClicked, getComponentBundle, getCreateJS, getCssClass, getErrorDelegate, getErrorLocation, getMessage, getOnClickJS, getOnMouseDownJS, getPage, getParent, getParent, getParent, getSharedContext, getSpecialAttribute, getSpecialAttributeList, getTag, getTestID, getTitle, getUserObject, handleDrop, hasCssClass, hasError, internalClearDelta, internalClearDeltaFully, internalGetOldParent, internalHasChangedAttributes, internalNeedClickHandler, internalOnClicked, internalSetHasChangedAttributes, internalSetHasChangedAttributes, internalSetTag, internalShelve, internalUnshelve, isBuilt, isFocusRequested, moveControlToModel, moveModelToControl, onAddedToPage, onBeforeFullRender, onForceRebuild, onHeaderContributors, onRefresh, onRemoveFromPage, onShelve, onUnshelve, refresh, remove, removeCssClass, renderJavascriptState, replaceWith, setClicked, setComponentBundle, setControlsEnabled, setCssClass, setErrorDelegate, setErrorLocation, setFocus, setMessage, setOnClickJS, setOnMouseDownJS, setSpecialAttribute, setTestID, setTitle, setUserObject, stretchHeight, toString
 
Methods inherited from class to.etc.domui.dom.css.CssBase
getBackgroundAttachment, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorderBottomColor, getBorderBottomStyle, getBorderBottomWidth, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderTopColor, getBorderTopStyle, getBorderTopWidth, getBottom, getCachedStyle, getClear, getColor, getDisplay, getFloat, getFontFamily, getFontSize, getFontSizeAdjust, getFontStyle, getFontVariant, getFontWeight, getHeight, getLeft, getLineHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOverflow, getPosition, getRight, getTextAlign, getTop, getTransform, getVerticalAlign, getVisibility, getWidth, getZIndex, internalSetDisplay, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorder, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setBottom, setBottom, setCachedStyle, setClear, setColor, setDisplay, setFloat, setFontFamily, setFontSize, setFontSizeAdjust, setFontStyle, setFontVariant, setFontWeight, setHeight, setLeft, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPosition, setRight, setRight, setTextAlign, setTop, setTop, setTransform, setVerticalAlign, setVisibility, setWidth, setZIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface to.etc.domui.dom.html.IDisplayControl
setTestID
 

Constructor Detail

DisplayCheckbox

public DisplayCheckbox()
Method Detail

getValue

public java.lang.Boolean getValue()
Description copied from interface: IDisplayControl
Returns the current value of this input component. If the component contains no value this returns null. All text input components will return null when their value is the empty string! If the component, during conversion or validation of the input value, discovers that the input is invalid it will set itself in "error" mode, post an error message up the form, and throw a ValidationException. This means that this call either delivers correct input (as defined by it's converter and validators), null (when empty) or throws an exception. When a ValidationException occurs the framework mostly ignores it - it does not produce a stacktrace or error in the client. Instead the resulting error as posted by the error handling framework gets displayed on the form when the request completes.

To get the value of a component while ignoring exceptions call #getValueSafe().

Specified by:
getValue in interface IDisplayControl<java.lang.Boolean>
Returns:
See Also:
IDisplayControl.getValue()

setValue

public void setValue(java.lang.Boolean v)
Description copied from interface: IDisplayControl
Set a new value into this control. Setting a value to null means the control holds no value. This value is converted to a presentable form using any (implicitly) defined converters; it will not be validated though! This means that if you set an invalid value for a validator this will not be seen until the value is gotten from the control again.

Specified by:
setValue in interface IDisplayControl<java.lang.Boolean>

setChecked

public void setChecked(boolean on)

isChecked

public boolean isChecked()

bind

@Nonnull
public IBinder bind()
Return the binder for this control.

Specified by:
bind in interface IBindable
Returns:
See Also:
IBindable.bind()

isBound

public boolean isBound()
Returns T if this control is bound to some data value.

Specified by:
isBound in interface IBindable
Returns:
See Also:
IBindable.isBound()