|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.text.EditorKit
javax.swing.text.DefaultEditorKit
javax.swing.text.StyledEditorKit
javax.swing.text.html.HTMLEditorKit
eTextReader.applet.AppletHTMLEditorKit
public class AppletHTMLEditorKit
Provides support for annotations to be loaded into the document when it is read into the JEditorPane, and for including applets.
The view factory created by this EditorKit extends the standard HTMLFactory so that it recognizes the applet tag and creates an AppletComponentView instance to render the applet referenced by the tag. There may be issues with the security aspect of the applet running in the component; this has not been investigated.
In addition to adding applet support, the view factory also allows customization of whether images are loaded asynchronously; it queries the ContentPane as to whether or not this should occur based on whether the content pane was asked to scroll to a specific reference when its current page was loaded
AppletComponentView
,
CustomImageView
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.text.html.HTMLEditorKit |
---|
javax.swing.text.html.HTMLEditorKit.HTMLFactory, javax.swing.text.html.HTMLEditorKit.HTMLTextAction, javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction, javax.swing.text.html.HTMLEditorKit.LinkController, javax.swing.text.html.HTMLEditorKit.Parser, javax.swing.text.html.HTMLEditorKit.ParserCallback |
Nested classes/interfaces inherited from class javax.swing.text.StyledEditorKit |
---|
javax.swing.text.StyledEditorKit.AlignmentAction, javax.swing.text.StyledEditorKit.BoldAction, javax.swing.text.StyledEditorKit.FontFamilyAction, javax.swing.text.StyledEditorKit.FontSizeAction, javax.swing.text.StyledEditorKit.ForegroundAction, javax.swing.text.StyledEditorKit.ItalicAction, javax.swing.text.StyledEditorKit.StyledTextAction, javax.swing.text.StyledEditorKit.UnderlineAction |
Nested classes/interfaces inherited from class javax.swing.text.DefaultEditorKit |
---|
javax.swing.text.DefaultEditorKit.BeepAction, javax.swing.text.DefaultEditorKit.CopyAction, javax.swing.text.DefaultEditorKit.CutAction, javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction, javax.swing.text.DefaultEditorKit.InsertBreakAction, javax.swing.text.DefaultEditorKit.InsertContentAction, javax.swing.text.DefaultEditorKit.InsertTabAction, javax.swing.text.DefaultEditorKit.PasteAction |
Field Summary | |
---|---|
(package private) ContentPane |
contentPane
|
private static boolean |
loadAnnotations
|
private static boolean |
loadDocumentsAsynchronously
|
Fields inherited from class javax.swing.text.html.HTMLEditorKit |
---|
BOLD_ACTION, COLOR_ACTION, DEFAULT_CSS, FONT_CHANGE_BIGGER, FONT_CHANGE_SMALLER, IMG_ALIGN_BOTTOM, IMG_ALIGN_MIDDLE, IMG_ALIGN_TOP, IMG_BORDER, ITALIC_ACTION, LOGICAL_STYLE_ACTION, PARA_INDENT_LEFT, PARA_INDENT_RIGHT |
Fields inherited from class javax.swing.text.DefaultEditorKit |
---|
backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deletePrevCharAction, downAction, endAction, endLineAction, EndOfLineStringProperty, endParagraphAction, endWordAction, forwardAction, insertBreakAction, insertContentAction, insertTabAction, nextWordAction, pageDownAction, pageUpAction, pasteAction, previousWordAction, readOnlyAction, selectAllAction, selectionBackwardAction, selectionBeginAction, selectionBeginLineAction, selectionBeginParagraphAction, selectionBeginWordAction, selectionDownAction, selectionEndAction, selectionEndLineAction, selectionEndParagraphAction, selectionEndWordAction, selectionForwardAction, selectionNextWordAction, selectionPreviousWordAction, selectionUpAction, selectLineAction, selectParagraphAction, selectWordAction, upAction, writableAction |
Constructor Summary | |
---|---|
AppletHTMLEditorKit()
|
Method Summary | |
---|---|
javax.swing.text.Document |
createDefaultDocument()
Creates the default document used by this editor kit; the document created is the same as that which would be created by the HTMLEditorKit. |
javax.swing.text.ViewFactory |
getViewFactory()
Creates the ViewFactory associated with this editor kit, which is an instance of AppletViewFactory. |
void |
install(javax.swing.JEditorPane paneEditor)
Installs this editor kit into the JEditorPane paneEditor. |
static boolean |
isLoadDocumentsAsynchronously()
|
void |
read(java.io.Reader in,
javax.swing.text.Document doc,
int pos)
|
static void |
setLoadAnnotations(boolean load)
Specifies whether or not the editor kit should load annotations when the read method is called. |
static void |
setLoadDocumentsAsynchronously(boolean loadDocumentsAsynchronously)
|
Methods inherited from class javax.swing.text.html.HTMLEditorKit |
---|
clone, createInputAttributes, deinstall, getAccessibleContext, getActions, getContentType, getDefaultCursor, getInputAttributes, getLinkCursor, getParser, getStyleSheet, insertHTML, isAutoFormSubmission, setAutoFormSubmission, setDefaultCursor, setLinkCursor, setStyleSheet, write |
Methods inherited from class javax.swing.text.StyledEditorKit |
---|
getCharacterAttributeRun |
Methods inherited from class javax.swing.text.DefaultEditorKit |
---|
createCaret, read, write |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
ContentPane contentPane
private static boolean loadAnnotations
private static boolean loadDocumentsAsynchronously
Constructor Detail |
---|
public AppletHTMLEditorKit()
Method Detail |
---|
public javax.swing.text.Document createDefaultDocument()
Creates the default document used by this editor kit; the document created is the same as that which would be created by the HTMLEditorKit. However, it's asynchronous load priority is set to -1 to ensure that it is loaded in the event dispatch thread
createDefaultDocument
in class javax.swing.text.html.HTMLEditorKit
HTMLEditorKit.createDefaultDocument()
public void read(java.io.Reader in, javax.swing.text.Document doc, int pos) throws java.io.IOException, javax.swing.text.BadLocationException
read
in class javax.swing.text.html.HTMLEditorKit
java.io.IOException
javax.swing.text.BadLocationException
public void install(javax.swing.JEditorPane paneEditor)
install
in class javax.swing.text.html.HTMLEditorKit
public javax.swing.text.ViewFactory getViewFactory()
getViewFactory
in class javax.swing.text.html.HTMLEditorKit
public static void setLoadAnnotations(boolean load)
load
- true if annotations should be loaded, false if notpublic static boolean isLoadDocumentsAsynchronously()
public static void setLoadDocumentsAsynchronously(boolean loadDocumentsAsynchronously)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |