jewl
Class CheckBox

java.lang.Object
  extended byjewl.Window
      extended byjewl.Control
          extended byjewl.TextControl
              extended byjewl.BooleanControl
                  extended byjewl.CheckBox

public class CheckBox
extends BooleanControl

A control containing a box which can be checked or unchecked. Like other Boolean controls, the program can get or set the state of the checkbox (checked or unchecked) and the text associated with it.

A CheckBox will call any registered event listeners if the control changes state.


Field Summary
 
Fields inherited from class jewl.TextControl
CENTER, CENTRE, LEFT, RIGHT
 
Constructor Summary
CheckBox(Container parent, int left, int top, int width, int height, java.lang.String text)
          Construct a new checkbox.
 
Methods inherited from class jewl.BooleanControl
getState, setState, toggle
 
Methods inherited from class jewl.TextControl
getAlignment, getText, setAlignment, setKey, setText
 
Methods inherited from class jewl.Control
disable, enable, enable, getToolTip, isEnabled, setToolTip
 
Methods inherited from class jewl.Window
addEventListener, commandAvailable, getCommand, getFont, getHeight, getID, getLeft, getScreenHeight, getScreenWidth, getSource, getTop, getWidth, hide, init, isVisible, nextCommand, parent, root, setFont, setID, setLocation, setSize, show, show
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckBox

public CheckBox(Container parent,
                int left,
                int top,
                int width,
                int height,
                java.lang.String text)
Construct a new checkbox. The box will be unchecked initially. Use setState() to set its state explicitly.

Parameters:
parent - the checkbox's parent window.
left - the position of the left edge of the checkbox relative to its parent. If this is negative, it is taken to be relative to the right edge of the parent window. If the parent window is resized, the checkbox will be moved to maintain the same relative position.
top - the position of the top edge of the checkbox relative to its parent. If this is negative, it is taken to be relative to the bottom edge of the parent window. If the parent window is resized, the checkbox will be moved to maintain the same relative position.
width - the width of the checkbox. If this is zero or negative, it is taken to be relative to the width of the parent window. If the parent window is resized, the checkbox will be resized to maintain the same relative width.
height - the height of the checkbox. If this is zero or negative, it is taken to be relative to the height of the parent window. If the parent window is resized, the checkbox will be resized to maintain the same relative height.
text - the initial text displayed by the checkbox.
See Also:
BooleanControl.setState(boolean)