Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.MouseListener


            this.imagesPanel.getCellFormatter().setWidth(0, index, maxSize+"px");
            this.imagesPanel.getCellFormatter().setHorizontalAlignment(0, index, HasHorizontalAlignment.ALIGN_CENTER);
            this.imagesPanel.setWidget( 0, index, this.images[i] );
           
           
            this.images[i].addMouseListener( new MouseListener(){
                final Timer t = new Timer(){
                    public void run() {
                        if( selectObject != selected ){
                            images[index].setHeight( (int) (baseHeight * maxScalar) );
                            images[index].setWidth( (int) (baseWidth * maxScalar) );
View Full Code Here


    final Monitor listenerMonitor = new Monitor(50);
    listener = new HTML("move" + " listener widget");
    listener.setSize("200px", "100px");
    listener.getElement().getStyle().setProperty("background", "#dedede");
    t.setWidget(1, 1, listener);
    listener.addMouseListener(new MouseListener() {

      public void onMouseDown(Widget sender, int x, int y) {
      }

      public void onMouseEnter(Widget sender) {
View Full Code Here

    textBox.addStyleName("textbox-error");

  }

  private void addMessageListener(final String text) {
    displayIcon.addMouseListener(new MouseListener() {

      public void onMouseDown(Widget sender, int x, int y) {
      }

      public void onMouseEnter(Widget sender) {
View Full Code Here

      DemoImageBundle.images.createAccount_disabled_212x89().applyTo(createAccountImage);
    } else {
      DemoImageBundle.images.createAccount_212x89().applyTo(createAccountImage);
      createAccountImage.setTitle("Create an Account");
      createAccountImage.setStyleName("genericImageButton");
      createAccountImage.addMouseListener(new MouseListener() {
        public void onMouseDown(Widget sender, int x, int y) {
        }

        public void onMouseEnter(Widget sender) {
          DemoImageBundle.images.createAccount_hover_212x89().applyTo(createAccountImage);
        }

        public void onMouseLeave(Widget sender) {
          DemoImageBundle.images.createAccount_212x89().applyTo(createAccountImage);
        }

        public void onMouseMove(Widget sender, int x, int y) {
        }

        public void onMouseUp(Widget sender, int x, int y) {
          DemoImageBundle.images.createAccount_212x89().applyTo(createAccountImage);
        }
      });
      createAccountImage.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          CreateNewAccountCommand cmd = new CreateNewAccountCommand();
          cmd.execute();
        }
      });
    }

    final Image uploadPhotosImage = new Image();
    if (user == null) {
      DemoImageBundle.images.uploadPhotos_disabled_189x89().applyTo(uploadPhotosImage);
    } else {
      DemoImageBundle.images.uploadPhotos_189x89().applyTo(uploadPhotosImage);
      uploadPhotosImage.setTitle("Upload Photos");
      uploadPhotosImage.setStyleName("genericImageButton");
      uploadPhotosImage.addMouseListener(new MouseListener() {
        public void onMouseDown(Widget sender, int x, int y) {
        }

        public void onMouseEnter(Widget sender) {
          DemoImageBundle.images.uploadPhotos_hover_189x89().applyTo(uploadPhotosImage);
        }

        public void onMouseLeave(Widget sender) {
          DemoImageBundle.images.uploadPhotos_189x89().applyTo(uploadPhotosImage);
        }

        public void onMouseMove(Widget sender, int x, int y) {
        }

        public void onMouseUp(Widget sender, int x, int y) {
          DemoImageBundle.images.uploadPhotos_189x89().applyTo(uploadPhotosImage);
        }
      });
    }
    uploadPhotosImage.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        final ColorPickerDialog picker = new ColorPickerDialog("00ff00");
        picker.center();
        picker.setCallback(new IDialogCallback() {
          public void cancelPressed() {
          }

          public void okPressed() {
            Window.alert(picker.getHexColor());
          }
        });
      }
    });

    final Image ratePhotosImage = new Image();
    DemoImageBundle.images.ratePhotos_172x89().applyTo(ratePhotosImage);
    ratePhotosImage.setTitle("Rate Photos");
    ratePhotosImage.setStyleName("genericImageButton");
    ratePhotosImage.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        MP3Player.getInstance().createSound("clong", GWT.getModuleBaseURL() + "sounds/clong.mp3");
        MP3Player.getInstance().playSound("clong");
      }
    });
    ratePhotosImage.addMouseListener(new MouseListener() {
      public void onMouseDown(Widget sender, int x, int y) {
      }

      public void onMouseEnter(Widget sender) {
        DemoImageBundle.images.ratePhotos_hover_172x89().applyTo(ratePhotosImage);
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.MouseListener

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.