Package java.awt.event

Examples of java.awt.event.MouseMotionListener


      }
    };
   
    addMouseListener(ml);

    MouseMotionListener mml = new MouseMotionAdapter() {
      public void mouseMoved(MouseEvent e) {
        JComponent c = (JComponent)e.getSource();
        if (c != SourceTree.this) return;
        TreePath path = getPathForLocation(e.getX(), e.getY());
        if (path!=null) {
View Full Code Here


        // pressedGraphicalNodes = new ArrayList();
        // xClickedOffsets = new ArrayList();
        // yClickedOffsets = new ArrayList();
        this.setBackground(Color.WHITE.brighter());

        this.addMouseMotionListener(new MouseMotionListener() {
            public void mouseDragged(final MouseEvent e) {
                if (myPressedGraphicalNode != null) {
                    myPressedGraphicalNode.x = e.getX() - myXClickedOffset;
                    myPressedGraphicalNode.y = e.getY() - myYClickedOffset;
                    if (e.getX() > getPreferredSize().getWidth()) {
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

   
    initGUI();
  }
 
  private void initGUI() {
    addMouseMotionListener(new MouseMotionListener() {
      public void mouseMoved(MouseEvent e) {
        int[] pos = pixelToPosition(new int[] { e.getX(), e.getY() });
        if (pos != null) {
          parent.showText(pos[0], pos[1]);
        }
View Full Code Here

        column.setPreferredWidth(40);

        msgTableScrollPane = new JScrollPane(msgTable);
        msgTableScrollPane.setAutoscrolls(true);

        MouseMotionListener doScrollRectToVisible = new MouseMotionAdapter() {
                public void mouseDragged(MouseEvent e) {
                    Rectangle r = new Rectangle(e.getX(), e.getY(), 1, 1);
                    ((JScrollBar) e.getSource()).scrollRectToVisible(r);

                    int maxHeight = msgTable.getVisibleRect().height;
View Full Code Here

        selectedEntityPositionAtMouseDown = null;
        updateGUI();
      }
    });

    mainPanel.addMouseMotionListener(new MouseMotionListener() {
      public void mouseDragged(MouseEvent e) {
        //                if (selectedEntity != null) {
        //          //TODO: Add mouse moving
        //                    //selectedEntity.setLocationInLayout(selectedEntityPositionAtMouseDown.x + dx, selectedEntityPositionAtMouseDown.y + dy);
        //                    updateGUI();
View Full Code Here

                    popup.show(e.getComponent(), e.getX(), e.getY());
                }
            }
        });

        resultsTable.addMouseMotionListener(new MouseMotionListener() {
            public void mouseMoved(MouseEvent e) {
                int row = resultsTable.rowAtPoint(e.getPoint());
                int column = resultsTable.columnAtPoint(e.getPoint());
                if (row > -1 && resultsTable.getColumnClass(column) == ObjectIdImpl.class) {
                    resultsTable.setCursor(HAND_CURSOR);
View Full Code Here

                public void mouseExited(MouseEvent event) {
                    printEvent(event);
                }
            });
            label.addMouseMotionListener(new MouseMotionListener() {
                public void mouseDragged(MouseEvent event) {
                    printEvent(event);
                }

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

    add(actionsPanel,Util.setConstrains(0,2,6,1,100,20));
    add(subscriptionPanel,Util.setConstrains(0,3,6,1,100,5));
    showActionPanel(false);
    showSubscriptionPanel(false);
        
        table.addMouseMotionListener(new MouseMotionListener(){
           private final Cursor handCursor = new Cursor(Cursor.HAND_CURSOR);
          
           public void mouseDragged(MouseEvent e) {}
           public void mouseMoved(MouseEvent e) {
                String link = getDataLink(e.getPoint());
View Full Code Here

    private int[] colors;

    public ImagePane(ThebaGUI f) {
        this.control = f;
        generateColorTable();
        addMouseMotionListener(new MouseMotionListener() {
            public void mouseDragged(MouseEvent e) {
            }

            public void mouseMoved(MouseEvent e) {
                control.setPointerLabel(e.getPoint());
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.