Package org.jdesktop.swingx.plaf.basic
Class BasicHyperlinkUI.ULHtml.BasicDocument
- java.lang.Object
-
- javax.swing.text.AbstractDocument
-
- javax.swing.text.DefaultStyledDocument
-
- javax.swing.text.html.HTMLDocument
-
- org.jdesktop.swingx.plaf.basic.BasicHyperlinkUI.ULHtml.BasicDocument
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.text.Document
,javax.swing.text.StyledDocument
- Enclosing class:
- BasicHyperlinkUI.ULHtml
static class BasicHyperlinkUI.ULHtml.BasicDocument extends javax.swing.text.html.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.text.html.HTMLDocument
javax.swing.text.html.HTMLDocument.BlockElement, javax.swing.text.html.HTMLDocument.HTMLReader, javax.swing.text.html.HTMLDocument.Iterator, javax.swing.text.html.HTMLDocument.RunElement
-
Nested classes/interfaces inherited from class javax.swing.text.DefaultStyledDocument
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit, javax.swing.text.DefaultStyledDocument.ElementBuffer, javax.swing.text.DefaultStyledDocument.ElementSpec, javax.swing.text.DefaultStyledDocument.SectionElement
-
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.Class<?>
clz
private static java.lang.reflect.Method
displayPropertiesToCSS
-
Constructor Summary
Constructors Constructor Description BasicDocument(javax.swing.text.html.StyleSheet s, java.awt.Font defaultFont, java.awt.Color foreground)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
displayPropertiesToCSS(java.awt.Font f, java.awt.Color c)
private void
setFontAndColor(java.awt.Font font, java.awt.Color fg)
Sets the default font and default color.-
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, removeElement, 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
-
-
-
-
Method Detail
-
displayPropertiesToCSS
private static java.lang.String displayPropertiesToCSS(java.awt.Font f, java.awt.Color c)
-
setFontAndColor
private void setFontAndColor(java.awt.Font font, java.awt.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.
-
-