AttributeSet
, MutableAttributeSet
StyleContext.NamedStyle
public interface Style extends MutableAttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
NameAttribute, ResolveAttribute
Modifier and Type | Method | Description |
---|---|---|
void |
addChangeListener |
Adds a listener to track whenever an attribute has been changed. |
String |
getName() |
Fetches the name of the style. |
void |
removeChangeListener |
Removes a listener that was tracking attribute changes. |
containsAttribute, containsAttributes, copyAttributes, getAttribute, getAttributeCount, getAttributeNames, getResolveParent, isDefined, isEqual
addAttribute, addAttributes, removeAttribute, removeAttributes, removeAttributes, setResolveParent
String getName()
null
is returned if there is no name associated with the style.void addChangeListener(ChangeListener l)
l
- the change listenervoid removeChangeListener(ChangeListener l)
l
- the change listener
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/text/Style.html