the name shown in a label next to the checkbox
function that returns the current target state
function to change the target state
Optional
checkBox: HTMLInputElementthe checkbox to use; if not provided, then a checkbox and label are created.
Private
getter_function that returns the current target state
function that returns the current target state
Private
label_the name shown in a label next to the checkbox
Private
setter_function to change the target state
function to change the target state
Private
state_The state of the user control (which might not match the state of the target)
Returns the checked state of this control (which should match the target state if observe is being called).
the checked state of this control
Private
handleNotifies this Observer that a change has occurred in the Subject.
contains information about what has changed in the Subject: typically either a one-time GenericEvent, or a change to the value of a Parameter
Returns a minimal string representation of this object, usually giving just identity information like the class name and name of the object.
For an object whose main purpose is to represent another Printable object, it is
recommended to include the result of calling toStringShort
on that other object.
For example, calling toStringShort()
on a DisplayShape might return something like
this:
DisplayShape{polygon:Polygon{'chain3'}}
a minimal string representation of this object.
Generated using TypeDoc
A checkbox input element which synchronizes with a target boolean value by executing specified
getter
andsetter
functions.Because this is an Observer, you can connect it to a Subject; when the Subject broadcasts events, the observe method ensures that this control reflects the current target value.