Search in sources :

Example 11 with Widget

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;
}
Also used : Widget(com.google.gwt.user.client.ui.Widget)

Example 12 with Widget

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);
}
Also used : Widget(com.google.gwt.user.client.ui.Widget)

Example 13 with Widget

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;
            }
        }
    }
}
Also used : Widget(com.google.gwt.user.client.ui.Widget) MessageInfo(com.google.gerrit.client.info.ChangeInfo.MessageInfo)

Example 14 with Widget

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();
}
Also used : Widget(com.google.gwt.user.client.ui.Widget) Style(com.google.gwt.dom.client.Style)

Example 15 with Widget

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());
}
Also used : KeyDownEvent(com.google.gwt.event.dom.client.KeyDownEvent) KeyDownHandler(com.google.gwt.event.dom.client.KeyDownHandler) CanFocus(org.rstudio.core.client.widget.CanFocus) Widget(com.google.gwt.user.client.ui.Widget) Focusable(com.google.gwt.user.client.ui.Focusable)

Aggregations

Widget (com.google.gwt.user.client.ui.Widget)110 Test (org.junit.Test)22 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)12 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)12 ListBox (org.gwtbootstrap3.client.ui.ListBox)8 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)7 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)7 Command (com.google.gwt.user.client.Command)7 HTML (com.google.gwt.user.client.ui.HTML)7 IsWidget (com.google.gwt.user.client.ui.IsWidget)7 Image (com.google.gwt.user.client.ui.Image)6 TextBox (org.gwtbootstrap3.client.ui.TextBox)5 FixedRatioWidget (org.rstudio.core.client.widget.FixedRatioWidget)5 PreWidget (org.rstudio.core.client.widget.PreWidget)5 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)4 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)4 Label (com.google.gwt.user.client.ui.Label)4 FactPattern (org.drools.workbench.models.datamodel.rule.FactPattern)4 FromAccumulateCompositeFactPattern (org.drools.workbench.models.datamodel.rule.FromAccumulateCompositeFactPattern)4 FromCollectCompositeFactPattern (org.drools.workbench.models.datamodel.rule.FromCollectCompositeFactPattern)4