All Packages Class Hierarchy This Package Previous Next Index
Class xg.xg_AttList
java.lang.Object
|
+----xg.xg_AttList
- public class xg_AttList
- extends Object
- implements MutableAttributeSet
A list of xg_Attributes.
Note that this class implements all the methods of the DOM
org.w3c.dom.AttributeList interface, but since the rest of xg does not,
references to the DOM interfaces is commented out to allow xg to run
without the DOM interfaces being present.
-
AttributeHashtable
- Table of xg_Attributes, each with a name and a value.
-
AttributeVector
- Sequential list of xg_Attributes, each with a name and a value.
-
ResolveParent
- The parent attribute set to be used to locate attributes if they do not
exist in this set.
-
xg_AttList()
-
-
addAttribute(Object, Object)
- Add an attribute to the list.
-
addAttribute(String, String)
- Add an attribute, given its name and value.
-
addAttribute(xg_Attribute)
- Add an attribute.
-
addAttributes(AttributeSet)
- Add a set of attributes to the list.
-
clone()
- Clones this set of attributes.
-
containsAttribute(Object, Object)
- Return true if this set contains this attribute, and its value is the same
as that given.
-
containsAttributes(AttributeSet)
- Returns true if this set contains all the attributes with equal values.
-
copyAttributes()
- Return an attribute set that is guaranteed not to change over time.
-
duplicate()
- Create a new xg_AttList which is exactly the same as this one.
-
duplicateFrom(xg_AttList)
- Add an attribute to this att list corresponding to each attribute in the
InputAttList.
-
getAtt(int)
- Get the attribute with the given index.
-
getAtt(String)
- Get a named attribute.
-
getAttribute(Object)
- Get the value of the given attribute.
-
getAttributeCount()
- Get the number of attributes in this set.
-
getAttributeNames()
- Return an enumeration over the names of the attributes in the set.
-
getAttributeValue(String)
- Get the value of a named attribute.
-
getLength()
- Get the number of attributes in this list.
-
getResolveParent()
- Get the parent used in resolving attributes not present in this set.
-
isDefined(Object)
- Check whether the named attribute has a value specified in the set, without
resolving through another attribute set.
-
isEqual(AttributeSet)
- Determine if the two attribute sets are equivalent.
-
removeAttribute(Object)
- Remove an attribute from the list.
-
removeAttribute(String)
- Remove the named attribute.
-
removeAttributes(AttributeSet)
- Remove a set of attributes from the list.
-
removeAttributes(Enumeration)
- Remove a set of attributes from the list.
-
save(Writer)
- Save this attribute list (ie.
-
setResolveParent(AttributeSet)
- Set the resolving parent.
AttributeVector
protected Vector AttributeVector
- Sequential list of xg_Attributes, each with a name and a value.
AttributeHashtable
protected Hashtable AttributeHashtable
- Table of xg_Attributes, each with a name and a value.
ResolveParent
protected AttributeSet ResolveParent
- The parent attribute set to be used to locate attributes if they do not
exist in this set.
xg_AttList
public xg_AttList()
save
public void save(Writer InputWriter) throws IOException
- Save this attribute list (ie. its children) in XML source form in InputWriter.
- Parameters:
- InputWriter - The writer to which the XML will be written
duplicate
public xg_AttList duplicate()
- Create a new xg_AttList which is exactly the same as this one.
- Returns:
- A duplicate attribute list
duplicateFrom
public void duplicateFrom(xg_AttList InputAttList)
- Add an attribute to this att list corresponding to each attribute in the
InputAttList.
- Parameters:
- InputAttList - A duplicate attribute list
clone
public Object clone()
- Clones this set of attributes.
- Returns:
- The new set of attributes
- Overrides:
- clone in class Object
addAttribute
public boolean addAttribute(String InputAttName,
String InputAttValue)
- Add an attribute, given its name and value.
- Parameters:
- InputAttName - The name of this attribute
- InputAttValue - The value of this attribute
- Returns:
- Flag indicating success (true) or failure. Failure only occurs if
an attribute with this name already exists (which is an XML
well-formedness error).
addAttribute
public boolean addAttribute(xg_Attribute InputAttribute)
- Add an attribute.
- Parameters:
- InputAttribute - The attribute to be added
- Returns:
- Flag indicating success (true) or failure. Failure only occurs if
an attribute with this name already exists (which is an XML
well-formedness error).
removeAttribute
public xg_Attribute removeAttribute(String InputAttName)
- Remove the named attribute.
- Parameters:
- InputAttName - The name of the attribute required
- Returns:
- The attribute removed
getAtt
public xg_Attribute getAtt(int InputAttIndex)
- Get the attribute with the given index.
- Parameters:
- InputAttIndex - The index of the attribute required
- Returns:
- The attribute
getAttributeValue
public String getAttributeValue(String InputAttName)
- Get the value of a named attribute.
- Parameters:
- InputAttName - The name of the attribute required
- Returns:
- The value of the named attribute (or null if there is no attribute
with this name).
getAtt
public xg_Attribute getAtt(String InputAttName)
- Get a named attribute.
- Parameters:
- InputAttName - The name of the attribute required
- Returns:
- The named attribute (or null if there is no attribute with this name).
getLength
public int getLength()
- Get the number of attributes in this list.
(Implements org.w3c.dom.AttributeList.getLength().)
- Returns:
- The number of attributes in this list
getAttributeCount
public int getAttributeCount()
- Get the number of attributes in this set.
- Returns:
- The number of attributes in this set
isDefined
public boolean isDefined(Object attrName)
- Check whether the named attribute has a value specified in the set, without
resolving through another attribute set.
- Parameters:
- attrName - the attribute name
- Returns:
- true if the attribute has a value specified
isEqual
public boolean isEqual(AttributeSet attr)
- Determine if the two attribute sets are equivalent.
- Parameters:
- attr - an attribute set
- Returns:
- true if the sets are equivalent
copyAttributes
public AttributeSet copyAttributes()
- Return an attribute set that is guaranteed not to change over time.
- Returns:
- a copy of the attribute set
getAttribute
public Object getAttribute(Object InputAttName)
- Get the value of the given attribute. If the value is not found locally,
the search is continued upward through the resolving parent (if one exists)
until the value is either found or there are no more parents. If the value
is not found, null is returned.
- Parameters:
- InputAttName - The name of the required attribute
- Returns:
- The value of the requested attribute
getAttributeNames
public Enumeration getAttributeNames()
- Return an enumeration over the names of the attributes in the set.
The elements of the enumeration are all Strings. The set does not include
the resolving parent, if one is defined.
- Returns:
- The names of all the attributes
containsAttribute
public boolean containsAttribute(Object name,
Object value)
- Return true if this set contains this attribute, and its value is the same
as that given.
- Parameters:
- name - the non-null attribute name
- value - the value
- Returns:
- true if the set contains the attribute with an equal value
containsAttributes
public boolean containsAttributes(AttributeSet attributes)
- Returns true if this set contains all the attributes with equal values.
- Parameters:
- attributes - the set of attributes to check against
- Returns:
- true if this set contains all the attributes with equal values
getResolveParent
public AttributeSet getResolveParent()
- Get the parent used in resolving attributes not present in this set.
- Returns:
- The parent
addAttribute
public void addAttribute(Object InputAttName,
Object InputAttValue)
- Add an attribute to the list.
- Parameters:
- InputAttName - the name
- InputAttValue - the value
addAttributes
public void addAttributes(AttributeSet attributes)
- Add a set of attributes to the list.
- Parameters:
- attributes - the set of attributes
removeAttribute
public void removeAttribute(Object InputAttName)
- Remove an attribute from the list.
- Parameters:
- InputAttName - The name of the attribute to remove
removeAttributes
public void removeAttributes(Enumeration InputAttNames)
- Remove a set of attributes from the list.
- Parameters:
- InputAttNames - The names of the attributes to remove
removeAttributes
public void removeAttributes(AttributeSet InputAttToRemove)
- Remove a set of attributes from the list. Existing attributes with the same
name and different value will remain.
- Parameters:
- InputAttToRemove - The set of attributes to be removed
setResolveParent
public void setResolveParent(AttributeSet InputResolveParent)
- Set the resolving parent. This is the set of attributes to resolve through
if an attribute isn't defined locally.
- Parameters:
- InputResolveParent - The parent
All Packages Class Hierarchy This Package Previous Next Index