Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Interface java.text.MutableAttributeSet

Implementing Classes:
TextAttributeSet

public interface MutableAttributeSet
extends AttributeSet
A generic interface for a mutable collection of unique attributes.

Functions taking AttributeSet as an argument maintain no reference to the attribute set itself. Thus a mutable attribute set may be safely passed to these functions, and later modifications to that set will not affect the contents of this set.

Implementations will probably want to provide a constructor of the form:
public XXXMutableAttributeSet(AttributeSet source);

See Also:
TextAttributeSet

Method Summary
void  add(String name, Object value)
Remove any existing attribute with the specified name, and add a new attribute with the specified name and value.
void  add(AttributeSet attributes)
Remove any existing attributes with the specified names, and add the new attributes.
void  remove(String name)
Remove any existing attribute with the specified name.
void  remove(Enumeration names)
Remove any existing attributes with the specified names.
void  set(AttributeSet attributes)
Remove all attributes and add the specified attributes.
 

Method Detail

add

public void add(String name,
                Object value)
Remove any existing attribute with the specified name, and add a new attribute with the specified name and value.
Parameters:
name - the name of the attribute to add
value - the value of the attribute to add

add

public void add(AttributeSet attributes)
Remove any existing attributes with the specified names, and add the new attributes.
Parameters:
attributes - the set of attributes to add

remove

public void remove(String name)
Remove any existing attribute with the specified name.
Parameters:
name - the name of the attribute to remove

remove

public void remove(Enumeration names)
Remove any existing attributes with the specified names.
Parameters:
names - an enumeration over the names of attributes to remove. The elements of the enumeration are Strings.

set

public void set(AttributeSet attributes)
Remove all attributes and add the specified attributes.
Parameters:
attributes - the set of attributes to add

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.