/** * Determines whether this check box is currently checked. * * @return <code>true</code> if the check box is checked * @deprecated Use {@link #getValue} instead */ @Deprecated public boolean isChecked() { // Funny comparison b/c getValue could in theory return null return getValue() == true; }
@Override public void onClick(ClickEvent event) { // Checkboxes always toggle their value, no need to compare // with old value. Radio buttons are not so lucky, see // overrides in RadioButton ValueChangeEvent.fire(CheckBox.this, getValue()); } });
/** * 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 <code>inputElem</code>. */ @Override protected void onUnload() { // Clear out the inputElem's event listener (breaking the circular // reference between it and the widget). DOM.setEventListener(inputElem, null); setValue(getValue()); }
/** * Checks or unchecks the check box, firing {@link ValueChangeEvent} if * appropriate. * <p> * Note that this <em>does not</em> set the value property of the checkbox * input element wrapped by this widget. For access to that property, see * {@link #setFormValue(String)} * * @param value true to check, false to uncheck; null value implies false * @param fireEvents If true, and value has changed, fire a * {@link ValueChangeEvent} */ @Override public void setValue(Boolean value, boolean fireEvents) { if (value == null) { value = Boolean.FALSE; } Boolean oldValue = getValue(); inputElem.setChecked(value); inputElem.setDefaultChecked(value); if (value.equals(oldValue)) { return; } if (fireEvents) { ValueChangeEvent.fire(this, value); } }
/** {@inheritDoc} */ @Override public boolean isUpdateMarkDeprecated() { return updateMarkDeprecated.getValue(); }
/** {@inheritDoc} */ @Override public boolean isUpdated() { return update.getValue(); }
/** {@inheritDoc} */ @Override public boolean isOverwriteFileSelected() { return overwrite.getValue(); }
/** {@inheritDoc} */ @Override public boolean isUpdateReferences() { return updateReferences.getValue(); }
/** * Determines whether this check box is currently checked. * * @return <code>true</code> if the check box is checked * @deprecated Use {@link #getValue} instead */ @Deprecated public boolean isChecked() { // Funny comparison b/c getValue could in theory return null return getValue() == true; }
boolean checked = getValue(); boolean enabled = isEnabled(); String formValue = getFormValue();
/** * Verifies that the actual {@link CheckBox} is not checked. * * @return this assertion object. * @throws AssertionError if the actual {@link CheckBox} is checked. * @see CheckBox#getValue() */ public S isNotChecked() { if (actual.getValue()) failWithMessage("should not be checked"); return myself; }
@Override public void onClick(ClickEvent event) { // Checkboxes always toggle their value, no need to compare // with old value. Radio buttons are not so lucky, see // overrides in RadioButton ValueChangeEvent.fire(CheckBox.this, getValue()); } });
/** * {@inheritDoc} */ public Object getNewValue() { return getCheckBox().getValue(); } }
@Override public void onClick(ClickEvent event) { if(check.getValue()) { Cookies.setCookie(PageableNodeList.COOKIE, "true", new Date(new Date().getTime() + 86400000)); } } });
@Override public void onClick(ClickEvent event) { // Checkboxes always toggle their value, no need to compare // with old value. Radio buttons are not so lucky, see // overrides in RadioButton ValueChangeEvent.fire(CheckBox.this, getValue()); } });
/** * 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 <code>inputElem</code>. */ @Override protected void onUnload() { // Clear out the inputElem's event listener (breaking the circular // reference between it and the widget). DOM.setEventListener(inputElem, null); setValue(getValue()); }
@Override public boolean isSync() { if (optionsToShowConfiguration.isShowSyncOption()) { return syncCheckBox.getValue(); } return super.isSync(); }
/** * 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 <code>inputElem</code>. */ @Override protected void onUnload() { // Clear out the inputElem's event listener (breaking the circular // reference between it and the widget). DOM.setEventListener(inputElem, null); setValue(getValue()); }
@Override public void onClick(ClickEvent event) { if (box.getValue()) { getDataTable().selectAllRows(); } else { getDataTable().deselectAllRows(); } } });