API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.text.html. HTMLEditorKit View Source
Author(s)
Timothy Prinzing
Since
Version
1.136 04/07/06
Serial
Hierarchy
 Object
      EditorKit
          DefaultEditorKit
              StyledEditorKit
                  HTMLEditorKit
Implements
 Accessible
Subclasses
Description
public class HTMLEditorKit
  The Swing JEditorPane text component supports different kinds of content via a plug-in mechanism called an EditorKit.
See also:   
Constructors
public HTMLEditorKit ()
Constructs an HTMLEditorKit, creates a StyleContext, and loads the style sheet.
Methods
Hide/Show inherited methods
public Object clone () [Overrides StyledEditorKit]
  Creates a copy of the editor kit.
public Caret createCaret () [Inherited From DefaultEditorKit] [Specified in EditorKit]
  Fetches a caret that can navigate through views produced by the associated ViewFactory.
public Document createDefaultDocument () [Overrides StyledEditorKit] [Specified in EditorKit]
  Create an uninitialized text storage model that is appropriate for this type of editor.
protected void createInputAttributes (Element element, MutableAttributeSet set) [Overrides StyledEditorKit]
  Copies the key/values in elements AttributeSet into set.
public void deinstall (JEditorPane c) [Overrides StyledEditorKit]
  Called when the kit is being removed from the JEditorPane.
public AccessibleContext getAccessibleContext () [Specified in Accessible]
  returns the AccessibleContext associated with this editor kit
public Action getActions () [Overrides StyledEditorKit] [Specified in EditorKit]
  Fetches the command list for the editor.
public Element getCharacterAttributeRun () [Inherited From StyledEditorKit]
  Fetches the element representing the current run of character attributes for the caret.
public String getContentType () [Overrides DefaultEditorKit] [Specified in EditorKit]
  Get the MIME type of the data that this kit represents support for.
public Cursor getDefaultCursor ()
  Returns the default cursor.
public MutableAttributeSet getInputAttributes () [Overrides StyledEditorKit]
  Gets the input attributes used for the styled editing actions.
public Cursor getLinkCursor ()
  Returns the cursor to use over hyper links.
protected Parser getParser ()
  Fetch the parser to use for reading HTML streams.
pack-privatestatic InputStream getResourceAsStream (String name)
  Fetch a resource relative to the HTMLEditorKit classfile.
public StyleSheet getStyleSheet ()
  Get the set of styles currently being used to render the HTML elements.
public ViewFactory getViewFactory () [Overrides StyledEditorKit] [Specified in EditorKit]
  Fetch a factory that is suitable for producing views of any models that are produced by this kit.
public void insertHTML (HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, Tag insertTag) throws BadLocationException IOException
  Inserts HTML into an existing document.
public void install (JEditorPane c) [Overrides StyledEditorKit]
  Called when the kit is being installed into the a JEditorPane.
public boolean isAutoFormSubmission ()
  Indicates whether an html form submission is processed automatically or only FormSubmitEvent is fired.
public void read (InputStream in, Document doc, int pos) throws IOException BadLocationException [Inherited From DefaultEditorKit] [Specified in EditorKit]
  Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
public void read (Reader in, Document doc, int pos) throws IOException BadLocationException [Overrides DefaultEditorKit] [Specified in EditorKit]
  Inserts content from the given stream.
public void setAutoFormSubmission (boolean isAuto)
  Specifies if an html form submission is processed automatically or only FormSubmitEvent is fired.
public void setDefaultCursor (Cursor cursor)
  Sets the default cursor.
public void setLinkCursor (Cursor cursor)
  Sets the cursor to use over links.
public void setStyleSheet (StyleSheet s)
  Set the set of styles to be used to render the various HTML elements.
public void write (OutputStream out, Document doc, int pos, int len) throws IOException BadLocationException [Inherited From DefaultEditorKit] [Specified in EditorKit]
  Writes content from a document to the given stream in a format appropriate for this kind of content handler.
public void write (Writer out, Document doc, int pos, int len) throws IOException BadLocationException [Overrides DefaultEditorKit] [Specified in EditorKit]
  Write content from a document to the given stream in a format appropriate for this kind of content handler.
Fields
Hide/Show inherited fields
publicfinalstatic String backwardAction = "caret-backward" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret logically backward one position.
publicfinalstatic String beepAction = "beep" [Inherited From DefaultEditorKit]
  Name of the action to create a beep.
publicfinalstatic String beginAction = "caret-begin" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the beginning of the document.
publicfinalstatic String beginLineAction = "caret-begin-line" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the beginning of a line.
publicfinalstatic String beginParagraphAction = "caret-begin-paragraph" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the beginning of a paragraph.
publicfinalstatic String beginWordAction = "caret-begin-word" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the beginning of a word.
publicfinalstatic String BOLD_ACTION = "html-bold-action"
The bold action identifier
publicfinalstatic String COLOR_ACTION = "html-color-action"
The Color choice action identifier The color is passed as an argument
publicfinalstatic String copyAction = "copy-to-clipboard" [Inherited From DefaultEditorKit]
  Name of the action to copy the selected region and place the contents into the system clipboard.
publicfinalstatic String cutAction = "cut-to-clipboard" [Inherited From DefaultEditorKit]
  Name of the action to cut the selected region and place the contents into the system clipboard.
publicfinalstatic String DEFAULT_CSS = "default.css"
Default Cascading Style Sheet file that sets up the tag views.
publicfinalstatic String defaultKeyTypedAction = "default-typed" [Inherited From DefaultEditorKit]
  Name of the action that is executed by default if a key typed event is received and there is no keymap entry.
publicfinalstatic String deleteNextCharAction = "delete-next" [Inherited From DefaultEditorKit]
  Name of the action to delete the character of content that follows the current caret position.
publicfinalstatic String deleteNextWordAction = "delete-next-word" [Inherited From DefaultEditorKit]
  Name of the action to delete the word that follows the beginning of the selection.
publicfinalstatic String deletePrevCharAction = "delete-previous" [Inherited From DefaultEditorKit]
  Name of the action to delete the character of content that precedes the current caret position.
publicfinalstatic String deletePrevWordAction = "delete-previous-word" [Inherited From DefaultEditorKit]
  Name of the action to delete the word that precedes the beginning of the selection.
publicfinalstatic String downAction = "caret-down" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret logically downward one position.
publicfinalstatic String endAction = "caret-end" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the end of the document.
publicfinalstatic String endLineAction = "caret-end-line" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the end of a line.
publicfinalstatic String EndOfLineStringProperty = "__EndOfLine__" [Inherited From DefaultEditorKit]
When reading a document if a CRLF is encountered a property with this name is added and the value will be "\r\n".
publicfinalstatic String endParagraphAction = "caret-end-paragraph" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the end of a paragraph.
publicfinalstatic String endWordAction = "caret-end-word" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the end of a word.
publicfinalstatic String FONT_CHANGE_BIGGER = "html-font-bigger"
The font size increase to next value action identifier
publicfinalstatic String FONT_CHANGE_SMALLER = "html-font-smaller"
The font size decrease to next value action identifier
publicfinalstatic String forwardAction = "caret-forward" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret logically forward one position.
publicfinalstatic String IMG_ALIGN_BOTTOM = "html-image-align-bottom"
Align images at the bottom.
publicfinalstatic String IMG_ALIGN_MIDDLE = "html-image-align-middle"
Align images in the middle.
publicfinalstatic String IMG_ALIGN_TOP = "html-image-align-top"
Align images at the top.
publicfinalstatic String IMG_BORDER = "html-image-border"
Align images at the border.
pack-private MutableAttributeSet input
publicfinalstatic String insertBreakAction = "insert-break" [Inherited From DefaultEditorKit]
  Name of the action to place a line/paragraph break into the document.
publicfinalstatic String insertContentAction = "insert-content" [Inherited From DefaultEditorKit]
  Name of the action to place content into the associated document.
publicfinalstatic String insertTabAction = "insert-tab" [Inherited From DefaultEditorKit]
  Name of the action to place a tab character into the document.
publicfinalstatic String ITALIC_ACTION = "html-italic-action"
The italic action identifier
publicfinalstatic String LOGICAL_STYLE_ACTION = "html-logical-style-action"
The logical style choice action identifier The logical style is passed in as an argument
publicfinalstatic String nextWordAction = "caret-next-word" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the beginning of the next word.
publicfinalstatic String pageDownAction = "page-down" [Inherited From DefaultEditorKit]
  Name of the action to page down vertically.
publicfinalstatic String pageUpAction = "page-up" [Inherited From DefaultEditorKit]
  Name of the action to page up vertically.
publicfinalstatic String PARA_INDENT_LEFT = "html-para-indent-left"
The paragraph left indent action identifier
publicfinalstatic String PARA_INDENT_RIGHT = "html-para-indent-right"
The paragraph right indent action identifier
publicfinalstatic String pasteAction = "paste-from-clipboard" [Inherited From DefaultEditorKit]
  Name of the action to paste the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
publicfinalstatic String previousWordAction = "caret-previous-word" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the beginning of the previous word.
publicfinalstatic String readOnlyAction = "set-read-only" [Inherited From DefaultEditorKit]
  Name of the action to set the editor into read-only mode.
publicfinalstatic String selectAllAction = "select-all" [Inherited From DefaultEditorKit]
  Name of the Action for selecting the entire document
publicfinalstatic String selectionBackwardAction = "selection-backward" [Inherited From DefaultEditorKit]
  Name of the Action for extending the selection by moving the caret logically backward one position.
publicfinalstatic String selectionBeginAction = "selection-begin" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the beginning of the document.
publicfinalstatic String selectionBeginLineAction = "selection-begin-line" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the beginning of a line, extending the selection.
publicfinalstatic String selectionBeginParagraphAction = "selection-begin-paragraph" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the beginning of a paragraph, extending the selection.
publicfinalstatic String selectionBeginWordAction = "selection-begin-word" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the beginning of a word, extending the selection.
publicfinalstatic String selectionDownAction = "selection-down" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret logically downward one position, extending the selection.
publicfinalstatic String selectionEndAction = "selection-end" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the end of the document.
publicfinalstatic String selectionEndLineAction = "selection-end-line" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the end of a line, extending the selection.
publicfinalstatic String selectionEndParagraphAction = "selection-end-paragraph" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the end of a paragraph, extending the selection.
publicfinalstatic String selectionEndWordAction = "selection-end-word" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret to the end of a word, extending the selection.
publicfinalstatic String selectionForwardAction = "selection-forward" [Inherited From DefaultEditorKit]
  Name of the Action for extending the selection by moving the caret logically forward one position.
publicfinalstatic String selectionNextWordAction = "selection-next-word" [Inherited From DefaultEditorKit]
  Name of the Action for moving the selection to the beginning of the next word, extending the selection.
publicfinalstatic String selectionPreviousWordAction = "selection-previous-word" [Inherited From DefaultEditorKit]
  Name of the Action for moving the selection to the beginning of the previous word, extending the selection.
publicfinalstatic String selectionUpAction = "selection-up" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret logically upward one position, extending the selection.
publicfinalstatic String selectLineAction = "select-line" [Inherited From DefaultEditorKit]
  Name of the Action for selecting a line around the caret.
publicfinalstatic String selectParagraphAction = "select-paragraph" [Inherited From DefaultEditorKit]
  Name of the Action for selecting a paragraph around the caret.
publicfinalstatic String selectWordAction = "select-word" [Inherited From DefaultEditorKit]
  Name of the Action for selecting a word around the caret.
publicfinalstatic String upAction = "caret-up" [Inherited From DefaultEditorKit]
  Name of the Action for moving the caret logically upward one position.
publicfinalstatic String writableAction = "set-writable" [Inherited From DefaultEditorKit]
  Name of the action to set the editor into writeable mode.
Nested Classes
  HTMLEditorKit.LinkController
Class to watch the associated component and fire hyperlink events on it when appropriate.
  HTMLEditorKit.Parser
Interface to be supported by the parser.
  HTMLEditorKit.ParserCallback
The result of parsing drives these callback methods.
  HTMLEditorKit.HTMLFactory
A factory to build views for HTML.
  HTMLEditorKit.HTMLTextAction
An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
  HTMLEditorKit.InsertHTMLTextAction
InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.
  HTMLEditorKit.InsertHRAction
InsertHRAction is special, at actionPerformed time it will determine the parent HTML.Tag based on the paragraph element at the selection start.
  HTMLEditorKit.NavigateLinkAction
  HTMLEditorKit.ActivateLinkAction
  HTMLEditorKit.BeginAction
  StyledEditorKit.StyledTextAction
An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
  StyledEditorKit.FontFamilyAction
An action to set the font family in the associated JEditorPane.
  StyledEditorKit.FontSizeAction
An action to set the font size in the associated JEditorPane.
  StyledEditorKit.ForegroundAction
An action to set foreground color.
  StyledEditorKit.AlignmentAction
An action to set paragraph alignment.
  StyledEditorKit.BoldAction
An action to toggle the bold attribute.
  StyledEditorKit.ItalicAction
An action to toggle the italic attribute.
  StyledEditorKit.UnderlineAction
An action to toggle the underline attribute.
  DefaultEditorKit.DefaultKeyTypedAction
The action that is executed by default if a key typed event is received and there is no keymap entry.
  DefaultEditorKit.InsertContentAction
Places content into the associated document.
  DefaultEditorKit.InsertBreakAction
Places a line/paragraph break into the document.
  DefaultEditorKit.InsertTabAction
Places a tab character into the document.
  DefaultEditorKit.CutAction
Cuts the selected region and place its contents into the system clipboard.
  DefaultEditorKit.CopyAction
Copies the selected region and place its contents into the system clipboard.
  DefaultEditorKit.PasteAction
Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
  DefaultEditorKit.BeepAction
Creates a beep.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar