Liking cljdoc? Tell your friends :D

javax.swing.text.DefaultEditorKit

This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document. This implementation provides a default implementation which treats text as plain text and provides a minimal set of actions for a simple editor.

Newlines

There are two properties which deal with newlines. The system property, line.separator, is defined to be platform-dependent, either "\n", "\r", or "\r\n". There is also a property defined in DefaultEditorKit, called EndOfLineStringProperty, which is defined automatically when a document is loaded, to be the first occurrence of any of the newline characters. When a document is loaded, EndOfLineStringProperty is set appropriately, and when the document is written back out, the EndOfLineStringProperty is used. But while the document is in memory, the "\n" character is used to define a newline, regardless of how the newline is defined when the document is on disk. Therefore, for searching purposes, "\n" should always be used. When a new document is created, and the EndOfLineStringProperty has not been defined, it will use the System property when writing out the document. Note that EndOfLineStringProperty is set on the Document using the get/putProperty methods. Subclasses may override this behavior.

This is the set of things needed by a text component
to be a reasonably functioning editor for some type
of text document.  This implementation provides a default
implementation which treats text as plain text and
provides a minimal set of actions for a simple editor.


Newlines

There are two properties which deal with newlines.  The
system property, line.separator, is defined to be
platform-dependent, either "\n", "\r", or "\r\n".  There is also
a property defined in DefaultEditorKit, called
EndOfLineStringProperty,
which is defined automatically when a document is loaded, to be
the first occurrence of any of the newline characters.
When a document is loaded, EndOfLineStringProperty
is set appropriately, and when the document is written back out, the
EndOfLineStringProperty is used.  But while the document
is in memory, the "\n" character is used to define a
newline, regardless of how the newline is defined when
the document is on disk.  Therefore, for searching purposes,
"\n" should always be used.  When a new document is created,
and the EndOfLineStringProperty has not been defined,
it will use the System property when writing out the
document.
Note that EndOfLineStringProperty is set
on the Document using the get/putProperty
methods.  Subclasses may override this behavior.
raw docstring

*-backward-actionclj

Static Constant.

Name of the Action for moving the caret logically backward one position.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 logically backward one position.

type: java.lang.String
raw docstring

*-beep-actionclj

Static Constant.

Name of the action to create a beep.

type: java.lang.String

Static Constant.

Name of the action to create a beep.

type: java.lang.String
raw docstring

*-begin-actionclj

Static Constant.

Name of the Action for moving the caret to the beginning of the document.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the beginning of the document.

type: java.lang.String
raw docstring

*-begin-line-actionclj

Static Constant.

Name of the Action for moving the caret to the beginning of a line.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the beginning of a line.

type: java.lang.String
raw docstring

*-begin-paragraph-actionclj

Static Constant.

Name of the Action for moving the caret to the beginning of a paragraph.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the beginning of a paragraph.

type: java.lang.String
raw docstring

*-begin-word-actionclj

Static Constant.

Name of the Action for moving the caret to the beginning of a word.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the beginning of a word.

type: java.lang.String
raw docstring

*-copy-actionclj

Static Constant.

Name of the action to copy the selected region and place the contents into the system clipboard.

type: java.lang.String

Static Constant.

Name of the action to copy the selected region
 and place the contents into the system clipboard.

type: java.lang.String
raw docstring

*-cut-actionclj

Static Constant.

Name of the action to cut the selected region and place the contents into the system clipboard.

type: java.lang.String

Static Constant.

Name of the action to cut the selected region
 and place the contents into the system clipboard.

type: java.lang.String
raw docstring

*-default-key-typed-actionclj

Static Constant.

Name of the action that is executed by default if a key typed event is received and there is no keymap entry.

type: java.lang.String

Static Constant.

Name of the action that is executed by default if
 a key typed event is received and there
 is no keymap entry.

type: java.lang.String
raw docstring

*-delete-next-char-actionclj

Static Constant.

Name of the action to delete the character of content that follows the current caret position.

type: java.lang.String

Static Constant.

Name of the action to delete the character of content that
 follows the current caret position.

type: java.lang.String
raw docstring

*-delete-next-word-actionclj

Static Constant.

Name of the action to delete the word that follows the beginning of the selection.

type: java.lang.String

Static Constant.

Name of the action to delete the word that
 follows the beginning of the selection.

type: java.lang.String
raw docstring

*-delete-prev-char-actionclj

Static Constant.

Name of the action to delete the character of content that precedes the current caret position.

type: java.lang.String

Static Constant.

Name of the action to delete the character of content that
 precedes the current caret position.

type: java.lang.String
raw docstring

*-delete-prev-word-actionclj

Static Constant.

Name of the action to delete the word that precedes the beginning of the selection.

type: java.lang.String

Static Constant.

Name of the action to delete the word that
 precedes the beginning of the selection.

type: java.lang.String
raw docstring

*-down-actionclj

Static Constant.

Name of the Action for moving the caret logically downward one position.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 logically downward one position.

type: java.lang.String
raw docstring

*-end-actionclj

Static Constant.

Name of the Action for moving the caret to the end of the document.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the end of the document.

type: java.lang.String
raw docstring

*-end-line-actionclj

Static Constant.

Name of the Action for moving the caret to the end of a line.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the end of a line.

type: java.lang.String
raw docstring

*-end-of-line-string-propertyclj

Static Constant.

When reading a document if a CRLF is encountered a property with this name is added and the value will be "\r\n".

type: java.lang.String

Static Constant.

When reading a document if a CRLF is encountered a property
 with this name is added and the value will be "\r\n".

type: java.lang.String
raw docstring

*-end-paragraph-actionclj

Static Constant.

Name of the Action for moving the caret to the end of a paragraph.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the end of a paragraph.

type: java.lang.String
raw docstring

*-end-word-actionclj

Static Constant.

Name of the Action for moving the caret to the end of a word.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the end of a word.

type: java.lang.String
raw docstring

*-forward-actionclj

Static Constant.

Name of the Action for moving the caret logically forward one position.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 logically forward one position.

type: java.lang.String
raw docstring

*-insert-break-actionclj

Static Constant.

Name of the action to place a line/paragraph break into the document. If there is a selection, it is removed before the break is added.

type: java.lang.String

Static Constant.

Name of the action to place a line/paragraph break into
 the document.  If there is a selection, it is removed before
 the break is added.

type: java.lang.String
raw docstring

*-insert-content-actionclj

Static Constant.

Name of the action to place content into the associated document. If there is a selection, it is removed before the new content is added.

type: java.lang.String

Static Constant.

Name of the action to place content into the associated
 document.  If there is a selection, it is removed before
 the new content is added.

type: java.lang.String
raw docstring

*-insert-tab-actionclj

Static Constant.

Name of the action to place a tab character into the document. If there is a selection, it is removed before the tab is added.

type: java.lang.String

Static Constant.

Name of the action to place a tab character into
 the document.  If there is a selection, it is removed before
 the tab is added.

type: java.lang.String
raw docstring

*-next-word-actionclj

Static Constant.

Name of the Action for moving the caret to the beginning of the next word.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret to the
 beginning of the next word.

type: java.lang.String
raw docstring

*-page-down-actionclj

Static Constant.

Name of the action to page down vertically.

type: java.lang.String

Static Constant.

Name of the action to page down vertically.

type: java.lang.String
raw docstring

*-page-up-actionclj

Static Constant.

Name of the action to page up vertically.

type: java.lang.String

Static Constant.

Name of the action to page up vertically.

type: java.lang.String
raw docstring

*-paste-actionclj

Static Constant.

Name of the action to paste the contents of the system clipboard into the selected region, or before the caret if nothing is selected.

type: java.lang.String

Static Constant.

Name of the action to paste the contents of the
 system clipboard into the selected region, or before the
 caret if nothing is selected.

type: java.lang.String
raw docstring

*-previous-word-actionclj

Static Constant.

Name of the Action for moving the caret to the beginning of the previous word.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret to the
 beginning of the previous word.

type: java.lang.String
raw docstring

*-read-only-actionclj

Static Constant.

Name of the action to set the editor into read-only mode.

type: java.lang.String

Static Constant.

Name of the action to set the editor into read-only
 mode.

type: java.lang.String
raw docstring

*-select-all-actionclj

Static Constant.

Name of the Action for selecting the entire document

type: java.lang.String

Static Constant.

Name of the Action for selecting the entire document

type: java.lang.String
raw docstring

*-select-line-actionclj

Static Constant.

Name of the Action for selecting a line around the caret.

type: java.lang.String

Static Constant.

Name of the Action for selecting a line around the caret.

type: java.lang.String
raw docstring

*-select-paragraph-actionclj

Static Constant.

Name of the Action for selecting a paragraph around the caret.

type: java.lang.String

Static Constant.

Name of the Action for selecting a paragraph around the caret.

type: java.lang.String
raw docstring

*-select-word-actionclj

Static Constant.

Name of the Action for selecting a word around the caret.

type: java.lang.String

Static Constant.

Name of the Action for selecting a word around the caret.

type: java.lang.String
raw docstring

*-selection-backward-actionclj

Static Constant.

Name of the Action for extending the selection by moving the caret logically backward one position.

type: java.lang.String

Static Constant.

Name of the Action for extending the selection
 by moving the caret logically backward one position.

type: java.lang.String
raw docstring

*-selection-begin-actionclj

Static Constant.

Name of the Action for moving the caret to the beginning of the document.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the beginning of the document.

type: java.lang.String
raw docstring

*-selection-begin-line-actionclj

Static Constant.

Name of the Action for moving the caret to the beginning of a line, extending the selection.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the beginning of a line, extending the selection.

type: java.lang.String
raw docstring

*-selection-begin-paragraph-actionclj

Static Constant.

Name of the Action for moving the caret to the beginning of a paragraph, extending the selection.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the beginning of a paragraph, extending the selection.

type: java.lang.String
raw docstring

*-selection-begin-word-actionclj

Static Constant.

Name of the Action for moving the caret to the beginning of a word, extending the selection.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the beginning of a word, extending the selection.

type: java.lang.String
raw docstring

*-selection-down-actionclj

Static Constant.

Name of the Action for moving the caret logically downward one position, extending the selection.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 logically downward one position, extending the selection.

type: java.lang.String
raw docstring

*-selection-end-actionclj

Static Constant.

Name of the Action for moving the caret to the end of the document.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the end of the document.

type: java.lang.String
raw docstring

*-selection-end-line-actionclj

Static Constant.

Name of the Action for moving the caret to the end of a line, extending the selection.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the end of a line, extending the selection.

type: java.lang.String
raw docstring

*-selection-end-paragraph-actionclj

Static Constant.

Name of the Action for moving the caret to the end of a paragraph, extending the selection.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the end of a paragraph, extending the selection.

type: java.lang.String
raw docstring

*-selection-end-word-actionclj

Static Constant.

Name of the Action for moving the caret to the end of a word, extending the selection.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 to the end of a word, extending the selection.

type: java.lang.String
raw docstring

*-selection-forward-actionclj

Static Constant.

Name of the Action for extending the selection by moving the caret logically forward one position.

type: java.lang.String

Static Constant.

Name of the Action for extending the selection
 by moving the caret logically forward one position.

type: java.lang.String
raw docstring

*-selection-next-word-actionclj

Static Constant.

Name of the Action for moving the selection to the beginning of the next word, extending the selection.

type: java.lang.String

Static Constant.

Name of the Action for moving the selection to the
 beginning of the next word, extending the selection.

type: java.lang.String
raw docstring

*-selection-previous-word-actionclj

Static Constant.

Name of the Action for moving the selection to the beginning of the previous word, extending the selection.

type: java.lang.String

Static Constant.

Name of the Action for moving the selection to the
 beginning of the previous word, extending the selection.

type: java.lang.String
raw docstring

*-selection-up-actionclj

Static Constant.

Name of the Action for moving the caret logically upward one position, extending the selection.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 logically upward one position, extending the selection.

type: java.lang.String
raw docstring

*-up-actionclj

Static Constant.

Name of the Action for moving the caret logically upward one position.

type: java.lang.String

Static Constant.

Name of the Action for moving the caret
 logically upward one position.

type: java.lang.String
raw docstring

*-writable-actionclj

Static Constant.

Name of the action to set the editor into writeable mode.

type: java.lang.String

Static Constant.

Name of the action to set the editor into writeable
 mode.

type: java.lang.String
raw docstring

->default-editor-kitclj

(->default-editor-kit)

Constructor.

default constructor for DefaultEditorKit

Constructor.

default constructor for DefaultEditorKit
raw docstring

create-caretclj

(create-caret this)

Fetches a caret that can navigate through views produced by the associated ViewFactory.

returns: the caret - javax.swing.text.Caret

Fetches a caret that can navigate through views
 produced by the associated ViewFactory.

returns: the caret - `javax.swing.text.Caret`
raw docstring

create-default-documentclj

(create-default-document this)

Creates an uninitialized text storage model (PlainDocument) that is appropriate for this type of editor.

returns: the model - javax.swing.text.Document

Creates an uninitialized text storage model (PlainDocument)
 that is appropriate for this type of editor.

returns: the model - `javax.swing.text.Document`
raw docstring

get-actionsclj

(get-actions this)

Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit.

returns: the command list - javax.swing.Action[]

Fetches the set of commands that can be used
 on a text component that is using a model and
 view produced by this kit.

returns: the command list - `javax.swing.Action[]`
raw docstring

get-content-typeclj

(get-content-type this)

Gets the MIME type of the data that this kit represents support for. The default is text/plain.

returns: the type - java.lang.String

Gets the MIME type of the data that this
 kit represents support for.  The default
 is text/plain.

returns: the type - `java.lang.String`
raw docstring

get-view-factoryclj

(get-view-factory this)

Fetches a factory that is suitable for producing views of any models that are produced by this kit. The default is to have the UI produce the factory, so this method has no implementation.

returns: the view factory - javax.swing.text.ViewFactory

Fetches a factory that is suitable for producing
 views of any models that are produced by this
 kit.  The default is to have the UI produce the
 factory, so this method has no implementation.

returns: the view factory - `javax.swing.text.ViewFactory`
raw docstring

readclj

(read this in doc pos)

Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.

in - The stream to read from - java.io.InputStream doc - The destination for the insertion. - javax.swing.text.Document pos - The location in the document to place the content >=0. - int

throws: java.io.IOException - on any I/O error

Inserts content from the given stream which is expected
 to be in a format appropriate for this kind of content
 handler.

in - The stream to read from - `java.io.InputStream`
doc - The destination for the insertion. - `javax.swing.text.Document`
pos - The location in the document to place the content >=0. - `int`

throws: java.io.IOException - on any I/O error
raw docstring

writeclj

(write this out doc pos len)

Writes content from a document to the given stream in a format appropriate for this kind of content handler.

out - The stream to write to - java.io.OutputStream doc - The source for the write. - javax.swing.text.Document pos - The location in the document to fetch the content >=0. - int len - The amount to write out >=0. - int

throws: java.io.IOException - on any I/O error

Writes content from a document to the given stream
 in a format appropriate for this kind of content handler.

out - The stream to write to - `java.io.OutputStream`
doc - The source for the write. - `javax.swing.text.Document`
pos - The location in the document to fetch the content >=0. - `int`
len - The amount to write out >=0. - `int`

throws: java.io.IOException - on any I/O error
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close