Example usage for com.google.gwt.user.client.ui Widget fireEvent

List of usage examples for com.google.gwt.user.client.ui Widget fireEvent

Introduction

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

Prototype

@Override
    public void fireEvent(GwtEvent<?> event) 

Source Link

Usage

From source file:com.qualogy.qafe.mgwt.client.ui.component.ComponentHelper.java

License:Apache License

public static void fireDataChange(Widget widget, Object newData, Object oldData) {
    DataChangeEvent event = new DataChangeEvent(widget, newData, oldData);
    widget.fireEvent(event);
}

From source file:com.qualogy.qafe.mgwt.client.ui.component.ComponentHelper.java

License:Apache License

public static void fireScrollBottom(Widget widget) {
    ScrollBottomEvent event = new ScrollBottomEvent(widget);
    widget.fireEvent(event);
}

From source file:eu.nextstreet.gwt.components.client.ui.widget.suggest.impl.table.SimpleTableRowItemRenderer.java

License:Apache License

@Override
public void fireEvent(GwtEvent<?> event) {
    for (Widget widget : this) {
        // FIXME maybe should optimize
        widget.fireEvent(event);
    }//w w  w. ja va  2s. c o  m
}

From source file:org.jbpm.form.builder.ng.model.common.handler.EventHelper.java

License:Apache License

protected static void onRightClickEvent(final Widget widget, Event event) {
    switch (DOM.eventGetType(event)) {
    case Event.ONMOUSEUP:
        event.stopPropagation();//ww  w.ja v  a  2 s .  com
        event.preventDefault();
        if (DOM.eventGetButton(event) == Event.BUTTON_LEFT) {
            ClickEvent cevent = new ClickEvent() {
                @Override
                public Object getSource() {
                    return widget;
                }
            };
            cevent.setNativeEvent(event);
            widget.fireEvent(cevent);
        } else if (DOM.eventGetButton(event) == Event.BUTTON_RIGHT) {
            List<RightClickHandler> rclickHandlers = RCLICK_HANDLERS.get(widget);
            if (rclickHandlers != null) {
                RightClickEvent rcevent = new RightClickEvent(event);
                for (RightClickHandler handler : rclickHandlers) {
                    handler.onRightClick(rcevent);
                }
            }
        }
        break;
    case Event.ONDBLCLICK:
        event.stopPropagation();
        event.preventDefault();
        break;
    case Event.ONCONTEXTMENU:
        event.stopPropagation();
        event.preventDefault();
        break;
    default:
        //Do nothing
    }//end switch
}

From source file:org.kuali.student.common.ui.client.widgets.list.SelectionChangeEvent.java

License:Educational Community License

/**
  * Used to fire a SelectionChangeEvent/*from w  w w.j  a  v  a 2 s . com*/
  * 
  */
public static void fire(Widget source) {
    if (TYPE != null) {
        SelectionChangeEvent event = new SelectionChangeEvent(source);
        source.fireEvent(event);

    }
}

From source file:org.kuali.student.common.ui.client.widgets.list.SelectionChangeEvent.java

License:Educational Community License

/**
  * Used to fire a SelectionChangeEvent//www  .ja v a2  s  . c  om
  * 
  */
public static void fire(Widget source, boolean userInitiated) {
    if (TYPE != null) {
        SelectionChangeEvent event = new SelectionChangeEvent(source);
        event.setUserInitiated(userInitiated);
        source.fireEvent(event);

    }
}

From source file:org.talend.mdm.webapp.browserecords.client.widget.BreadCrumbBar.java

License:Open Source License

public void adjust() {
    if (isAttached()) {
        Iterator<Widget> iter = crumbBar.iterator();
        while (iter.hasNext()) {
            Widget w = iter.next();
            w.setVisible(true);//from  ww w  .j a v  a  2 s .co  m
        }
        menu.removeAll();

        int index = 0;
        Element parent = this.getElement().getParentElement().cast();
        while (this.getElement().getOffsetWidth() > parent.getOffsetWidth()) {
            final Widget w = crumbBar.getWidget(index);
            w.setVisible(false);
            MenuItem item = new MenuItem(w.getElement().getAttribute("titleText")); //$NON-NLS-1$
            item.addSelectionListener(new SelectionListener<MenuEvent>() {

                public void componentSelected(MenuEvent ce) {
                    w.fireEvent(new ClickEvent() {
                    });
                }
            });
            menu.insert(item, 0);
            index++;
        }
        if (index > 0) {
            more.setVisible(true);
        } else {
            more.setVisible(false);
        }
    }
}

From source file:org.thechiselgroup.biomixer.client.dnd.DragProxyUtils.java

License:Apache License

private static void fireEventOnWidgetAndParents(Widget w, GwtEvent<?> event) {
    while (w != null) {
        w.fireEvent(event);
        w = w.getParent();/*  w w  w. j  a va 2 s  .co  m*/
    }
}