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 styled text and provides a minimal set of actions for editing styled text.
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 styled text and provides a minimal set of actions for editing styled text.
(->styled-editor-kit)
Constructor.
Creates a new EditorKit used for styled documents.
Constructor. Creates a new EditorKit used for styled documents.
(clone this)
Creates a copy of the editor kit.
returns: the copy - java.lang.Object
Creates a copy of the editor kit. returns: the copy - `java.lang.Object`
(create-default-document this)
Creates an uninitialized text storage model that is appropriate for this type of editor.
returns: the model - javax.swing.text.Document
Creates an uninitialized text storage model that is appropriate for this type of editor. returns: the model - `javax.swing.text.Document`
(deinstall this c)
Called when the kit is being removed from the JEditorPane. This is used to unregister any listeners that were attached.
c - the JEditorPane - javax.swing.JEditorPane
Called when the kit is being removed from the JEditorPane. This is used to unregister any listeners that were attached. c - the JEditorPane - `javax.swing.JEditorPane`
(get-actions this)
Fetches the command list for the editor. This is the list of commands supported by the superclass augmented by the collection of commands defined locally for style operations.
returns: the command list - javax.swing.Action[]
Fetches the command list for the editor. This is the list of commands supported by the superclass augmented by the collection of commands defined locally for style operations. returns: the command list - `javax.swing.Action[]`
(get-character-attribute-run this)
Fetches the element representing the current run of character attributes for the caret.
returns: the element - javax.swing.text.Element
Fetches the element representing the current run of character attributes for the caret. returns: the element - `javax.swing.text.Element`
(get-input-attributes this)
Gets the input attributes for the pane. When the caret moves and there is no selection, the input attributes are automatically mutated to reflect the character attributes of the current caret location. The styled editing actions use the input attributes to carry out their actions.
returns: the attribute set - javax.swing.text.MutableAttributeSet
Gets the input attributes for the pane. When the caret moves and there is no selection, the input attributes are automatically mutated to reflect the character attributes of the current caret location. The styled editing actions use the input attributes to carry out their actions. returns: the attribute set - `javax.swing.text.MutableAttributeSet`
(get-view-factory this)
Fetches a factory that is suitable for producing views of any models that are produced by this kit. This is implemented to return View implementations for the following kinds of elements:
AbstractDocument.ContentElementName AbstractDocument.ParagraphElementName AbstractDocument.SectionElementName StyleConstants.ComponentElementName StyleConstants.IconElementName
returns: the factory - javax.swing.text.ViewFactory
Fetches a factory that is suitable for producing views of any models that are produced by this kit. This is implemented to return View implementations for the following kinds of elements: AbstractDocument.ContentElementName AbstractDocument.ParagraphElementName AbstractDocument.SectionElementName StyleConstants.ComponentElementName StyleConstants.IconElementName returns: the factory - `javax.swing.text.ViewFactory`
(install this c)
Called when the kit is being installed into a JEditorPane.
c - the JEditorPane - javax.swing.JEditorPane
Called when the kit is being installed into a JEditorPane. c - the JEditorPane - `javax.swing.JEditorPane`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close