Package java.awt.event

Examples of java.awt.event.MouseListener


      final JButton button = (JButton) widget.getRealWidget();
      button.setBorder(emptyBorder);
      button.setForeground(backgroundColor);
      button.setBackground(backgroundColor);
      button.setUI(new BasicButtonUI());
      button.addMouseListener(new MouseListener() {

        public void mouseClicked(MouseEvent e) {
        }

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


    setTransferHandler(new SourceTransferHandler());
    setDragEnabled(true);

    setCellRenderer(createRenderer());

    MouseListener ml = new MouseAdapter() {
      public void mousePressed(MouseEvent e) {
        JComponent c = (JComponent)e.getSource();
        if (c != SourceTree.this) return;
        TreePath path = getPathForLocation(e.getX(), e.getY());
        if ((e.getModifiers() & MouseEvent.BUTTON3_MASK) == MouseEvent.BUTTON3_MASK) {
View Full Code Here

                    }
                } 
            }
           
        });
        MouseListener ml = new MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                if (e.getButton() == MouseEvent.BUTTON3) {
                    // show popup menu
                    TreePath selPath = getPathForLocation(e.getX(), e.getY());
                    AbstractNode n;
View Full Code Here

        b.add( new JLabel( DemoApp.getRes().getString("Demo Application for the Java Service Wrapper" ) ) );
        b.add( new JLabel( "By Tanuki Software Ltd." ) );
        final JLabel url = new JLabel();
        url.setText( "<html><u>http://wrapper.tanukisoftware.com</u></html>" );
        url.setForeground( Color.BLUE );
        url.addMouseListener( new MouseListener()
        {

            public void mouseReleased( MouseEvent e )
            {
                // TODO Auto-generated method stub
View Full Code Here

     * (non-Javadoc)
     *
     * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
     */
    public void mouseClicked(MouseEvent e) {
        MouseListener node = getNode(e);
        if (node != null) {
            node.mouseClicked(e);
        }
    }
View Full Code Here

            node.mouseClicked(e);
        }
    }

    public void mousePressed(MouseEvent e) {
        MouseListener node = getNode(e);
        if (node != null) {
            node.mousePressed(e);
        }
    }
View Full Code Here

            node.mousePressed(e);
        }
    }

    public void mouseReleased(MouseEvent e) {
        MouseListener node = getNode(e);
        if (node != null) {
            node.mouseReleased(e);
        }
    }
View Full Code Here

        /** Constructor */
        public GanttDialogDateDay(GanttCalendar date, GanttLanguage language) {
            this.date = date;
            this.language = language;
            MouseListener ml = new MouseAdapter() {
                public void mousePressed(MouseEvent e) {
                    clickFunction(e.getX(), e.getY());
                }
            };
            this.addMouseListener(ml);
View Full Code Here

        this.setBackground(new Color(0.0f, 0.0f, 0.0f));
        applyComponentOrientation(lang.getComponentOrientation());

        table.addKeyListener(prj); // callback for keyboard pressed
        // Add listener for mouse click
        MouseListener ml = new MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                TreePath selPath = table.getTreeTable().getPathForLocation(
                        e.getX(), e.getY());
                table.getTreeTable().getTree().setSelectionPath(selPath);
                handlePopupTrigger(e);
View Full Code Here

        super.focusGained(e);
        mySelectionManager.setUserInputConsumer(this);
      }
        });
        // A listener on mouse click (menu)
        MouseListener ml = new MouseAdapter() {

            public void mouseReleased(MouseEvent e) {
                handlePopupTrigger(e);
            }
View Full Code Here

TOP

Related Classes of java.awt.event.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.