예제 #1
0
 private void setEnabledButton(boolean b) {
   if (button != null) {
     // HasEnabled is only available after gwt-2.1.x
     if (button instanceof HasEnabled) {
       ((HasEnabled) button).setEnabled(b);
     } else if (button instanceof Button) {
       ((Button) button).setEnabled(b);
     }
   }
 }
  private void toggleEnabled(T value, V widget) {
    setButtonsEnabled(widget, enabled);
    if (widget instanceof HasEnabled) {
      ((HasEnabled) widget).setEnabled(enabled);
    }

    if (enabled
        && isGhost(
            value)) { // if entry is enabled, it still might need to be rendered as a ghost entry
      toggleGhost(value, widget, true);
    }
  }