Java Reference
In-Depth Information
Table 15-14. JTextPane Properties (Continued)
Property Name
Data Type
Access
inputAttributes
MutableAttributeSet
Read-only
logicalStyle
Style
Read-write
paragraphAttributes
AttributeSet
Read-only
styledDocument
StyledDocument
Read-write*
UIClassID
String
Read-only
*Changing the styledDocument property triggers a bound property notification on the document property.
Customizing a JTextPane Look and Feel
The JTextPane is a subclass of a JEditorPane . It has the same appearance under all the predefined
look and feel types as the JTextArea (see Figure 15-18). Although the contents might differ, the
look and feel is the same.
The available set of UIResource -related properties for a JTextPane is shown in Table 15-15.
For the JTextPane component, there are 15 different properties. Their names are similar to the
JTextArea settings.
Table 15-15. JTextPane UIResource Elements
Property String
Object Type
TextPane.actionMap
ActionMap
TextPane.background
Color
TextPane.border
Border
TextPane.caretAspectRatio
Number
TextPane.caretBlinkRate
Integer
TextPane.caretForeground
Color
TextPane.focusInputMap
InputMap
TextPane.font
Font
TextPane.foreground
Color
TextPane.inactiveForeground
Color
TextPane.keyBindings
KeyBinding[ ]
TextPane.margin
Insets
TextPane.selectionBackground
Color
TextPane.selectionForeground
Color
TextPaneUI
String
 
Search WWH ::




Custom Search