Package java.awt.event

Examples of java.awt.event.MouseAdapter


        JPanel panel = (JPanel) getContentPane();
        panel.setLayout(new BorderLayout());

        messageLabel.addMouseListener(
            new MouseAdapter() {
                public void mouseClicked(MouseEvent e) {
                    if (focusWindow != null) {
                        focusWindow.setVisible(false);
                        focusWindow.setVisible(true);
                        if(focusWindow instanceof JFrame) ((JFrame)focusWindow).setExtendedState(JFrame.NORMAL);
View Full Code Here


    // handle mouse events for double-click creation of popup dialog.
    // This happens only in the JTextField, not the JTextArea, so we can
    // make this an inner class within this method rather than a separate
    // inner class as is done with the KeyTextHandler class.
    //
    ((RestorableJTextField)_textComponent).addMouseListener(new MouseAdapter()
    {
      public void mousePressed(MouseEvent evt)
      {
        if (evt.getClickCount() == 2)
        {
View Full Code Here

      *    setSurrendersFocusOnKeystroke(true);
      * This should help handle some problems with navigation using tab & return
      * to move through cells.
      */

      addMouseListener(new MouseAdapter()
      {
        public void mousePressed(MouseEvent e)
        {
          _dragBeginPoint = e.getPoint();
        }
View Full Code Here

      _tablePopupMenu = new TablePopupMenu(allowUpdate, updateableObject,
        DataSetViewerTablePanel.this);
      _tablePopupMenu.setTable(this);

         addMouseListener(new MouseAdapter()
         {
            public void mousePressed(MouseEvent evt)
            {
               onMousePressed(evt, false);
            }

            public void mouseReleased(MouseEvent evt)
            {
               onMouseReleased(evt);
            }
         });

         getTableHeader().addMouseListener(new MouseAdapter()
         {
            public void mousePressed(MouseEvent evt)
            {
               onMousePressed(evt, true);
            }
View Full Code Here

        // handle mouse events for double-click creation of popup dialog.
        // This happens only in the JTextField, not the JTextArea, so we can
        // make this an inner class within this method rather than a separate
        // inner class as is done with the KeyTextHandler class.
        //
        _textField.addMouseListener(new MouseAdapter()
        {
            public void mousePressed(MouseEvent evt)
            {
                if (evt.getClickCount() == 2)
                {
View Full Code Here

    // handle mouse events for double-click creation of popup dialog.
    // This happens only in the JTextField, not the JTextArea, so we can
    // make this an inner class within this method rather than a separate
    // inner class as is done with the KeyTextHandler class.
    //
    ((RestorableJTextField)_textComponent).addMouseListener(new MouseAdapter()
    {
      public void mousePressed(MouseEvent evt)
      {
        if (evt.getClickCount() == 2)
        {
View Full Code Here

  public void addNotify()
  {
    super.addNotify();
    if (_lis == null)
    {
      _lis = new MouseAdapter()
      {
        public void mousePressed(MouseEvent evt)
        {
          if (evt.isPopupTrigger())
          {
View Full Code Here

      setAutoResizeMode(JTable.AUTO_RESIZE_OFF);

//?? Future: may want to create TablePopupMenu to allow cut/copy/paste operations

      // add mouse listener for Popup
      MouseAdapter m = new MouseAdapter()
      {
        public void mousePressed(MouseEvent evt)
        {
          if (evt.isPopupTrigger())
          {
View Full Code Here

      setFont(new Font("Monospaced", Font.PLAIN, 12));

      _textPopupMenu = new MyJTextAreaPopupMenu(allowUpdate, updateableObject);
      _textPopupMenu.setTextComponent(this);

      addMouseListener(new MouseAdapter()
      {
        public void mousePressed(MouseEvent evt)
        {
          if (evt.isPopupTrigger())
          {
View Full Code Here

    // handle mouse events for double-click creation of popup dialog.
    // This happens only in the JTextField, not the JTextArea, so we can
    // make this an inner class within this method rather than a separate
    // inner class as is done with the KeyTextHandler class.
    //
    ((RestorableJTextField)_textComponent).addMouseListener(new MouseAdapter()
    {
      public void mousePressed(MouseEvent evt)
      {
        if (evt.getClickCount() == 2)
        {
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.