Package java.awt.event

Examples of java.awt.event.MouseListener


            public void mouseMoved(MouseEvent e) {
                // nothing to do...
            }
        });

        this.addMouseListener(new MouseListener() {
            public void mouseClicked(MouseEvent arg0) {
                // nothing to do...
            }

            public void mouseEntered(MouseEvent arg0) {
View Full Code Here


    popup.add(_exitWrapperItem);
    popup.add(_startServiceItem);
    popup.add(_exitItem);
    popup.validate();

    ti.addMouseListener(new MouseListener()
    {

      public void mouseClicked(MouseEvent e)
      {
        popup.show(e.getComponent(), e.getX() - popup.getWidth(), e.getY() - popup.getHeight());
View Full Code Here

            }
        };
        list.setCellRenderer(renderer);

        //List click
        MouseListener mouseListener = new MouseAdapter() {

            @Override
            public void mouseClicked(MouseEvent e) {
                if (SwingUtilities.isLeftMouseButton(e)) {
                    int index = list.locationToIndex(e.getPoint());
View Full Code Here

    installListeners();
  }

  private void installListeners()
  {
    MouseListener colorMouseListener = new MouseAdapter()
    {
      @Override
      public void mouseEntered(MouseEvent e)
      {
        JComponent parent = (JComponent) e.getSource();
View Full Code Here

    /**
     * Derived classes must call this after their component is initialized
     * to switch on help updates.
     */
    void addHelpListeners() {
        MouseListener listener = new MouseAdapter() {
            public void mouseEntered(MouseEvent event) {
                String text = getHelp(event);
                if (requiresRestart()) {
                    text += "  " + LOCALE.get("PreferencesRestartMessage");
                }
View Full Code Here

        } else if (c == KeyEvent.VK_ENTER) {

        }
      }
    });
    final MouseListener mouseListener = new MouseAdapter() {

      @Override
      public void mouseClicked(final MouseEvent mouseEvent) {

        final int index = displayList.locationToIndex(mouseEvent
View Full Code Here

   
    //*******************************
    //code to handle copy and paste
    //from embeded terminal
    //*******************************
    terminal.addMouseListener(new MouseListener() {
      public void mouseClicked(MouseEvent me) {
        //make sure it only does the paste on button2(right mouse)
        if (me.getButton() == me.BUTTON3 && clipboard != null) {
          paste(clipboard);
        }
View Full Code Here

  /*
   * doppelter Mausklick fuegt ausgewähltes Wort ein
   */
  public void handleMouseKlicks() {
    this.jl.addMouseListener(new MouseListener() {
      @Override
      public void mouseReleased(final MouseEvent e) {
        JTextPanePreparer.this.textPane.requestFocusInWindow();
      }

View Full Code Here

    g.drawImage(img, 0, 0, null);
  }
 
  public void addActionListener(ActionListener listener) {
    this.listener = listener;
    this.addMouseListener(new MouseListener() {
      @Override
      public void mouseReleased(MouseEvent e) {
      }
     
      @Override
View Full Code Here

      precedent = new JButton("Précédent");   
      this.photosDisponibles.addAll(photosDisponibles);
  
     
     
      suivant.addMouseListener(new MouseListener() {
     
      @Override
      public void mouseReleased(MouseEvent arg0) {}
     
      @Override
      public void mousePressed(MouseEvent arg0) {}
     
      @Override
      public void mouseExited(MouseEvent arg0) {}
     
      @Override
      public void mouseEntered(MouseEvent arg0) {}
     
      @Override
      public void mouseClicked(MouseEvent arg0) {
        if(indexCourant == (getNbPhotosDisponibles()-1))
        {
          indexCourant = 0;
          indexAffiche = 1;
         
          getImageByIndex(indexCourant);
        }
        else
        {
          indexCourant++;
          indexAffiche++;
         
          getImageByIndex(indexCourant);
         
        }
       
        }
    });
     
      precedent.addMouseListener(new MouseListener() {
     
      @Override
      public void mouseReleased(MouseEvent arg0) {}
     
      @Override
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.