Checkbox

A org.uqbar.arena.widgets.CheckBox is a selectable control that allows the user to make a binary choice.

Bindings

A checkbox must bind its property value (boolean): when checked it has a true value, when unchecked a false one.

 <br />[]

It inherits the following properties from Control:

  • enabled, visible & background (bindables)
  • height / width (manually configured)

Example

// Xtend
new CheckBox(form) => [
    enabled <=> "marriable"
    value <=> "married"
]

// Java
CheckBox checkMarried = new CheckBox(form);
checkResumen.bindEnabledToProperty("marriable");
checkResumen.bindValueToProperty("married");
  • model: a Person with 2 methods boolean getMarriable() (perhaps the person should have a certain age) and boolean getMarried()
  • checkbox will be selectable if the person can marry someone, and value will bind property married of a person (getMarried() / setMarried() methods)