Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.user.client.ui
Class SimpleCheckBox

    java.lang.Object
      com.google.gwt.user.client.ui.UIObject
          com.google.gwt.user.client.ui.Widget
              com.google.gwt.user.client.ui.FocusWidget
                  com.google.gwt.user.client.ui.SimpleCheckBox

All Implemented Interfaces:
  HasAllFocusHandlers, HasAllKeyHandlers, HasAllMouseHandlers, HasBlurHandlers, HasClickHandlers, HasFocusHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasHandlers, EventListener, Focusable, HasFocus, HasName, SourcesClickEvents, SourcesFocusEvents, SourcesKeyboardEvents, SourcesMouseEvents

Direct Known Subclasses:
  SimpleRadioButton

    public class SimpleCheckBox

extends FocusWidget
implements HasName

A simple checkbox widget, with no label.

### CSS Style Rules

- .gwt-SimpleCheckBox { }
- .gwt-SimpleCheckBox-disabled { Applied when checkbox is disabled }

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
`UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled`

Field Summary

Fields inherited from class com.google.gwt.user.client.ui.UIObject
`DEBUG_ID_PREFIX`

Constructor Summary
`` | `SimpleCheckBox()` Creates a new simple checkbox.
`protected` | `SimpleCheckBox(Element element)` This constructor may be used by subclasses to explicitly use an existing element.

Method Summary
`java.lang.String` | `getName()` Gets the widget's name.
`boolean` | `isChecked()` Determines whether this check box is currently checked.
`protected void` | `onUnload()` This method is called when a widget is detached from the browser's document.
`void` | `setChecked(boolean checked)` Checks or unchecks this check box.
`void` | `setEnabled(boolean enabled)` Sets whether this widget is enabled.
`void` | `setName(java.lang.String name)` Sets the widget's name.
`static SimpleCheckBox` | `wrap(Element element)` Creates a SimpleCheckBox widget that wraps an existing <input type='checkbox'> element.

Methods inherited from class com.google.gwt.user.client.ui.FocusWidget
`addBlurHandler, addClickHandler, addClickListener, addFocusHandler, addFocusListener, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, getFocusImpl, getTabIndex, isEnabled, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setElement, setFocus, setTabIndex`

Methods inherited from class com.google.gwt.user.client.ui.Widget
`addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, removeFromParent, sinkEvents`

Methods inherited from class com.google.gwt.user.client.ui.UIObject
`addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.google.gwt.event.shared.HasHandlers
`fireEvent`

Methods inherited from interface com.google.gwt.event.shared.HasHandlers
`fireEvent`

Methods inherited from interface com.google.gwt.event.shared.HasHandlers
`fireEvent`

Methods inherited from interface com.google.gwt.event.shared.HasHandlers
`fireEvent`

Methods inherited from interface com.google.gwt.event.shared.HasHandlers
`fireEvent`

Methods inherited from interface com.google.gwt.event.shared.HasHandlers
`fireEvent`

Methods inherited from interface com.google.gwt.event.shared.HasHandlers
`fireEvent`

Methods inherited from interface com.google.gwt.event.shared.HasHandlers
`fireEvent`

Methods inherited from interface com.google.gwt.event.shared.HasHandlers
`fireEvent`

Methods inherited from interface com.google.gwt.event.shared.HasHandlers
`fireEvent`

Methods inherited from interface com.google.gwt.event.shared.HasHandlers
`fireEvent`

Methods inherited from interface com.google.gwt.event.shared.HasHandlers
`fireEvent`

Constructor Detail

### SimpleCheckBox

    public SimpleCheckBox()

  Creates a new simple checkbox.

### SimpleCheckBox

    protected SimpleCheckBox(Element element)

  This constructor may be used by subclasses to explicitly use an existing element. This element must be an <input> element whose type is either 'checkbox'.

  Parameters:
    `element` - the element to be used

Method Detail

### wrap

    public static SimpleCheckBox wrap(Element element)

  Creates a SimpleCheckBox widget that wraps an existing <input type='checkbox'> element. This element must already be attached to the document. If the element is removed from the document, you must call `RootPanel.detachNow(Widget)`.

  Parameters:
    `element` - the element to be wrapped

### getName

    public java.lang.String getName()

  Description copied from interface: `HasName`
  Gets the widget's name.

  Specified by:
    `getName` in interface `HasName`
  Returns:
    the widget's name

### isChecked

    public boolean isChecked()

  Determines whether this check box is currently checked.

  Returns:
    `true` if the check box is checked

### setChecked

    public void setChecked(boolean checked)

  Checks or unchecks this check box.

  Parameters:
    `checked` - `true` to check the check box

### setEnabled

    public void setEnabled(boolean enabled)

  Description copied from class: `FocusWidget`
  Sets whether this widget is enabled.

  Overrides:
    `setEnabled` in class `FocusWidget`
  Parameters:
    `enabled` - `true` to enable the widget, `false` to disable it

### setName

    public void setName(java.lang.String name)

  Description copied from interface: `HasName`
  Sets the widget's name.

  Specified by:
    `setName` in interface `HasName`
  Parameters:
    `name` - the widget's new name

### onUnload

    protected void onUnload()

  This method is called when a widget is detached from the browser's document. Overridden because of IE bug that throws away checked state and in order to clear the event listener off of the `inputElem`.

  Overrides:
    `onUnload` in class `Widget`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD