javax.swing.plaf.basic
Class BasicHTML.BasicDocument
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.DefaultStyledDocument
javax.swing.text.html.HTMLDocument
javax.swing.plaf.basic.BasicHTML.BasicDocument
- All Implemented Interfaces:
- Document, Serializable, StyledDocument
- Enclosing class:
- BasicHTML
- static class BasicHTML.BasicDocument
- extends HTMLDocument
The subclass of HTMLDocument that is used as the model. getForeground
is overridden to return the foreground property from the Component this
was created for.
Methods inherited from class javax.swing.text.html.HTMLDocument |
create, createBranchElement, createDefaultRoot, createLeafElement, fireChangedUpdate, fireUndoableEditUpdate, getBase, getElement, getElement, getIterator, getParser, getPreservesUnknownTags, getReader, getReader, getStyleSheet, getTokenThreshold, insert, insertAfterEnd, insertAfterStart, insertBeforeEnd, insertBeforeStart, insertUpdate, processHTMLFrameHyperlinkEvent, setBase, setInnerHTML, setOuterHTML, setParagraphAttributes, setParser, setPreservesUnknownTags, setTokenThreshold |
Methods inherited from class javax.swing.text.DefaultStyledDocument |
addDocumentListener, addStyle, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, removeDocumentListener, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, styleChanged |
Methods inherited from class javax.swing.text.AbstractDocument |
addUndoableEditListener, createPosition, dump, fireInsertUpdate, fireRemoveUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, insertString, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.text.Document |
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeUndoableEditListener, render |
BasicHTML.BasicDocument
BasicHTML.BasicDocument(StyleSheet s,
Font defaultFont,
Color foreground)
- The host, that is where we are rendering.
setFontAndColor
private void setFontAndColor(Font font,
Color fg)
- Sets the default font and default color. These are set by
adding a rule for the body that specifies the font and color.
This allows the html to override these should it wish to have
a custom font or color.