use of com.google.gwt.user.client.ui.HasEnabled in project ovirt-engine by oVirt.
the class AbstractUiCommandButton method updateButton.
protected void updateButton() {
Widget widget = getButtonWidget();
widget.setVisible(command.getIsAvailable() && command.getIsVisible());
if (widget instanceof HasEnabled) {
((HasEnabled) widget).setEnabled(command.getIsExecutionAllowed());
}
String label = getLabel();
if (command.getTitle() == null) {
// $NON-NLS-1$
setLabel("");
} else if (label != null && label.equals("")) {
// $NON-NLS-1$
setLabel(command.getTitle());
}
}
use of com.google.gwt.user.client.ui.HasEnabled in project ovirt-engine by oVirt.
the class EntityModelWidgetWithInfo method setEnabled.
@Override
public void setEnabled(boolean enabled) {
label.setEnabled(enabled);
if (contentWidget instanceof HasEnabled) {
HasEnabled enableableWidget = (HasEnabled) this.contentWidget;
enableableWidget.setEnabled(enabled);
}
}
Aggregations