64 |
/** |
/** |
65 |
* Creates a beep on the PC speaker. |
* Creates a beep on the PC speaker. |
66 |
* |
* |
67 |
* @see {@link Toolkit#beep()} |
* @see Toolkit#beep() |
68 |
*/ |
*/ |
69 |
public static class BeepAction |
public static class BeepAction |
70 |
extends TextAction |
extends TextAction |
91 |
/** |
/** |
92 |
* Copies the selected content into the system clipboard. |
* Copies the selected content into the system clipboard. |
93 |
* |
* |
94 |
* @see {@link Toolkit#getSystemClipboard()} |
* @see Toolkit#getSystemClipboard() |
95 |
* @see {@link CutAction} |
* @see CutAction |
96 |
* @see {@link PasteAction} |
* @see PasteAction |
97 |
*/ |
*/ |
98 |
public static class CopyAction |
public static class CopyAction |
99 |
extends TextAction |
extends TextAction |
124 |
* Copies the selected content into the system clipboard and deletes the |
* Copies the selected content into the system clipboard and deletes the |
125 |
* selection. |
* selection. |
126 |
* |
* |
127 |
* @see {@link Toolkit#getSystemClipboard()} |
* @see Toolkit#getSystemClipboard() |
128 |
* @see {@link CopyAction} |
* @see CopyAction |
129 |
* @see {@link PasteAction} |
* @see PasteAction |
130 |
*/ |
*/ |
131 |
public static class CutAction |
public static class CutAction |
132 |
extends TextAction |
extends TextAction |
155 |
/** |
/** |
156 |
* Copies content from the system clipboard into the editor. |
* Copies content from the system clipboard into the editor. |
157 |
* |
* |
158 |
* @see {@link Toolkit#getSystemClipboard()} |
* @see Toolkit#getSystemClipboard() |
159 |
* @see {@link CopyAction} |
* @see CopyAction |
160 |
* @see {@link CutAction} |
* @see CutAction |
161 |
*/ |
*/ |
162 |
public static class PasteAction |
public static class PasteAction |
163 |
extends TextAction |
extends TextAction |
330 |
* The name of the <code>Action</code> that moves the caret one character |
* The name of the <code>Action</code> that moves the caret one character |
331 |
* backwards. |
* backwards. |
332 |
* |
* |
333 |
* @see {@link #getActions()} |
* @see #getActions() |
334 |
*/ |
*/ |
335 |
public static final String backwardAction = "caret-backward"; |
public static final String backwardAction = "caret-backward"; |
336 |
|
|
337 |
/** |
/** |
338 |
* The name of the <code>Action</code> that creates a beep in the speaker. |
* The name of the <code>Action</code> that creates a beep in the speaker. |
339 |
* |
* |
340 |
* @see {@link #getActions()} |
* @see #getActions() |
341 |
*/ |
*/ |
342 |
public static final String beepAction = "beep"; |
public static final String beepAction = "beep"; |
343 |
|
|
345 |
* The name of the <code>Action</code> that moves the caret to the beginning |
* The name of the <code>Action</code> that moves the caret to the beginning |
346 |
* of the <code>Document</code>. |
* of the <code>Document</code>. |
347 |
* |
* |
348 |
* @see {@link #getActions()} |
* @see #getActions() |
349 |
*/ |
*/ |
350 |
public static final String beginAction = "caret-begin"; |
public static final String beginAction = "caret-begin"; |
351 |
|
|
353 |
* The name of the <code>Action</code> that moves the caret to the beginning |
* The name of the <code>Action</code> that moves the caret to the beginning |
354 |
* of the current line. |
* of the current line. |
355 |
* |
* |
356 |
* @see {@link #getActions()} |
* @see #getActions() |
357 |
*/ |
*/ |
358 |
public static final String beginLineAction = "caret-begin-line"; |
public static final String beginLineAction = "caret-begin-line"; |
359 |
|
|
361 |
* The name of the <code>Action</code> that moves the caret to the beginning |
* The name of the <code>Action</code> that moves the caret to the beginning |
362 |
* of the current paragraph. |
* of the current paragraph. |
363 |
* |
* |
364 |
* @see {@link #getActions()} |
* @see #getActions() |
365 |
*/ |
*/ |
366 |
public static final String beginParagraphAction = "caret-begin-paragraph"; |
public static final String beginParagraphAction = "caret-begin-paragraph"; |
367 |
|
|
369 |
* The name of the <code>Action</code> that moves the caret to the beginning |
* The name of the <code>Action</code> that moves the caret to the beginning |
370 |
* of the current word. |
* of the current word. |
371 |
* |
* |
372 |
* @see {@link #getActions()} |
* @see #getActions() |
373 |
*/ |
*/ |
374 |
public static final String beginWordAction = "caret-begin-word"; |
public static final String beginWordAction = "caret-begin-word"; |
375 |
|
|
377 |
* The name of the <code>Action</code> that copies the selected content |
* The name of the <code>Action</code> that copies the selected content |
378 |
* into the system clipboard. |
* into the system clipboard. |
379 |
* |
* |
380 |
* @see {@link #getActions()} |
* @see #getActions() |
381 |
*/ |
*/ |
382 |
public static final String copyAction = "copy-to-clipboard"; |
public static final String copyAction = "copy-to-clipboard"; |
383 |
|
|
385 |
* The name of the <code>Action</code> that copies the selected content |
* The name of the <code>Action</code> that copies the selected content |
386 |
* into the system clipboard and removes the selection. |
* into the system clipboard and removes the selection. |
387 |
* |
* |
388 |
* @see {@link #getActions()} |
* @see #getActions() |
389 |
*/ |
*/ |
390 |
public static final String cutAction = "cut-to-clipboard"; |
public static final String cutAction = "cut-to-clipboard"; |
391 |
|
|
393 |
* The name of the <code>Action</code> that is performed by default if |
* The name of the <code>Action</code> that is performed by default if |
394 |
* a key is typed and there is no keymap entry. |
* a key is typed and there is no keymap entry. |
395 |
* |
* |
396 |
* @see {@link #getActions()} |
* @see #getActions() |
397 |
*/ |
*/ |
398 |
public static final String defaultKeyTypedAction = "default-typed"; |
public static final String defaultKeyTypedAction = "default-typed"; |
399 |
|
|
401 |
* The name of the <code>Action</code> that deletes the character that |
* The name of the <code>Action</code> that deletes the character that |
402 |
* follows the current caret position. |
* follows the current caret position. |
403 |
* |
* |
404 |
* @see {@link #getActions()} |
* @see #getActions() |
405 |
*/ |
*/ |
406 |
public static final String deleteNextCharAction = "delete-next"; |
public static final String deleteNextCharAction = "delete-next"; |
407 |
|
|
409 |
* The name of the <code>Action</code> that deletes the character that |
* The name of the <code>Action</code> that deletes the character that |
410 |
* precedes the current caret position. |
* precedes the current caret position. |
411 |
* |
* |
412 |
* @see {@link #getActions()} |
* @see #getActions() |
413 |
*/ |
*/ |
414 |
public static final String deletePrevCharAction = "delete-previous"; |
public static final String deletePrevCharAction = "delete-previous"; |
415 |
|
|
416 |
/** |
/** |
417 |
* The name of the <code>Action</code> that moves the caret one line down. |
* The name of the <code>Action</code> that moves the caret one line down. |
418 |
* |
* |
419 |
* @see {@link #getActions()} |
* @see #getActions() |
420 |
*/ |
*/ |
421 |
public static final String downAction = "caret-down"; |
public static final String downAction = "caret-down"; |
422 |
|
|
424 |
* The name of the <code>Action</code> that moves the caret to the end |
* The name of the <code>Action</code> that moves the caret to the end |
425 |
* of the <code>Document</code>. |
* of the <code>Document</code>. |
426 |
* |
* |
427 |
* @see {@link #getActions()} |
* @see #getActions() |
428 |
*/ |
*/ |
429 |
public static final String endAction = "caret-end"; |
public static final String endAction = "caret-end"; |
430 |
|
|
432 |
* The name of the <code>Action</code> that moves the caret to the end |
* The name of the <code>Action</code> that moves the caret to the end |
433 |
* of the current line. |
* of the current line. |
434 |
* |
* |
435 |
* @see {@link #getActions()} |
* @see #getActions() |
436 |
*/ |
*/ |
437 |
public static final String endLineAction = "caret-end-line"; |
public static final String endLineAction = "caret-end-line"; |
438 |
|
|
446 |
* The name of the <code>Action</code> that moves the caret to the end |
* The name of the <code>Action</code> that moves the caret to the end |
447 |
* of the current paragraph. |
* of the current paragraph. |
448 |
* |
* |
449 |
* @see {@link #getActions()} |
* @see #getActions() |
450 |
*/ |
*/ |
451 |
public static final String endParagraphAction = "caret-end-paragraph"; |
public static final String endParagraphAction = "caret-end-paragraph"; |
452 |
|
|
454 |
* The name of the <code>Action</code> that moves the caret to the end |
* The name of the <code>Action</code> that moves the caret to the end |
455 |
* of the current word. |
* of the current word. |
456 |
* |
* |
457 |
* @see {@link #getActions()} |
* @see #getActions() |
458 |
*/ |
*/ |
459 |
public static final String endWordAction = "caret-end-word"; |
public static final String endWordAction = "caret-end-word"; |
460 |
|
|
462 |
* The name of the <code>Action</code> that moves the caret one character |
* The name of the <code>Action</code> that moves the caret one character |
463 |
* forward. |
* forward. |
464 |
* |
* |
465 |
* @see {@link #getActions()} |
* @see #getActions() |
466 |
*/ |
*/ |
467 |
public static final String forwardAction = "caret-forward"; |
public static final String forwardAction = "caret-forward"; |
468 |
|
|
469 |
/** |
/** |
470 |
* The name of the <code>Action</code> that inserts a line break. |
* The name of the <code>Action</code> that inserts a line break. |
471 |
* |
* |
472 |
* @see {@link #getActions()} |
* @see #getActions() |
473 |
*/ |
*/ |
474 |
public static final String insertBreakAction = "insert-break"; |
public static final String insertBreakAction = "insert-break"; |
475 |
|
|
476 |
/** |
/** |
477 |
* The name of the <code>Action</code> that inserts some content. |
* The name of the <code>Action</code> that inserts some content. |
478 |
* |
* |
479 |
* @see {@link #getActions()} |
* @see #getActions() |
480 |
*/ |
*/ |
481 |
public static final String insertContentAction = "insert-content"; |
public static final String insertContentAction = "insert-content"; |
482 |
|
|
483 |
/** |
/** |
484 |
* The name of the <code>Action</code> that inserts a TAB. |
* The name of the <code>Action</code> that inserts a TAB. |
485 |
* |
* |
486 |
* @see {@link #getActions()} |
* @see #getActions() |
487 |
*/ |
*/ |
488 |
public static final String insertTabAction = "insert-tab"; |
public static final String insertTabAction = "insert-tab"; |
489 |
|
|
491 |
* The name of the <code>Action</code> that moves the caret to the beginning |
* The name of the <code>Action</code> that moves the caret to the beginning |
492 |
* of the next word. |
* of the next word. |
493 |
* |
* |
494 |
* @see {@link #getActions()} |
* @see #getActions() |
495 |
*/ |
*/ |
496 |
public static final String nextWordAction = "caret-next-word"; |
public static final String nextWordAction = "caret-next-word"; |
497 |
|
|
498 |
/** |
/** |
499 |
* The name of the <code>Action</code> that moves the caret one page down. |
* The name of the <code>Action</code> that moves the caret one page down. |
500 |
* |
* |
501 |
* @see {@link #getActions()} |
* @see #getActions() |
502 |
*/ |
*/ |
503 |
public static final String pageDownAction = "page-down"; |
public static final String pageDownAction = "page-down"; |
504 |
|
|
505 |
/** |
/** |
506 |
* The name of the <code>Action</code> that moves the caret one page up. |
* The name of the <code>Action</code> that moves the caret one page up. |
507 |
* |
* |
508 |
* @see {@link #getActions()} |
* @see #getActions() |
509 |
*/ |
*/ |
510 |
public static final String pageUpAction = "page-up"; |
public static final String pageUpAction = "page-up"; |
511 |
|
|
513 |
* The name of the <code>Action</code> that copies content from the system |
* The name of the <code>Action</code> that copies content from the system |
514 |
* clipboard into the document. |
* clipboard into the document. |
515 |
* |
* |
516 |
* @see {@link #getActions()} |
* @see #getActions() |
517 |
*/ |
*/ |
518 |
public static final String pasteAction = "paste-from-clipboard"; |
public static final String pasteAction = "paste-from-clipboard"; |
519 |
|
|
521 |
* The name of the <code>Action</code> that moves the caret to the beginning |
* The name of the <code>Action</code> that moves the caret to the beginning |
522 |
* of the previous word. |
* of the previous word. |
523 |
* |
* |
524 |
* @see {@link #getActions()} |
* @see #getActions() |
525 |
*/ |
*/ |
526 |
public static final String previousWordAction = "caret-previous-word"; |
public static final String previousWordAction = "caret-previous-word"; |
527 |
|
|
529 |
* The name of the <code>Action</code> that sets the editor in read only |
* The name of the <code>Action</code> that sets the editor in read only |
530 |
* mode. |
* mode. |
531 |
* |
* |
532 |
* @see {@link #getActions()} |
* @see #getActions() |
533 |
*/ |
*/ |
534 |
public static final String readOnlyAction = "set-read-only"; |
public static final String readOnlyAction = "set-read-only"; |
535 |
|
|
536 |
/** |
/** |
537 |
* The name of the <code>Action</code> that selects the whole document. |
* The name of the <code>Action</code> that selects the whole document. |
538 |
* |
* |
539 |
* @see {@link #getActions()} |
* @see #getActions() |
540 |
*/ |
*/ |
541 |
public static final String selectAllAction = "select-all"; |
public static final String selectAllAction = "select-all"; |
542 |
|
|
544 |
* The name of the <code>Action</code> that moves the caret one character |
* The name of the <code>Action</code> that moves the caret one character |
545 |
* backwards, possibly extending the current selection. |
* backwards, possibly extending the current selection. |
546 |
* |
* |
547 |
* @see {@link #getActions()} |
* @see #getActions() |
548 |
*/ |
*/ |
549 |
public static final String selectionBackwardAction = "selection-backward"; |
public static final String selectionBackwardAction = "selection-backward"; |
550 |
|
|
552 |
* The name of the <code>Action</code> that moves the caret to the beginning |
* The name of the <code>Action</code> that moves the caret to the beginning |
553 |
* of the document, possibly extending the current selection. |
* of the document, possibly extending the current selection. |
554 |
* |
* |
555 |
* @see {@link #getActions()} |
* @see #getActions() |
556 |
*/ |
*/ |
557 |
public static final String selectionBeginAction = "selection-begin"; |
public static final String selectionBeginAction = "selection-begin"; |
558 |
|
|
560 |
* The name of the <code>Action</code> that moves the caret to the beginning |
* The name of the <code>Action</code> that moves the caret to the beginning |
561 |
* of the current line, possibly extending the current selection. |
* of the current line, possibly extending the current selection. |
562 |
* |
* |
563 |
* @see {@link #getActions()} |
* @see #getActions() |
564 |
*/ |
*/ |
565 |
public static final String selectionBeginLineAction = "selection-begin-line"; |
public static final String selectionBeginLineAction = "selection-begin-line"; |
566 |
|
|
568 |
* The name of the <code>Action</code> that moves the caret to the beginning |
* The name of the <code>Action</code> that moves the caret to the beginning |
569 |
* of the current paragraph, possibly extending the current selection. |
* of the current paragraph, possibly extending the current selection. |
570 |
* |
* |
571 |
* @see {@link #getActions()} |
* @see #getActions() |
572 |
*/ |
*/ |
573 |
public static final String selectionBeginParagraphAction = |
public static final String selectionBeginParagraphAction = |
574 |
"selection-begin-paragraph"; |
"selection-begin-paragraph"; |
577 |
* The name of the <code>Action</code> that moves the caret to the beginning |
* The name of the <code>Action</code> that moves the caret to the beginning |
578 |
* of the current word, possibly extending the current selection. |
* of the current word, possibly extending the current selection. |
579 |
* |
* |
580 |
* @see {@link #getActions()} |
* @see #getActions() |
581 |
*/ |
*/ |
582 |
public static final String selectionBeginWordAction = "selection-begin-word"; |
public static final String selectionBeginWordAction = "selection-begin-word"; |
583 |
|
|
585 |
* The name of the <code>Action</code> that moves the caret one line down, |
* The name of the <code>Action</code> that moves the caret one line down, |
586 |
* possibly extending the current selection. |
* possibly extending the current selection. |
587 |
* |
* |
588 |
* @see {@link #getActions()} |
* @see #getActions() |
589 |
*/ |
*/ |
590 |
public static final String selectionDownAction = "selection-down"; |
public static final String selectionDownAction = "selection-down"; |
591 |
|
|
593 |
* The name of the <code>Action</code> that moves the caret to the end |
* The name of the <code>Action</code> that moves the caret to the end |
594 |
* of the document, possibly extending the current selection. |
* of the document, possibly extending the current selection. |
595 |
* |
* |
596 |
* @see {@link #getActions()} |
* @see #getActions() |
597 |
*/ |
*/ |
598 |
public static final String selectionEndAction = "selection-end"; |
public static final String selectionEndAction = "selection-end"; |
599 |
|
|
601 |
* The name of the <code>Action</code> that moves the caret to the end |
* The name of the <code>Action</code> that moves the caret to the end |
602 |
* of the current line, possibly extending the current selection. |
* of the current line, possibly extending the current selection. |
603 |
* |
* |
604 |
* @see {@link #getActions()} |
* @see #getActions() |
605 |
*/ |
*/ |
606 |
public static final String selectionEndLineAction = "selection-end-line"; |
public static final String selectionEndLineAction = "selection-end-line"; |
607 |
|
|
609 |
* The name of the <code>Action</code> that moves the caret to the end |
* The name of the <code>Action</code> that moves the caret to the end |
610 |
* of the current paragraph, possibly extending the current selection. |
* of the current paragraph, possibly extending the current selection. |
611 |
* |
* |
612 |
* @see {@link #getActions()} |
* @see #getActions() |
613 |
*/ |
*/ |
614 |
public static final String selectionEndParagraphAction = |
public static final String selectionEndParagraphAction = |
615 |
"selection-end-paragraph"; |
"selection-end-paragraph"; |
618 |
* The name of the <code>Action</code> that moves the caret to the end |
* The name of the <code>Action</code> that moves the caret to the end |
619 |
* of the current word, possibly extending the current selection. |
* of the current word, possibly extending the current selection. |
620 |
* |
* |
621 |
* @see {@link #getActions()} |
* @see #getActions() |
622 |
*/ |
*/ |
623 |
public static final String selectionEndWordAction = "selection-end-word"; |
public static final String selectionEndWordAction = "selection-end-word"; |
624 |
|
|
626 |
* The name of the <code>Action</code> that moves the caret one character |
* The name of the <code>Action</code> that moves the caret one character |
627 |
* forwards, possibly extending the current selection. |
* forwards, possibly extending the current selection. |
628 |
* |
* |
629 |
* @see {@link #getActions()} |
* @see #getActions() |
630 |
*/ |
*/ |
631 |
public static final String selectionForwardAction = "selection-forward"; |
public static final String selectionForwardAction = "selection-forward"; |
632 |
|
|
634 |
* The name of the <code>Action</code> that moves the caret to the beginning |
* The name of the <code>Action</code> that moves the caret to the beginning |
635 |
* of the next word, possibly extending the current selection. |
* of the next word, possibly extending the current selection. |
636 |
* |
* |
637 |
* @see {@link #getActions()} |
* @see #getActions() |
638 |
*/ |
*/ |
639 |
public static final String selectionNextWordAction = "selection-next-word"; |
public static final String selectionNextWordAction = "selection-next-word"; |
640 |
|
|
642 |
* The name of the <code>Action</code> that moves the caret to the beginning |
* The name of the <code>Action</code> that moves the caret to the beginning |
643 |
* of the previous word, possibly extending the current selection. |
* of the previous word, possibly extending the current selection. |
644 |
* |
* |
645 |
* @see {@link #getActions()} |
* @see #getActions() |
646 |
*/ |
*/ |
647 |
public static final String selectionPreviousWordAction = |
public static final String selectionPreviousWordAction = |
648 |
"selection-previous-word"; |
"selection-previous-word"; |
651 |
* The name of the <code>Action</code> that moves the caret one line up, |
* The name of the <code>Action</code> that moves the caret one line up, |
652 |
* possibly extending the current selection. |
* possibly extending the current selection. |
653 |
* |
* |
654 |
* @see {@link #getActions()} |
* @see #getActions() |
655 |
*/ |
*/ |
656 |
public static final String selectionUpAction = "selection-up"; |
public static final String selectionUpAction = "selection-up"; |
657 |
|
|
659 |
* The name of the <code>Action</code> that selects the line around the |
* The name of the <code>Action</code> that selects the line around the |
660 |
* caret. |
* caret. |
661 |
* |
* |
662 |
* @see {@link #getActions()} |
* @see #getActions() |
663 |
*/ |
*/ |
664 |
public static final String selectLineAction = "select-line"; |
public static final String selectLineAction = "select-line"; |
665 |
|
|
667 |
* The name of the <code>Action</code> that selects the paragraph around the |
* The name of the <code>Action</code> that selects the paragraph around the |
668 |
* caret. |
* caret. |
669 |
* |
* |
670 |
* @see {@link #getActions()} |
* @see #getActions() |
671 |
*/ |
*/ |
672 |
public static final String selectParagraphAction = "select-paragraph"; |
public static final String selectParagraphAction = "select-paragraph"; |
673 |
|
|
675 |
* The name of the <code>Action</code> that selects the word around the |
* The name of the <code>Action</code> that selects the word around the |
676 |
* caret. |
* caret. |
677 |
* |
* |
678 |
* @see {@link #getActions()} |
* @see #getActions() |
679 |
*/ |
*/ |
680 |
public static final String selectWordAction = "select-word"; |
public static final String selectWordAction = "select-word"; |
681 |
|
|
682 |
/** |
/** |
683 |
* The name of the <code>Action</code> that moves the caret one line up. |
* The name of the <code>Action</code> that moves the caret one line up. |
684 |
* |
* |
685 |
* @see {@link #getActions()} |
* @see #getActions() |
686 |
*/ |
*/ |
687 |
public static final String upAction = "caret-up"; |
public static final String upAction = "caret-up"; |
688 |
|
|
690 |
* The name of the <code>Action</code> that sets the editor in read-write |
* The name of the <code>Action</code> that sets the editor in read-write |
691 |
* mode. |
* mode. |
692 |
* |
* |
693 |
* @see {@link #getActions()} |
* @see #getActions() |
694 |
*/ |
*/ |
695 |
public static final String writableAction = "set-writable"; |
public static final String writableAction = "set-writable"; |
696 |
|
|
825 |
|
|
826 |
/** |
/** |
827 |
* Creates the default {@link Document} that this <code>EditorKit</code> |
* Creates the default {@link Document} that this <code>EditorKit</code> |
828 |
* supports. This is a {@link DefaultDocument} in this case. |
* supports. This is a {@link PlainDocument} in this case. |
829 |
* |
* |
830 |
* @return the default {@link Document} that this <code>EditorKit</code> |
* @return the default {@link Document} that this <code>EditorKit</code> |
831 |
* supports |
* supports |