com.google.gwt.user.client.ui.CheckBox.getValue()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(162)

本文整理了Java中com.google.gwt.user.client.ui.CheckBox.getValue()方法的一些代码示例,展示了CheckBox.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CheckBox.getValue()方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.CheckBox
类名称:CheckBox
方法名:getValue

CheckBox.getValue介绍

[英]Determines whether this check box is currently checked.

Note that this does not return the value property of the checkbox input element wrapped by this widget. For access to that property, see #getFormValue()
[中]确定当前是否选中此复选框。
请注意,此返回此小部件包装的复选框输入元素的value属性。要访问该属性,请参见#getFormValue()

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * 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;
}

代码示例来源:origin: com.google.gwt/gwt-servlet

@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());
 }
});

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * 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());
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * 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);
 }
}

代码示例来源:origin: org.eclipse.che.plugin/che-plugin-java-ext-lang-client

/** {@inheritDoc} */
@Override
public boolean isUpdateMarkDeprecated() {
 return updateMarkDeprecated.getValue();
}

代码示例来源:origin: org.eclipse.che.plugin/che-plugin-git-ext-git

/** {@inheritDoc} */
@Override
public boolean isUpdated() {
 return update.getValue();
}

代码示例来源:origin: org.eagle-i/eagle-i-search-gwt

private boolean isTypeSelectionValid() {
  final boolean ips = ipsCheckBox.getValue();
  final boolean pc = primaryCellCheckBox.getValue();
  return ( ips || pc );
}

代码示例来源:origin: org.eclipse.che.core/che-core-ide-app

/** {@inheritDoc} */
@Override
public boolean isOverwriteFileSelected() {
 return overwrite.getValue();
}

代码示例来源:origin: org.eclipse.che.plugin/che-plugin-java-ext-lang-client

/** {@inheritDoc} */
@Override
public boolean isUpdateReferences() {
 return updateReferences.getValue();
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * 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;
}

代码示例来源:origin: com.google.gwt/gwt-servlet

boolean checked = getValue();
boolean enabled = isEnabled();
String formValue = getFormValue();

代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils

/**
 * 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;
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

@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());
 }
});

代码示例来源:origin: net.sf.advanced-gwt/advanced-gwt

/**
   * {@inheritDoc}
   */
  public Object getNewValue() {
    return getCheckBox().getValue();
  }
}

代码示例来源:origin: org.opennms.features/org.opennms.features.node-page-list

@Override
  public void onClick(ClickEvent event) {
    if(check.getValue()) {
      Cookies.setCookie(PageableNodeList.COOKIE, "true", new Date(new Date().getTime() + 86400000));
    }
    
  }
});

代码示例来源:origin: net.wetheinter/gwt-user

@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());
 }
});

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * 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());
}

代码示例来源:origin: org.geomajas.plugin/geomajas-client-gwt2-plugin-print-impl

@Override
public boolean isSync() {
  if (optionsToShowConfiguration.isShowSyncOption()) {
    return syncCheckBox.getValue();
  }
  return super.isSync();
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * 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());
}

代码示例来源:origin: sk.seges.acris/acris-widgets-beantable

@Override
  public void onClick(ClickEvent event) {
    if (box.getValue()) {
      getDataTable().selectAllRows();
    } else {
      getDataTable().deselectAllRows();
    }
  }
});

相关文章