Example usage for com.google.gwt.user.client.ui IsWidget asWidget

List of usage examples for com.google.gwt.user.client.ui IsWidget asWidget

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui IsWidget asWidget.

Prototype

Widget asWidget();

Source Link

Document

Returns the Widget aspect of the receiver.

Usage

From source file:cc.alcina.framework.gwt.client.stdlayout.MainTabPanel.java

License:Apache License

private HorizontalPanel createButtonsPanel() {
    HorizontalPanel hp = new HorizontalPanel();
    hp.setStyleName("alcina-MainMenuRight");
    hp.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
    for (IsWidget button : buttons) {
        if (button instanceof LoginStateVisibleWithWidget) {
            button.asWidget().ensureDebugId(((LoginStateVisibleWithWidget) button).getDebugId());
        }/*from  www  . j  a  va2  s  .  c o m*/
        hp.add(button);
        hp.add(new BarSep());
    }
    return hp;
}

From source file:cc.kune.chat.client.AvatarDecoratorImpl.java

License:GNU Affero Public License

@Override
public void setWidget(final IsWidget widget) {
    super.setWidget(widget);
    attachHandler = widget.asWidget().addAttachHandler(new Handler() {
        @Override// ww  w  .  java 2  s  .  c  o  m
        public void onAttachOrDetach(final AttachEvent event) {
            if (!event.isAttached()) {
                rosterHandler.removeHandler();
                sessionStateChangedHandler.removeHandler();
                attachHandler.removeHandler();
                presenceHandler.removeHandler();
            }
        }
    });
}

From source file:cc.kune.common.client.ui.DottedTabPanel.java

License:GNU Affero Public License

/**
 * Gets the widget index.//  w  w w  . j ava 2s  .  co m
 *
 * @param view the view
 * @return the widget index
 */
public int getWidgetIndex(final IsWidget view) {
    return tabPanel.getWidgetIndex(view.asWidget());
}

From source file:cc.kune.common.client.ui.DottedTabPanel.java

License:GNU Affero Public License

/**
 * Insert tab./*  w  ww.ja  v a2 s .co m*/
 *
 * @param view the view
 * @param tooltip the tooltip
 * @param beforeIndex the before index
 */
public void insertTab(final IsWidget view, final String tooltip, final int beforeIndex) {
    final DottedTab tab = new DottedTab();
    Tooltip.to(tab, tooltip);
    tabPanel.insert(view.asWidget(), tab, beforeIndex);
}

From source file:cc.kune.common.client.ui.DottedTabPanel.java

License:GNU Affero Public License

/**
 * Removes the tab./*from w  w w .j  a va 2 s . c o m*/
 *
 * @param view the view
 */
public void removeTab(final IsWidget view) {
    tabPanel.remove(view.asWidget());
}

From source file:cc.kune.common.client.ui.MaskWidget.java

License:GNU Affero Public License

@Override
public void mask(final IsWidget widget, final String message) {
    label.setText(message);//w w w  .  j  a  v a  2  s.co m
    setPopupPositionAndShow(new PositionCallback() {
        @Override
        public void setPosition(final int offsetWidth, final int offsetHeight) {
            final Widget asWidget = widget.asWidget();
            final int w = asWidget.getOffsetWidth();
            final int h = asWidget.getOffsetHeight();
            MaskWidget.this.setPopupPosition(asWidget.getAbsoluteLeft(), asWidget.getAbsoluteTop());
            getElement().getStyle().setWidth(w, Unit.PX);
            getElement().getStyle().setHeight(h, Unit.PX);
            flow.getElement().getStyle().setTop((h - flow.getOffsetHeight()) / 2d, Unit.PX);
            flow.getElement().getStyle().setLeft((w - flow.getOffsetWidth()) / 2d, Unit.PX);
        }
    });
}

From source file:com.acme.gwt.client.widget.TvGuideAppShell.java

License:Apache License

public void setWidget(IsWidget w) {
    setWidget(w.asWidget());
}

From source file:com.ait.ext4j.client.ui.Container.java

License:Apache License

public void add(IsWidget isWidget) {
    add(isWidget.asWidget());
}

From source file:com.ait.toolkit.sencha.touch.client.core.ComplexContainer.java

License:Open Source License

public void add(IsWidget widget) {
    add(widget.asWidget());
}

From source file:com.ait.toolkit.sencha.touch.client.core.ComplexContainer.java

License:Open Source License

public void remove(IsWidget widget) {
    remove(widget.asWidget());
}