API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.text. StyleContext.NamedStyle View Source
Author(s)
Since
Version
Serial
Hierarchy
 Object
      StyleContext.NamedStyle
Implements
 Style
 Serializable
Subclasses
Description
public class StyleContext.NamedStyle
  A collection of attributes, typically used to represent character and paragraph styles.
See also:   
Constructors
public StyleContext.NamedStyle ()
Creates a new named style, with a null name and parent.
public StyleContext.NamedStyle (String name, Style parent)
  Creates a new named style.
public StyleContext.NamedStyle (Style parent)
  Creates a new named style.
Methods
Hide/Show inherited methods
public void addAttribute (Object name, Object value)
  Adds an attribute.
public void addAttributes (AttributeSet attr)
  Adds a set of attributes to the element.
public void addChangeListener (ChangeListener l) [Specified in Style]
  Adds a change listener.
public boolean containsAttribute (Object name, Object value)
  Checks whether a given attribute name/value is defined.
public boolean containsAttributes (AttributeSet attrs)
  Checks whether the element contains all the attributes.
public AttributeSet copyAttributes ()
  Copies a set of attributes.
protected void fireStateChanged ()
  Notifies all listeners that have registered interest for notification on this event type.
public Object getAttribute (Object attrName)
  Gets the value of an attribute.
public int getAttributeCount ()
  Gets the number of attributes that are defined.
public Enumeration<Object> getAttributeNames ()
  Gets the names of all attributes.
public ChangeListener getChangeListeners ()
  Returns an array of all the ChangeListeners added to this NamedStyle with addChangeListener().
public T getListeners (Class< T> listenerType)
  Return an array of all the listeners of the given type that were added to this model.
public String getName () [Specified in Style]
  Fetches the name of the style.
public AttributeSet getResolveParent ()
  Gets attributes from the parent.
public boolean isDefined (Object attrName)
  Checks whether a given attribute is defined.
public boolean isEqual (AttributeSet attr)
  Checks whether two attribute sets are equal.
public void removeAttribute (Object name)
  Removes an attribute from the set.
public void removeAttributes (AttributeSet attrs)
  Removes a set of attributes for the element.
public void removeAttributes (Enumeration<Object> names)
  Removes a set of attributes for the element.
public void removeChangeListener (ChangeListener l) [Specified in Style]
  Removes a change listener.
public void setName (String name)
  Changes the name of the style.
public void setResolveParent (AttributeSet parent)
  Sets the resolving parent.
public String toString ()
  Converts the style to a string.
Fields
Hide/Show inherited fields
protectedtransient ChangeEvent changeEvent
  Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
protected EventListenerList listenerList
The change listeners for the model.
publicfinalstatic Object NameAttribute [Inherited From Style]
Attribute name used to name the collection of attributes.
publicfinalstatic Object ResolveAttribute [Inherited From Style]
Attribute name used to identify the resolving parent set of attributes, if one is defined.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar