Package java.awt.event

Examples of java.awt.event.MouseMotionListener


      public void windowClosed(WindowEvent e) {
        FrameworkLauncher.stopSimulation();
      }
    });
   
    this.world.addMouseMotionListener(new MouseMotionListener() {
      public void mouseDragged(MouseEvent e) {
        setMouseTarget(new Point2d(e.getX(), e.getY()));
      }
      public void mouseMoved(MouseEvent e) {
        setMouseTarget(new Point2d(e.getX(), e.getY()));
View Full Code Here


            }
          }
        }
      }
    });
      text.addMouseMotionListener(new MouseMotionListener()
    {
      public void mouseMoved(MouseEvent e)
      {
        int location = text.viewToModel(e.getPoint());
        StyledDocument doc = (StyledDocument) text.getDocument();
View Full Code Here

                    drug = false;
            }

        });

        addMouseMotionListener(new MouseMotionListener() {
            @Override
            public void mouseDragged(MouseEvent e) {
                if (drug) {
                    _xsh = _xsh + (_mouseX - scrToMapX(e.getX()));
                    _ysh = _ysh + (_mouseY - scrToMapY(e.getY()));
View Full Code Here

      public void mouseReleased(MouseEvent event) {
        GraphCanvas.this.mouseReleased(event);
      }
    });

    this.panel.addMouseMotionListener(new MouseMotionListener() {

      public void mouseDragged(MouseEvent event) {
        GraphCanvas.this.mouseDragged(event);
      }
View Full Code Here

                GraphCanvas.this.mouseReleased(event);
                notifyListeners(new GraphCanvasEvent(GraphCanvasEvent.GraphCanvasEventType.WORKFLOW_CHANGED, GraphCanvas.this, GraphCanvas.this.workflow));
            }
        });

        this.panel.addMouseMotionListener(new MouseMotionListener() {

            public void mouseDragged(MouseEvent event) {
                GraphCanvas.this.mouseDragged(event);
            }
View Full Code Here

    JEditorPane jepane = new JEditorPane();
    JFrame testFrame =  new JFrame("test Frame");

    public testEditorPane() {
        testFrame.setSize(500, 500);
        jepane.addMouseMotionListener(new MouseMotionListener() {

            public void mouseDragged(MouseEvent e) {
                throw new UnsupportedOperationException("Not supported yet.");
            }
View Full Code Here

            public String doInBackground() {
                if (mouseMotionListeners != null) {
                    e.setSource(this);
                    ListIterator<MouseMotionListener> iter = mouseMotionListeners.listIterator();
                    while (iter.hasNext()) {
                        MouseMotionListener listener = iter.next();

                        switch (e.getID()) {
                            case MouseEvent.MOUSE_MOVED:
                                listener.mouseMoved(e);
                                break;
                            case MouseEvent.MOUSE_DRAGGED:
                                listener.mouseDragged(e);
                                break;
                            default:
                                break;
                        }
                    }
View Full Code Here

    public void notifyMouseMotionListeners(MouseEvent e) {
        if (mouseMotionListeners != null) {
            e.setSource(this);
            ListIterator<MouseMotionListener> iter = mouseMotionListeners.listIterator();
            while (iter.hasNext()) {
                MouseMotionListener listener = iter.next();

                switch (e.getID()) {
                    case MouseEvent.MOUSE_MOVED:
                        listener.mouseMoved(e);
                        break;
                    case MouseEvent.MOUSE_DRAGGED:
                        listener.mouseDragged(e);
                        break;
                    default:
                        break;
                }
            }
View Full Code Here

                GraphCanvas.this.mouseReleased(event);
                notifyListeners(new GraphCanvasEvent(GraphCanvasEvent.GraphCanvasEventType.WORKFLOW_CHANGED, GraphCanvas.this, GraphCanvas.this.workflow));
            }
        });

        this.panel.addMouseMotionListener(new MouseMotionListener() {

            public void mouseDragged(MouseEvent event) {
                GraphCanvas.this.mouseDragged(event);
            }
View Full Code Here

    final Arrow arrow = new Arrow();
    frame.add(arrow, BorderLayout.CENTER);
    frame.setSize(640, 480);
    frame.setResizable(false);
    frame.setVisible(true);
    frame.getContentPane().addMouseMotionListener(new MouseMotionListener() {
      public void mouseMoved (MouseEvent e) {
        arrow.setArrowLocation(320, 240, e.getX(), e.getY());
      }

      public void mouseDragged (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.