Package java.awt.event

Examples of java.awt.event.MouseMotionListener


  }

  public void buildPanel() {
    initComponents();

    addMouseMotionListener(new MouseMotionListener() {

      public void mouseDragged(MouseEvent e) {
        setLocation(e.getXOnScreen(), e.getYOnScreen());
      }
View Full Code Here


                public void mousePressed(MouseEvent e) {
                    pressX = e.getX();
                    pressY = e.getY();
                }
            });
            textArea.addMouseMotionListener(new MouseMotionListener() {
                public void mouseDragged(MouseEvent e) {
                    setLocation(getLocation().x + (e.getX() - pressX), getLocation().y + (e.getY() - pressY));
                }

                public void mouseMoved(MouseEvent e) {
View Full Code Here

            @Override
            public void mouseReleased(MouseEvent e) {
            }
        });

        addMouseMotionListener(new MouseMotionListener() {

            @Override
            public void mouseDragged(MouseEvent e) {
                Point p = SwingUtilities.getRoot(((JFrame) e.getSource())).getLocation();
View Full Code Here

        points.add(newPoint);
        pointsChanged();
        repaint();
      }
    });
    addMouseMotionListener(new MouseMotionListener() {
      public void mouseDragged (MouseEvent event) {
        if (movingIndex == -1) return;
        float nextX = movingIndex == points.size() - 1 ? maxX : points.get(movingIndex + 1).x - 0.001f;
        if (movingIndex == 0) nextX = 0;
        float prevX = movingIndex == 0 ? 0 : points.get(movingIndex - 1).x + 0.001f;
View Full Code Here

  }

  private void initInteraction() {
    final Point previousPoint = new Point();

    imageComponent.addMouseMotionListener(new MouseMotionListener() {
      @Override
      public void mouseDragged(MouseEvent e) {
        int dx = previousPoint.x - e.getX();
        int dy = previousPoint.y - e.getY();
View Full Code Here

      }
    });

    // Tooltip on hover
    this.addMouseMotionListener(new MouseMotionListener() {

      @SuppressWarnings("rawtypes")
      @Override
      public void mouseMoved(final MouseEvent evt) {
        // System.out.println(e);
View Full Code Here

                selectedTable = getTableAt(index);
                playlistManager.setVisiblePlaylist(selectedTable.getPlaylist());
            }
        });

        tabbedPane.addMouseMotionListener(new MouseMotionListener() {
            @Override
            public void mouseDragged(MouseEvent e) {
                dragTo = tabbedPane.indexAtLocation(e.getX(), e.getY());
                repaint();
            }
View Full Code Here

      public void mouseClicked(MouseEvent arg0) {
        canvas.clearCanvas();
      }
    });

    canvas.addMouseMotionListener(new MouseMotionListener() {

      @Override
      public void mouseMoved(MouseEvent arg0) {
        // TODO Auto-generated method stub
View Full Code Here

    Image image = toolkit.getImage("images/Brush.png");
    Cursor c = toolkit.createCustomCursor(image,
        new Point(paintCanvas.getX(), paintCanvas.getY()), "img");
    paintCanvas.setCursor(c);

    paintCanvas.addMouseMotionListener(new MouseMotionListener() {

      @Override
      public void mouseMoved(MouseEvent arg0) {
      }
View Full Code Here

        actionsList.clearSelection();
      }
      }
    }
    });
    actionsList.addMouseMotionListener(new MouseMotionListener() {
    @Override
    public void mouseDragged(MouseEvent e) {}

    @Override
    public void mouseMoved(MouseEvent e) {
View Full Code Here

TOP

Related Classes of java.awt.event.MouseMotionListener

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.