Package java.awt.event

Examples of java.awt.event.MouseAdapter


        connection_select_table.setShowGrid( false );
        // connection_select_table.setCellSelectionEnabled( true );
       
        // when we click on the speed selection table we see the down/up values below
        final JTable cst = connection_select_table;
        connection_select_table.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent evt) {
        // int col = cst.getSelectedColumn();
        int row = cst.getSelectedRow();
        String down_speed = (String)cst.getModel().getValueAt(row, 1);
        String up_speed = (String)cst.getModel().getValueAt(row, 2);
View Full Code Here


         
          udp_port.setEnabled( _config.isUDPEnabled() );
        }catch( Throwable cause ) {
          cause.printStackTrace();
        }
        disable_udp_port.addMouseListener(new MouseAdapter() {
             public void mouseClicked(MouseEvent evt) {
             if(disable_udp_port.isSelected()) udp_port.setEnabled(false);
             else udp_port.setEnabled(true);
          }
        });
View Full Code Here

                cmDelete.setEnabled(cmlist.getSelectedValue() != null);
                cmDuplicate.setEnabled(cmlist.getSelectedValue() != null);
                updateWarnings();
            }
        });
        cmlist.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                if (e.getClickCount() == 2) {
                    int index = cmlist.locationToIndex(e.getPoint());
                    ((ColorMapper) ColorMapper.colorMappers.get(index)).editDialog(DynamicColorPanel.this._owner);
                }
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

        web_site_label.setText("Web site :");

        jmule_org_label.setText("http://jmule.org");
       
        jmule_org_label.addMouseListener(new MouseAdapter() {
       public void mouseClicked(MouseEvent event) {
         BrowserLauncher.openURL(JMConstants.JMULE_WEB_SITE);
       }
       public void mouseEntered(MouseEvent event) {
         jmule_org_label.setForeground(Color.BLUE);
         setCursor( Cursor.getPredefinedCursor( Cursor.HAND_CURSOR ) );
       }
       public void mouseExited(MouseEvent event) {
         jmule_org_label.setForeground(Color.BLACK);
         setCursor( Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR ) );
       }
    });

        forums_label.setText("Forums  :");

        forum_jmule_org_label.setText("http://forum.jmule.org");
       
        forum_jmule_org_label.addMouseListener(new MouseAdapter() {
       public void mouseClicked(MouseEvent event) {
         BrowserLauncher.openURL(JMConstants.JMULE_FORUMS);
       }
       public void mouseEntered(MouseEvent event) {
         forum_jmule_org_label.setForeground(Color.BLUE);
View Full Code Here

                bdelete.setEnabled(cmlist.getSelectedValue() != null);
                bduplicate.setEnabled(cmlist.getSelectedValue() != null);
                updateWarnings();
            }
        });
        cmlist.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                if (e.getClickCount() == 2) {
                    int index = cmlist.locationToIndex(e.getPoint());
                    ((ImageMapper) ImageMapper.imageMappers.get(index))
                            .editDialog(ImagePropertiesPanel.this.getOwner());
View Full Code Here

      panel.removeMouseListener(listeners[1]);
    //}

    // adds our own MouseListener for opening
    // URL in applet context.
    panel.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent e) {
        if (e.getClickCount() == 1) {
          // the coord where the user has double-clicked
          int x = e.getX();
          int y = e.getY();
View Full Code Here

      {
        final JMenuItem openMenuItem = new JMenuItem();
        openMenuItem.setText("Open...");
        fileMenu.add(openMenuItem);
        openMenuItem.addMouseListener(
          new MouseAdapter()
          {
            @Override
            public void mousePressed(
              MouseEvent e
              )
            {showOpenFileDialog();}
          }
          );
        fileMenu.addSeparator();
        final JMenuItem exitMenuItem = new JMenuItem();
        exitMenuItem.setText("Exit");
        fileMenu.add(exitMenuItem);
        exitMenuItem.addMouseListener(
          new MouseAdapter()
          {
            @Override
            public void mousePressed(
              MouseEvent e
              )
View Full Code Here

      super();

      _popupMenu.setTextComponent(this);

      // Add mouse listener for displaying popup menu.
      addMouseListener(new MouseAdapter()
      {
         public void mousePressed(MouseEvent evt)
         {
            if (evt.isPopupTrigger())
            {
View Full Code Here

  * @return listener that listens on control's component
  * and implements fast forward semantics.
  */
    @Override
  protected EventListener createControlListener() {
  return new MouseAdapter() {
            private float   saveRate;
            private int     priorState;

    /* Stop the controller, set the new rate
    * and restart controller with "fast" rate.
View Full Code Here

TOP

Related Classes of java.awt.event.MouseAdapter

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.