Package com.google.gwt.user.client

Examples of com.google.gwt.user.client.EventListener


    public DefaultMapItem(VisualItem visualItem, LatLng point) {
        this.visualItem = visualItem;

        overlay = new DefaultOverlay(point, getRadius(), getColor(),
                getBorderColor(), getZIndex(), new EventListener() {
                    @Override
                    public void onBrowserEvent(Event event) {
                        // prevent standard map drag on item
                        if (event.getTypeInt() == Event.ONMOUSEDOWN) {
                            event.stopPropagation();
View Full Code Here


    private void registerListeners(String elementID) {
        Element element = DOM.getElementById(elementID);

        DOM.sinkEvents(element, Event.MOUSEEVENTS | Event.ONCLICK);
        DOM.setEventListener(element, new EventListener() {
            @Override
            public void onBrowserEvent(Event event) {
                visualItem.reportInteraction(new VisualItemInteraction(event));
            }
        });
View Full Code Here

    }

    public void init(TextItemLabel label) {
        this.label = label;

        label.registerHandler(new EventListener() {
            @Override
            public void onBrowserEvent(Event event) {
                visualItem.reportInteraction(new VisualItemInteraction(event));
            }
        });
View Full Code Here

                    }
                }, MouseOutEvent.getType());

        final Element lock = DOM.getElementById("lock");

        DOM.setEventListener(lock, new EventListener() {

            @Override
            public void onBrowserEvent(Event event) {

                if (flag) {
View Full Code Here

            innerDiv.getStyle().setMarginLeft((icon.getWidth() / 2) * -1,
                    Unit.PX);

            // Setup event handling
            DOM.setEventListener(icon.getElement(),
                    new EventListener() {

                        public void onBrowserEvent(Event event) {
                            if (event.getType().equals("click")) {
                                setIconImage(grid.getGridWidget().toggleMerging());
                            }
View Full Code Here

  private final EventListener originalEventListener;

  public ElementBinding(final StyleBindingsRegistry registery, final Element element) {
    this.element = element;
    this.originalEventListener = DOM.getEventListener(element);
    this.newListener = new EventListener() {
      @Override
      public void onBrowserEvent(Event event) {
        if (event.getTypeInt() == Event.ONCHANGE) {
          registery.updateStyles();
        }
View Full Code Here

     */
    public static <T> T findWidget(Element element,
            Class<? extends Widget> class1) {
        if (element != null) {
            /* First seek for the first EventListener (~Widget) from dom */
            EventListener eventListener = null;
            while (eventListener == null && element != null) {
                eventListener = Event.getEventListener(element);
                if (eventListener == null) {
                    element = (Element) element.getParentElement();
                }
View Full Code Here

    preview.setAutoHide(false);
    el.addEventsSunk(Event.ONMOUSEDOWN | Event.ONMOUSEOUT | Event.ONMOUSEOVER);
  }

  public void doAttach() {
    DOM.setEventListener(el.dom, new EventListener() {
      public void onBrowserEvent(Event event) {
        switch (event.getTypeInt()) {
          case Event.ONMOUSEDOWN:
            event.stopPropagation();
            event.preventDefault();
View Full Code Here

  private final EventListener originalEventListener;

  public ElementBinding(final StyleBindingsRegistry registery, final Element element) {
    this.element = element;
    this.originalEventListener = DOM.getEventListener(element);
    this.newListener = new EventListener() {
      @Override
      public void onBrowserEvent(Event event) {
        if (event.getTypeInt() == Event.ONCHANGE) {
          registery.updateStyles();
        }
View Full Code Here

     */
    public static <T> T findWidget(Element element,
            Class<? extends Widget> class1) {
        if (element != null) {
            /* First seek for the first EventListener (~Widget) from dom */
            EventListener eventListener = null;
            while (eventListener == null && element != null) {
                eventListener = Event.getEventListener(element);
                if (eventListener == null) {
                    element = (Element) element.getParentElement();
                }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.EventListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.