home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 November
/
Chip_1998-11_cd.bin
/
tema
/
Cafe
/
jfc.bin
/
MutableAttributeSet.java
< prev
next >
Wrap
Text File
|
1998-02-26
|
3KB
|
99 lines
/*
* @(#)MutableAttributeSet.java 1.6 97/12/16
*
* Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the confidential and proprietary information of Sun
* Microsystems, Inc. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with Sun.
*
* SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
* SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
* SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
* THIS SOFTWARE OR ITS DERIVATIVES.
*
*/
package com.sun.java.swing.text;
import java.util.Enumeration;
/**
* A generic interface for a mutable collection of unique attributes.
*
* Implementations will probably want to provide a constructor of the
* form:<tt>
* public XXXAttributeSet(ConstAttributeSet source);</tt>
*
* @version 1.6 12/16/97
*/
public interface MutableAttributeSet extends AttributeSet {
/**
* Creates a new attribute set similar to this one except that it contains
* an attribute with the given name and value. The object must be
* immutable, or not mutated by any client.
*
* @param name the name
* @param value the value
*/
public void addAttribute(Object name, Object value);
/**
* Creates a new attribute set similar to this one except that it contains
* the given attributes and values.
*
* @param attributes the set of attributes
*/
public void addAttributes(AttributeSet attributes);
/**
* Creates a new attribute set similar to this one except that it contains
* no attribute with the given name.
*
* @param name the attribute name
*/
public void removeAttribute(Object name);
/**
* Creates a new attribute set similar to this one except that it contains
* no attribute with any of the given names.
*
* @param names the set of names
*/
public void removeAttributes(Enumeration names);
/**
* Creates a new attribute set similar to this one except that it contains
* no attribute with any of the given names and values. Existing
* attributes with the same name and different value will remain.
*
* @param attributes the set of attributes
*/
public void removeAttributes(AttributeSet attributes);
/**
* Sets the resolving parent. This is the set
* of attributes to resolve through if an attribute
* isn't defined locally.
*
* @param parent the parent
*/
public void setResolveParent(AttributeSet parent);
}