|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.java.swing.text.AbstractDocument | +--com.sun.java.swing.text.DefaultStyledDocument | +--com.sun.java.swing.text.html.HTMLDocument
Inner Class Summary | |
HTMLDocument.BlockElement
An element that represents a structual block of html. |
|
HTMLDocument.HTMLReader
An html reader to load an html document with an html element structure. |
|
static | HTMLDocument.Iterator
An iterator to iterate over a particular type of tag. |
HTMLDocument.RunElement
An element that represents a chunk of text that has a set of html character level attributes assigned to it. |
Inner classes inherited from class com.sun.java.swing.text.DefaultStyledDocument | |
DefaultStyledDocument.ElementBuffer , DefaultStyledDocument.ElementSpec , DefaultStyledDocument.SectionElement |
Inner classes inherited from class com.sun.java.swing.text.AbstractDocument | |
AbstractDocument.AbstractElement , AbstractDocument.AttributeContext , AbstractDocument.BranchElement , AbstractDocument.Content , AbstractDocument.DefaultDocumentEvent , AbstractDocument.ElementEdit , AbstractDocument.LeafElement |
Fields inherited from class com.sun.java.swing.text.DefaultStyledDocument | |
BUFFER_SIZE_DEFAULT |
Fields inherited from class com.sun.java.swing.text.AbstractDocument | |
BAD_LOCATION , BidiElementName , ContentElementName , ElementNameAttribute , listenerList , ParagraphElementName , SectionElementName |
Constructor Summary | |
HTMLDocument()
Constructs an html document. |
|
HTMLDocument(AbstractDocument.Content c,
StyleSheet styles)
Constructs an html document with the given content storage implementation and the given style/attribute storage mechanism. |
|
HTMLDocument(StyleSheet styles)
Constructs an html document with the default content storage implementation and the given style/attribute storage mechanism. |
Method Summary | |
protected void | create(DefaultStyledDocument.ElementSpec[] data)
Replaces the contents of the document with the given element specifications. |
protected Element | createBranchElement(Element parent,
AttributeSet a)
Creates a document branch element, that can contain other elements. |
protected AbstractDocument.AbstractElement | createDefaultRoot()
Creates the root element to be used to represent the default document structure. |
protected Element | createLeafElement(Element parent,
AttributeSet a,
int p0,
int p1)
Creates a document leaf element that directly represents text (doesn't have any children). |
URL | getBase()
Get the location to resolve relative url's against. |
HTMLDocument.Iterator | getIterator(HTML.Tag t)
Fetch an iterator for the following kind of html tag. |
HTMLEditorKit.ParserCallback | getReader(int pos)
Fetch the reader for the parser to use to load the document with html. |
StyleSheet | getStyleSheet()
Fetch the StyleSheet with the document-specific display rules(CSS) that were specified in the html document itself. |
protected void | insert(int offset,
DefaultStyledDocument.ElementSpec[] data)
Inserts new elements in bulk. |
void | setBase(URL u)
Set the location to resolve relative url's against. |
Methods inherited from class com.sun.java.swing.text.DefaultStyledDocument | |
addStyle , getBackground , getCharacterElement , getDefaultRootElement , getFont , getForeground , getLogicalStyle , getParagraphElement , getStyle , getStyleNames , insertUpdate , removeStyle , removeUpdate , setCharacterAttributes , setLogicalStyle , setParagraphAttributes |
Methods inherited from class com.sun.java.swing.text.AbstractDocument | |
addDocumentListener , addUndoableEditListener , createPosition , dump , fireChangedUpdate , fireInsertUpdate , fireRemoveUpdate , fireUndoableEditUpdate , getAttributeContext , getBidiRootElement , getContent , getCurrentWriter , getDocumentProperties , getEndPosition , getLength , getProperty , getRootElements , getStartPosition , getText , getText , insertString , postRemoveUpdate , putProperty , readLock , readUnlock , remove , removeDocumentListener , removeUndoableEditListener , render , setDocumentProperties , writeLock , writeUnlock |
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Constructor Detail |
public HTMLDocument()
public HTMLDocument(StyleSheet styles)
styles
- the stylespublic HTMLDocument(AbstractDocument.Content c, StyleSheet styles)
c
- the container for the content
styles
- the stylesMethod Detail |
public HTMLEditorKit.ParserCallback getReader(int pos)
public URL getBase()
public void setBase(URL u)
protected void insert(int offset, DefaultStyledDocument.ElementSpec[] data) throws BadLocationException
offset
- the starting offsetStyledDocument#insert
protected void create(DefaultStyledDocument.ElementSpec[] data)
public StyleSheet getStyleSheet()
public HTMLDocument.Iterator getIterator(HTML.Tag t)
protected Element createLeafElement(Element parent, AttributeSet a, int p0, int p1)
HTMLDocument.RunElement
.
parent
- the parent element
a
- the attributes for the element
p0
- the beginning of the range >= 0
p1
- the end of the range >= p0protected Element createBranchElement(Element parent, AttributeSet a)
HTMLDocument.BlockElement
.
parent
- the parent element
a
- the attributesprotected AbstractDocument.AbstractElement createDefaultRoot()
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |