< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java

Print this page




 465                                                         ItemEvent.SELECTED));
 466                             }
 467 
 468                             // see 6240074 for more information
 469                             if (choiceListener != null) {
 470                                 choiceListener.unfurledChoiceClosing();
 471                             }
 472                         }
 473                     }
 474                 }
 475                 // See 6243382 for more information
 476                 unfurledChoice.trackMouse(e);
 477             }
 478         }
 479 
 480         dragging = false;
 481         wasDragged = false;
 482         firstPress = false;
 483         dragStartIdx = -1;
 484     }
 485 
 486     public void mouseDragged(MouseEvent e) {
 487         /*
 488          * fix for 5003166. On Motif user are unable to drag
 489          * mouse inside opened Choice if he drags the mouse with
 490          * different from LEFT mouse button ( e.g. RIGHT or MIDDLE).
 491          * This fix make impossible to drag mouse inside opened choice
 492          * with other mouse buttons rather then LEFT one.
 493          */
 494         if ( e.getModifiers() == MouseEvent.BUTTON1_MASK ){
 495             dragging = true;
 496             wasDragged = true;
 497             unfurledChoice.trackMouse(e);
 498         }
 499     }
 500 
 501     // Stolen from TinyChoicePeer
 502     @SuppressWarnings("deprecation")
 503     public Dimension getMinimumSize() {
 504         // TODO: move this impl into ListHelper?
 505         FontMetrics fm = getFontMetrics(target.getFont());




 465                                                         ItemEvent.SELECTED));
 466                             }
 467 
 468                             // see 6240074 for more information
 469                             if (choiceListener != null) {
 470                                 choiceListener.unfurledChoiceClosing();
 471                             }
 472                         }
 473                     }
 474                 }
 475                 // See 6243382 for more information
 476                 unfurledChoice.trackMouse(e);
 477             }
 478         }
 479 
 480         dragging = false;
 481         wasDragged = false;
 482         firstPress = false;
 483         dragStartIdx = -1;
 484     }
 485     @SuppressWarnings("deprecation")
 486     public void mouseDragged(MouseEvent e) {
 487         /*
 488          * fix for 5003166. On Motif user are unable to drag
 489          * mouse inside opened Choice if he drags the mouse with
 490          * different from LEFT mouse button ( e.g. RIGHT or MIDDLE).
 491          * This fix make impossible to drag mouse inside opened choice
 492          * with other mouse buttons rather then LEFT one.
 493          */
 494         if ( e.getModifiers() == MouseEvent.BUTTON1_MASK ){
 495             dragging = true;
 496             wasDragged = true;
 497             unfurledChoice.trackMouse(e);
 498         }
 499     }
 500 
 501     // Stolen from TinyChoicePeer
 502     @SuppressWarnings("deprecation")
 503     public Dimension getMinimumSize() {
 504         // TODO: move this impl into ListHelper?
 505         FontMetrics fm = getFontMetrics(target.getFont());


< prev index next >