src/share/classes/javax/swing/text/JTextComponent.java

Print this page




4473         public final void mouseClicked(MouseEvent e) {
4474         }
4475 
4476         public final void mouseEntered(MouseEvent e) {
4477         }
4478 
4479         public final void mouseExited(MouseEvent e) {
4480         }
4481 
4482         private boolean dragActive;
4483         private int dot;
4484         private int mark;
4485     }
4486 
4487     //
4488     // Process any input method events that the component itself
4489     // recognizes. The default on-the-spot handling for input method
4490     // composed(uncommitted) text is done here after all input
4491     // method listeners get called for stealing the events.
4492     //

4493     protected void processInputMethodEvent(InputMethodEvent e) {
4494         // let listeners handle the events
4495         super.processInputMethodEvent(e);
4496 
4497         if (!e.isConsumed()) {
4498             if (! isEditable()) {
4499                 return;
4500             } else {
4501                 switch (e.getID()) {
4502                 case InputMethodEvent.INPUT_METHOD_TEXT_CHANGED:
4503                     replaceInputMethodText(e);
4504 
4505                     // fall through
4506 
4507                 case InputMethodEvent.CARET_POSITION_CHANGED:
4508                     setInputMethodCaretPosition(e);
4509                     break;
4510                 }
4511             }
4512 




4473         public final void mouseClicked(MouseEvent e) {
4474         }
4475 
4476         public final void mouseEntered(MouseEvent e) {
4477         }
4478 
4479         public final void mouseExited(MouseEvent e) {
4480         }
4481 
4482         private boolean dragActive;
4483         private int dot;
4484         private int mark;
4485     }
4486 
4487     //
4488     // Process any input method events that the component itself
4489     // recognizes. The default on-the-spot handling for input method
4490     // composed(uncommitted) text is done here after all input
4491     // method listeners get called for stealing the events.
4492     //
4493     @SuppressWarnings("fallthrough")
4494     protected void processInputMethodEvent(InputMethodEvent e) {
4495         // let listeners handle the events
4496         super.processInputMethodEvent(e);
4497 
4498         if (!e.isConsumed()) {
4499             if (! isEditable()) {
4500                 return;
4501             } else {
4502                 switch (e.getID()) {
4503                 case InputMethodEvent.INPUT_METHOD_TEXT_CHANGED:
4504                     replaceInputMethodText(e);
4505 
4506                     // fall through
4507 
4508                 case InputMethodEvent.CARET_POSITION_CHANGED:
4509                     setInputMethodCaretPosition(e);
4510                     break;
4511                 }
4512             }
4513