Package generic.theme
Class GAttributes
java.lang.Object
javax.swing.text.SimpleAttributeSet
generic.theme.GAttributes
- All Implemented Interfaces:
Serializable
,Cloneable
,AttributeSet
,MutableAttributeSet
A drop-in replacement for clients using
SimpleAttributeSet
s. This class will apply a
default set of font attributes based on the given font and optional color.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
-
Field Summary
Fields inherited from class javax.swing.text.SimpleAttributeSet
EMPTY
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiontoStyledHtml
(String content) A convenience method to style the given text in HTML using the font and color attributes defined in this attribute set.Methods inherited from class javax.swing.text.SimpleAttributeSet
addAttribute, addAttributes, clone, containsAttribute, containsAttributes, copyAttributes, equals, getAttribute, getAttributeCount, getAttributeNames, getResolveParent, hashCode, isDefined, isEmpty, isEqual, removeAttribute, removeAttributes, removeAttributes, setResolveParent, toString
-
Constructor Details
-
GAttributes
-
GAttributes
-
-
Method Details
-
toStyledHtml
A convenience method to style the given text in HTML using the font and color attributes defined in this attribute set. The text will be HTML escaped.- Parameters:
content
- the content- Returns:
- the styled content
- See Also:
-