4456 public final void mouseClicked(MouseEvent e) {
4457 }
4458
4459 public final void mouseEntered(MouseEvent e) {
4460 }
4461
4462 public final void mouseExited(MouseEvent e) {
4463 }
4464
4465 private boolean dragActive;
4466 private int dot;
4467 private int mark;
4468 }
4469
4470 //
4471 // Process any input method events that the component itself
4472 // recognizes. The default on-the-spot handling for input method
4473 // composed(uncommitted) text is done here after all input
4474 // method listeners get called for stealing the events.
4475 //
4476 protected void processInputMethodEvent(InputMethodEvent e) {
4477 // let listeners handle the events
4478 super.processInputMethodEvent(e);
4479
4480 if (!e.isConsumed()) {
4481 if (! isEditable()) {
4482 return;
4483 } else {
4484 switch (e.getID()) {
4485 case InputMethodEvent.INPUT_METHOD_TEXT_CHANGED:
4486 replaceInputMethodText(e);
4487
4488 // fall through
4489
4490 case InputMethodEvent.CARET_POSITION_CHANGED:
4491 setInputMethodCaretPosition(e);
4492 break;
4493 }
4494 }
4495
|
4456 public final void mouseClicked(MouseEvent e) {
4457 }
4458
4459 public final void mouseEntered(MouseEvent e) {
4460 }
4461
4462 public final void mouseExited(MouseEvent e) {
4463 }
4464
4465 private boolean dragActive;
4466 private int dot;
4467 private int mark;
4468 }
4469
4470 //
4471 // Process any input method events that the component itself
4472 // recognizes. The default on-the-spot handling for input method
4473 // composed(uncommitted) text is done here after all input
4474 // method listeners get called for stealing the events.
4475 //
4476 @SuppressWarnings("fallthrough")
4477 protected void processInputMethodEvent(InputMethodEvent e) {
4478 // let listeners handle the events
4479 super.processInputMethodEvent(e);
4480
4481 if (!e.isConsumed()) {
4482 if (! isEditable()) {
4483 return;
4484 } else {
4485 switch (e.getID()) {
4486 case InputMethodEvent.INPUT_METHOD_TEXT_CHANGED:
4487 replaceInputMethodText(e);
4488
4489 // fall through
4490
4491 case InputMethodEvent.CARET_POSITION_CHANGED:
4492 setInputMethodCaretPosition(e);
4493 break;
4494 }
4495 }
4496
|