use of com.google.gwt.user.client.ui.Widget in project opentsdb by OpenTSDB.
the class QueryUi method addAllMetrics.
private boolean addAllMetrics(final StringBuilder url) {
boolean found_metric = false;
for (final Widget widget : metrics) {
if (!(widget instanceof MetricForm)) {
continue;
}
final MetricForm metric = (MetricForm) widget;
found_metric |= metric.buildQueryString(url);
}
if (!found_metric) {
graphstatus.setText("Please specify a metric.");
}
return found_metric;
}
use of com.google.gwt.user.client.ui.Widget in project gerrit by GerritCodeReview.
the class LinkMenuBar method add.
public void add(final Widget i) {
if (body.getWidgetCount() > 0) {
final Widget p = body.getWidget(body.getWidgetCount() - 1);
p.addStyleName(Gerrit.RESOURCES.css().linkMenuItemNotLast());
}
body.add(i);
}
use of com.google.gwt.user.client.ui.Widget in project gerrit by GerritCodeReview.
the class History method autoOpen.
private void autoOpen(Timestamp lastReply) {
if (lastReply == null) {
for (Widget child : getChildren()) {
((Message) child).autoOpen();
}
} else {
for (int i = getChildren().size() - 1; i >= 0; i--) {
Message ui = (Message) getChildren().get(i);
MessageInfo msg = ui.getMessageInfo();
if (lastReply.compareTo(msg.date()) < 0) {
ui.autoOpen();
} else {
break;
}
}
}
}
use of com.google.gwt.user.client.ui.Widget in project rstudio by rstudio.
the class FadeOutAnimation method onComplete.
@Override
protected void onComplete() {
for (Widget w : widgets_) {
Style style = w.getElement().getStyle();
style.setDisplay(Style.Display.NONE);
style.setOpacity(1.0);
}
if (callback_ != null)
callback_.execute();
}
use of com.google.gwt.user.client.ui.Widget in project rstudio by rstudio.
the class FocusTransitionManager method register.
private void register(final Widget widget) {
if (registration_.contains(widget))
return;
registration_.add(widget);
widget.addDomHandler(new KeyDownHandler() {
@Override
public void onKeyDown(KeyDownEvent event) {
if (event.getNativeKeyCode() == KeyCodes.KEY_TAB) {
boolean forward = !event.isShiftKeyDown();
Widget target = get(widget, forward);
if (target == null)
return;
if (target instanceof CanFocus) {
event.stopPropagation();
event.preventDefault();
focus((CanFocus) target);
} else if (target instanceof Focusable) {
event.stopPropagation();
event.preventDefault();
focus((Focusable) target);
}
}
}
}, KeyDownEvent.getType());
}
Aggregations