src/share/classes/javax/swing/text/DefaultEditorKit.java
Print this page
@@ -68,10 +68,11 @@
*
* </dl>
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultEditorKit extends EditorKit {
/**
* default constructor for DefaultEditorKit
*/
@@ -1028,10 +1029,11 @@
* Deletes the character of content that precedes the
* current caret position.
* @see DefaultEditorKit#deletePrevCharAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class DeletePrevCharAction extends TextAction {
/**
* Creates this object with the appropriate identifier.
*/
@@ -1086,10 +1088,11 @@
* Deletes the character of content that follows the
* current caret position.
* @see DefaultEditorKit#deleteNextCharAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class DeleteNextCharAction extends TextAction {
/* Create this object with the appropriate identifier. */
DeleteNextCharAction() {
super(deleteNextCharAction);
@@ -1137,10 +1140,11 @@
/*
* Deletes the word that precedes/follows the beginning of the selection.
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class DeleteWordAction extends TextAction {
DeleteWordAction(String name) {
super(name);
assert (name == deletePrevWordAction)
|| (name == deleteNextWordAction);
@@ -1211,10 +1215,11 @@
/*
* Sets the editor into read-only mode.
* @see DefaultEditorKit#readOnlyAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class ReadOnlyAction extends TextAction {
/* Create this object with the appropriate identifier. */
ReadOnlyAction() {
super(readOnlyAction);
@@ -1236,10 +1241,11 @@
/*
* Sets the editor into writeable mode.
* @see DefaultEditorKit#writableAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class WritableAction extends TextAction {
/* Create this object with the appropriate identifier. */
WritableAction() {
super(writableAction);
@@ -1410,10 +1416,11 @@
*
* @see DefaultEditorKit#pageUpAction
* @see DefaultEditorKit#pageDownAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class VerticalPageAction extends TextAction {
/** Create this object with the appropriate identifier. */
public VerticalPageAction(String nm, int direction, boolean select) {
super(nm);
@@ -1569,10 +1576,11 @@
/**
* Pages one view to the left or right.
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class PageAction extends TextAction {
/** Create this object with the appropriate identifier. */
public PageAction(String nm, boolean left, boolean select) {
super(nm);
@@ -1623,10 +1631,11 @@
private boolean select;
private boolean left;
}
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class DumpModelAction extends TextAction {
DumpModelAction() {
super("dump-model");
}
@@ -1645,10 +1654,11 @@
/*
* Action to move the selection by way of the
* getNextVisualPositionFrom method. Constructor indicates direction
* to use.
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class NextVisualPositionAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -1732,10 +1742,11 @@
* Position the caret to the beginning of the word.
* @see DefaultEditorKit#beginWordAction
* @see DefaultEditorKit#selectBeginWordAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class BeginWordAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -1772,10 +1783,11 @@
* Position the caret to the end of the word.
* @see DefaultEditorKit#endWordAction
* @see DefaultEditorKit#selectEndWordAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class EndWordAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -1812,10 +1824,11 @@
* Position the caret to the beginning of the previous word.
* @see DefaultEditorKit#previousWordAction
* @see DefaultEditorKit#selectPreviousWordAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class PreviousWordAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -1871,10 +1884,11 @@
* Position the caret to the next of the word.
* @see DefaultEditorKit#nextWordAction
* @see DefaultEditorKit#selectNextWordAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class NextWordAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -1936,10 +1950,11 @@
* Position the caret to the beginning of the line.
* @see DefaultEditorKit#beginLineAction
* @see DefaultEditorKit#selectBeginLineAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class BeginLineAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -1976,10 +1991,11 @@
* Position the caret to the end of the line.
* @see DefaultEditorKit#endLineAction
* @see DefaultEditorKit#selectEndLineAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class EndLineAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -2016,10 +2032,11 @@
* Position the caret to the beginning of the paragraph.
* @see DefaultEditorKit#beginParagraphAction
* @see DefaultEditorKit#selectBeginParagraphAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class BeginParagraphAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -2053,10 +2070,11 @@
* Position the caret to the end of the paragraph.
* @see DefaultEditorKit#endParagraphAction
* @see DefaultEditorKit#selectEndParagraphAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class EndParagraphAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -2090,10 +2108,11 @@
/*
* Move the caret to the beginning of the document.
* @see DefaultEditorKit#beginAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class BeginAction extends TextAction {
/* Create this object with the appropriate identifier. */
BeginAction(String nm, boolean select) {
super(nm);
@@ -2118,10 +2137,11 @@
/*
* Move the caret to the end of the document.
* @see DefaultEditorKit#endAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class EndAction extends TextAction {
/* Create this object with the appropriate identifier. */
EndAction(String nm, boolean select) {
super(nm);
@@ -2148,10 +2168,11 @@
/*
* Select the word around the caret
* @see DefaultEditorKit#endAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class SelectWordAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -2177,10 +2198,11 @@
/*
* Select the line around the caret
* @see DefaultEditorKit#endAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class SelectLineAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -2206,10 +2228,11 @@
/*
* Select the paragraph around the caret
* @see DefaultEditorKit#endAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class SelectParagraphAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -2235,10 +2258,11 @@
/*
* Select the entire document
* @see DefaultEditorKit#endAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class SelectAllAction extends TextAction {
/**
* Create this action with the appropriate identifier.
* @param nm the name of the action, Action.NAME.
@@ -2264,10 +2288,11 @@
/*
* Remove the selection, if any.
* @see DefaultEditorKit#unselectAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class UnselectAction extends TextAction {
/**
* Create this action with the appropriate identifier.
*/
@@ -2288,10 +2313,11 @@
/*
* Toggles the ComponentOrientation of the text component.
* @see DefaultEditorKit#toggleComponentOrientationAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class ToggleComponentOrientationAction extends TextAction {
/**
* Create this action with the appropriate identifier.
*/