public class IlvSettingsElement extends IlvSettingsNode implements Element
IlvSettingsATTRIBUTE_NODE, ELEMENT_NODE, ROOT_ELEMENT_NODEATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Constructor and Description |
|---|
IlvSettingsElement(IlvSettings settings)
Creates a settings element for the specified
settings. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(IlvSettingsElement newChild)
Makes
newChild a new child of this settings element by adding
it to the child array of the element. |
static IlvSettingsElement[] |
AddElement(IlvSettingsElement[] elements,
IlvSettingsElement element,
int index)
Adds a settings element to the specified array of settings elements at the
specified index.
|
Node |
appendChild(Node newChild)
Adds the node
newChild to the end of the list of children of
this node. |
Node |
cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy
constructor for nodes.
|
short |
compareDocumentPosition(Node other) |
IlvSettingsElement |
ensureChildElement(IlvSettingsQuery query)
Ensures a descendant of this element accessible with the specified
relative
query exists. |
IlvSettingsElement |
ensureChildElement(String type)
Ensures a child element of this element with the specified
type exists. |
IlvSettingsElement |
ensureChildElement(String type,
String attributeName,
Object value)
Ensures a child element of this element exists with the specified
type and with the value of the attribute
attributeName equal to value. |
boolean |
equals(Object obj)
Returns whether this element is equal to the specified object.
|
String |
getAttribute(String name)
Retrieves an attribute value by name.
|
String[] |
getAttributeNames()
Returns the name of the attributes of this settings element.
|
Attr |
getAttributeNode(String name)
Retrieves an
Attr node by name. |
Attr |
getAttributeNodeNS(String namespaceURI,
String localName)
Retrieves an
Attr node by local name and namespace URI. |
IlvSettingsAttribute[] |
getAttributeNodes()
Returns the settings attributes of this settings element.
|
String |
getAttributeNS(String namespaceURI,
String localName)
Retrieves an attribute value by local name and namespace URI.
|
NamedNodeMap |
getAttributes()
A
NamedNodeMap containing the attributes of this element. |
Object |
getAttributeValue(String attributeName)
Gets an attribute value.
|
String |
getBaseURI() |
boolean |
getBoolean(String attributeName)
Returns the value of the attribute with the specified name as a boolean.
|
boolean |
getBoolean(String attributeName,
boolean defaultValue)
Returns the value of the attribute with the specified name as a boolean.
|
Object |
getCascadedElement(IlvSettings settings)
Returns the element of the specified settings that has been cascaded in
this settings element
|
Object |
getCascadedElement(int level)
Returns the
level cascaded element that this settings element
refers to. |
int |
getCascadedElementCount()
Returns the number of elements of settings models that this element refers to.
|
IlvSettings |
getCascadedSettings(int level)
Returns the settings that own the
level cascaded element
that this settings element refers to. |
IlvSettingsElement |
getChild(String type,
String attributeName,
Object attributeValue)
Returns the child element of this element with the specified type
and attribute value.
|
NodeList |
getChildNodes()
A
NodeList that contains all children of this node. |
IlvSettingsElement[] |
getChildren()
Returns the child elements of this element.
|
IlvSettingsElement[] |
getChildren(IlvSettingsQuery query)
Returns the descendent elements that are selected by the specified query,
starting the selection from this settings element.
|
IlvSettingsElement[] |
getChildren(String type)
Returns the child elements of this element with the specified type.
|
Color |
getColor(String attributeName)
Returns the value of the attribute with the specified name as a color.
|
Color |
getColor(String attributeName,
Color defaultValue)
Returns the value of the attribute with the specified name as a color.
|
Color[] |
getColorArray(String type,
String attributeName)
Returns an array of colors.
|
Date |
getDate(String attributeName)
Returns the value of the attribute with the specified name as a date.
|
Date |
getDate(String attributeName,
Date defaultValue)
Returns the value of the attribute with the specified name as a double.
|
Object |
getDefaultAttributeValue(String attributeName)
Returns an attribute value that does not take into account the
value defined in the user settings.
|
Element |
getDOMElement()
Returns the DOM element this settings element is associated with.
|
double |
getDouble(String attributeName)
Returns the value of the attribute with the specified name as a double.
|
double |
getDouble(String attributeName,
double defaultValue)
Returns the value of the attribute with the specified name as a double.
|
IlvSettingsElement |
getElement(String type,
String attributeName,
Object value)
Returns the first child element of this element with the specified
type and the
attributeName attribute with the specified
value. |
NodeList |
getElementsByTagName(String name)
Returns a
NodeList of all descendant elements with a given
tag name, in the order in which they would be encountered in a preorder
traversal of the Element tree. |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
Returns a
NodeList of all the descendant
Elements with a given local name and namespace URI in
the order in which they are encountered in a preorder traversal of
this Element tree. |
Object |
getFeature(String feature,
String version) |
Node |
getFirstChild()
The first child of this node.
|
IlvSettingsElement |
getFirstChild(String type)
Returns the first settings element that is child of this settings element
and that has the specified type.
|
float |
getFloat(String attributeName)
Returns the value of the attribute with the specified name as a float.
|
float |
getFloat(String attributeName,
float defaultValue)
Returns the value of the attribute with the specified name as a float.
|
Font |
getFont(String attributeName)
Returns the value of the attribute with the specified name as a font.
|
Font |
getFont(String attributeName,
Font defaultValue)
Returns the value of the attribute with the specified name as a font.
|
Object |
getID()
Returns the ID value of this settings element.
|
int |
getInt(String attributeName)
Returns the value of the attribute with the specified name as an integer.
|
int |
getInt(String attributeName,
int defaultValue)
Returns the value of the attribute with the specified name as an integer.
|
Node |
getLastChild()
The last child of this node.
|
String |
getLocalName()
Returns the local part of the qualified name of this node.
|
String |
getNamespaceURI()
The namespace URI of this node, or
null if it is
unspecified. |
Node |
getNextSibling()
The node immediately following this node.
|
String |
getNodeName()
Returns the name of this node.
|
short |
getNodeType()
Returns
IlvSettingsNode.ELEMENT_NODE to specify this node is an element node. |
String |
getNodeValue()
The value of this node.
|
Document |
getOwnerDocument()
The
Document object associated with this node. |
String |
getPrefix()
The namespace prefix of this node, or
null if it is
unspecified. |
Node |
getPreviousSibling()
The node immediately preceding this node.
|
Rectangle |
getRectangle()
Returns a rectangle from this settings element.
|
Rectangle |
getRectangle(Rectangle defaultRect)
Returns a rectangle from this settings element.
|
TypeInfo |
getSchemaTypeInfo() |
String |
getString(String attributeName)
Returns the value of the attribute with the specified name as a string.
|
String |
getString(String attributeName,
String defaultValue)
Returns the value of the attribute with the specified name as a string.
|
String[] |
getStringArray(String type,
String attributeName)
Returns an array of string attribute values.
|
String |
getTagName()
The name of the element.
|
String |
getText()
Returns the text value of this settings element.
|
String |
getTextContent() |
String |
getType()
Returns the type of this settings element.
|
Object |
getUserData(String key) |
boolean |
hasAttribute(String name)
Returns
true when an attribute with a given name is
specified on this element or has a default value, false
otherwise. |
boolean |
hasAttributeNS(String namespaceURI,
String localName)
Returns
true when an attribute with a given local name and
namespace URI is specified on this element or has a default value,
false otherwise. |
boolean |
hasAttributes()
Returns whether this element has any attributes.
|
boolean |
hasChildNodes()
This is a convenience method to allow easy determination of whether a
node has any children.
|
void |
insert(IlvSettingsElement newChild,
int index)
Makes
newChild a new child of this settings element by adding
it to the child array of the element at the specified insertion index. |
Node |
insertBefore(Node newChild,
Node refChild)
Inserts the node
newChild before the existing child node
refChild. |
boolean |
isDefaultNamespace(String namespaceURI) |
boolean |
isDOMElement()
Determines whether this settings element is associated with a unique
Element, without any cascading applied on this element. |
boolean |
isEqualNode(Node arg) |
boolean |
isSameNode(Node other) |
boolean |
isSupported(String feature,
String version)
Tests whether the DOM implementation implements a specific feature and
that feature is supported by this node.
|
String |
lookupNamespaceURI(String prefix) |
String |
lookupPrefix(String namespaceURI) |
boolean |
matchType(String type)
Determines whether this element matches the specified type.
|
void |
normalize()
Puts all
Text nodes in the full depth of the sub-tree
underneath this Element into a "normal" form where only
markup (e.g., tags, comments, processing instructions, CDATA sections,
and entity references) separates Text nodes, i.e., there
are no adjacent Text nodes. |
boolean |
remove(IlvSettingsElement aChild)
Removes the specified child element from the child array of the element.
|
void |
removeAll(String type)
Removes all the child elements of this element with the specified type.
|
void |
removeAttribute(String name)
Removes an attribute by name.
|
Attr |
removeAttributeNode(Attr oldAttr)
Removes the specified attribute.
|
void |
removeAttributeNS(String namespaceURI,
String localName)
Removes an attribute by local name and namespace URI.
|
boolean |
removeCascadedElement(Object element)
Removes the specified cascaded element from the list of cascaded elements
stored within this settings element.
|
Node |
removeChild(Node oldChild)
Removes the child node indicated by
oldChild from the list
of children, and returns it. |
static IlvSettingsElement[] |
RemoveElement(IlvSettingsElement[] elements,
IlvSettingsElement element)
Removes the settings element from the specified array of settings elements.
|
void |
removeFromParent()
Removes this settings element from its parent.
|
Node |
replaceChild(Node newChild,
Node oldChild)
Replaces the child node
oldChild with newChild
in the list of children, and returns the oldChild node. |
void |
resetModifications()
Resets the modifications brought to this element and its child
elements.
|
void |
setAttribute(String name,
String value)
Adds a new attribute.
|
Attr |
setAttributeNode(Attr newAttr)
Adds a new attribute.
|
Attr |
setAttributeNodeNS(Attr newAttr)
Adds a new attribute.
|
void |
setAttributeNS(String namespaceURI,
String qualifiedName,
String value)
Adds a new attribute.
|
void |
setAttributeValue(String attributeName,
Object value)
Sets a new value to the attribute of this element with the specified name.
|
void |
setBoolean(String attributeName,
boolean value)
Sets a boolean value to the attribute with the specified name.
|
void |
setColor(String attributeName,
Color color)
Sets a color value to the attribute with the specified name.
|
void |
setColorArray(String type,
String attributeName,
Color[] colors)
Sets an array of color values.
|
void |
setDate(String attributeName,
Date date)
Sets a date value to the attribute with the specified name.
|
void |
setDouble(String attributeName,
double value)
Sets a double value to the attribute with the specified name.
|
void |
setFloat(String attributeName,
float value)
Sets a float value to the attribute with the specified name.
|
void |
setFont(String attributeName,
Font font)
Sets a font value to the attribute with the specified name.
|
boolean |
setID(Object id)
Sets an ID value to this settings element.
|
void |
setIdAttribute(String name,
boolean isId) |
void |
setIdAttributeNode(Attr idAttr,
boolean isId) |
void |
setIdAttributeNS(String namespaceURI,
String localName,
boolean isId) |
void |
setInt(String attributeName,
int value)
Sets an integer value to the attribute with the specified name.
|
void |
setNodeValue(String nodeValue)
Changes the value of this node.
|
void |
setPrefix(String prefix)
Sets the prefix of this element.
|
void |
setRectangle(Rectangle rect)
Sets the
x, y, width, and
height attribute values of this settings element
respectively to the value of the fields x, y,
width, and height of the specified rectangle. |
void |
setString(String attributeName,
String value)
Sets a string value to the attribute with the specified name.
|
void |
setStringArray(String type,
String attributeName,
String[] strings)
Sets an array of string values.
|
void |
setText(String value)
Sets a new text value.
|
void |
setTextContent(String textContent) |
Object |
setUserData(String key,
Object data,
UserDataHandler handler) |
String |
toString()
Returns a string representation of the settings element.
|
getParent, getParentNode, getSettingsclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetParentNodepublic IlvSettingsElement(IlvSettings settings)
settings.settings - The settings of this element.public String getBaseURI()
getBaseURI in interface NodegetBaseURI in class IlvSettingsNodepublic short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition in interface NodecompareDocumentPosition in class IlvSettingsNodeDOMExceptionpublic String getTextContent() throws DOMException
getTextContent in interface NodegetTextContent in class IlvSettingsNodeDOMExceptionpublic void setTextContent(String textContent) throws DOMException
setTextContent in interface NodesetTextContent in class IlvSettingsNodeDOMExceptionpublic boolean isSameNode(Node other)
isSameNode in interface NodeisSameNode in class IlvSettingsNodepublic String lookupPrefix(String namespaceURI)
lookupPrefix in interface NodelookupPrefix in class IlvSettingsNodepublic boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace in interface NodeisDefaultNamespace in class IlvSettingsNodepublic String lookupNamespaceURI(String prefix)
lookupNamespaceURI in interface NodelookupNamespaceURI in class IlvSettingsNodepublic boolean isEqualNode(Node arg)
isEqualNode in interface NodeisEqualNode in class IlvSettingsNodepublic Object getFeature(String feature, String version)
getFeature in interface NodegetFeature in class IlvSettingsNodepublic Object setUserData(String key, Object data, UserDataHandler handler)
setUserData in interface NodesetUserData in class IlvSettingsNodepublic Object getUserData(String key)
getUserData in interface NodegetUserData in class IlvSettingsNodepublic TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo in interface Elementpublic void setIdAttribute(String name, boolean isId) throws DOMException
setIdAttribute in interface ElementDOMExceptionpublic void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException
setIdAttributeNS in interface ElementDOMExceptionpublic void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException
setIdAttributeNode in interface ElementDOMExceptionpublic short getNodeType()
IlvSettingsNode.ELEMENT_NODE to specify this node is an element node.getNodeType in interface NodegetNodeType in class IlvSettingsNodepublic int getInt(String attributeName)
attributeName - The name of the attribute to retrieve the value from.Integer.MIN_VALUE will be returned.getInt(String, int),
setInt(java.lang.String, int)public int getInt(String attributeName, int defaultValue)
attributeName - The name of the attribute to retrieve the value from.defaultValue - The default value that is returned if the attribute
with the specified name is not found.defaultValue will be returned.getInt(String),
setInt(java.lang.String, int)public void setInt(String attributeName, int value)
attributeName - The name of the attribute to set a value to.value - The new value of the attribute.getInt(String),
getInt(String, int)public String getString(String attributeName)
attributeName - The name of the attribute to retrieve the value from.nul if no attribute is found with the
specified name.getString(String, String),
setString(java.lang.String, java.lang.String)public String getString(String attributeName, String defaultValue)
attributeName - The name of the attribute to retrieve the value from.defaultValue - The default value that is returned if the attribute
with the specified name is not found.defaultValue will be returned.getString(String),
setString(java.lang.String, java.lang.String)public void setString(String attributeName, String value)
attributeName - The name of the attribute to set a value to.value - The new value of the attribute.getString(String),
getString(String, String)public String getText()
IlvXMLSettings.DEFAULT_TAG_TEXT_ATTRIBUTEpublic void setText(String value)
value - The new text value of the element.getText()public boolean getBoolean(String attributeName)
attributeName - The name of the attribute to retrieve the value from.false if no attribute is found with the
specified name.getBoolean(String, boolean),
setBoolean(java.lang.String, boolean)public boolean getBoolean(String attributeName, boolean defaultValue)
attributeName - The name of the attribute to retrieve the value from.defaultValue - The default value that is returned if the attribute
with the specified name is not found.defaultValue will be returned.getBoolean(String),
setBoolean(java.lang.String, boolean)public void setBoolean(String attributeName, boolean value)
attributeName - The name of the attribute to set a value to.value - The new value of the attribute.getBoolean(String),
getBoolean(String, boolean)public float getFloat(String attributeName)
attributeName - The name of the attribute to retrieve the value from.Float.MIN_VALUE will be returned.getFloat(String, float),
setFloat(java.lang.String, float)public float getFloat(String attributeName, float defaultValue)
attributeName - The name of the attribute to retrieve the value from.defaultValue - The default value that is returned if the attribute
with the specified name is not found.defaultValue will be returned.getFloat(String),
setFloat(java.lang.String, float)public void setFloat(String attributeName, float value)
attributeName - The name of the attribute to set a value to.value - The new value of the attribute.public double getDouble(String attributeName)
attributeName - The name of the attribute to retrieve the value from.Double.MIN_VALUE will be returned.getDouble(String, double),
setDouble(java.lang.String, double)public double getDouble(String attributeName, double defaultValue)
attributeName - the name of the attribute to retrieve the value from.defaultValue - The default value that is returned if the attribute
with the specified name is not found.defaultValue will be returned.getDouble(String),
setDouble(java.lang.String, double)public void setDouble(String attributeName, double value)
attributeName - The name of the attribute to set a value to.value - The new value of the attribute.getDouble(String, double),
getDouble(String)public Date getDate(String attributeName)
attributeName - The name of the attribute to retrieve the value from.null if no attribute is found with the
specified name.getDate(String, java.util.Date),
setDate(String, java.util.Date)public Date getDate(String attributeName, Date defaultValue)
attributeName - The name of the attribute to retrieve the value from.defaultValue - The default value that is returned if the attribute
with the specified name is not found.defaultValue will be returned.getDate(String),
setDate(java.lang.String, java.util.Date)public void setDate(String attributeName, Date date)
attributeName - The name of the attribute to set a value to.date - The new value of the attribute.getDate(String),
getDate(String, java.util.Date)public Color getColor(String attributeName)
attributeName - The name of the attribute to retrieve the value from.null if no attribute is found with the
specified name.getColor(String, Color),
setColor(java.lang.String, java.awt.Color)public Color getColor(String attributeName, Color defaultValue)
attributeName - The name of the attribute to retrieve the value from.defaultValue - The default value that is returned if the attribute
with the specified name is not found.defaultValue will be returned.getColor(String),
setColor(java.lang.String, java.awt.Color)public void setColor(String attributeName, Color color)
attributeName - The name of the attribute to set a value to.color - The new value of the attribute.getColor(String, Color),
getColor(String)public Font getFont(String attributeName)
attributeName - The name of the attribute to retrieve the value from.null if no attribute is found with the
specified name.getFont(String, Font),
setFont(java.lang.String, java.awt.Font)public Font getFont(String attributeName, Font defaultValue)
attributeName - The name of the attribute to retrieve the value from.defaultValue - The default value that is returned if the attribute
with the specified name is not found.defaultValue will be returned.getFont(String),
setFont(java.lang.String, java.awt.Font)public void setFont(String attributeName, Font font)
attributeName - The name of the attribute to set a value to.font - The new value of the attribute.getFont(java.lang.String)public Rectangle getRectangle()
x, y, width, and
height that respectively correspond to the fields
x, y, width and
height of the returned rectangle.getRectangle(Rectangle),
setRectangle(java.awt.Rectangle)public Rectangle getRectangle(Rectangle defaultRect)
x, y, width, and
height that respectively correspond to the fields
x, y, width and
height of the returned rectangle.defaultRect - The default rectangle that is returned if this element
does not contain the settings for a rectangle.defaultRect if no
rectangle is defined in this settings element.getRectangle(),
setRectangle(java.awt.Rectangle)public void setRectangle(Rectangle rect)
x, y, width, and
height attribute values of this settings element
respectively to the value of the fields x, y,
width, and height of the specified rectangle.rect - The rectangle to set to this settings element.getRectangle()public Object getAttributeValue(String attributeName)
attributeName - The name of the attribute to retrieve a value from.public void setAttributeValue(String attributeName, Object value)
attributeName - The name of the attribute to change the value of.value - The new value of the attribute.public String[] getStringArray(String type, String attributeName)
type and returns the values of their
attributeName attribute.type - The type of the child elements to retrieve values from.attributeName - The name of the attribute of the selected child
elements to get the value from. If null, the text of
selected child elements will be returned.setStringArray(java.lang.String, java.lang.String, java.lang.String[])public void setStringArray(String type, String attributeName, String[] strings)
type equal to the difference will be created and added as child elements
of this element.
Specified string values are then set to the
attributeName attribute of the selected child elements. The
first selected element is set the value strings[0] and so on.
type - The type of the child elements to set the values to.attributeName - The name of the attribute of the selected child
elements to get the value from. If null, the text of
selected child elements will be returned.strings - The array of strings to set.getStringArray(java.lang.String, java.lang.String)public Color[] getColorArray(String type, String attributeName)
type and returns the color values of their
attributeName attribute.type - The type of the child elements to retrieve values from.attributeName - The name of the attribute of the selected child
elements to get the value from.setColorArray(java.lang.String, java.lang.String, java.awt.Color[])public void setColorArray(String type, String attributeName, Color[] colors)
type equal to the difference will be created and added as child elements
of this element.
Specified color values are then set to the
attributeName attribute of the selected child elements. The
first selected element is set the value colors[0] and so on.
type - The type of the child elements to set the values to.attributeName - The name of the attribute of the selected child
elements to get the value from.colors - The array of colors to set.getColorArray(java.lang.String, java.lang.String)public IlvSettingsAttribute[] getAttributeNodes()
public String[] getAttributeNames()
public String getType()
public IlvSettingsElement getFirstChild(String type)
type - The type of the element to retrieve. If null,
the first child will be returned.public IlvSettingsElement[] getChildren(IlvSettingsQuery query)
public IlvSettingsElement[] getChildren(String type)
type - The type of the child elements to return. If null,
all the child elements of this element will be returned.public IlvSettingsElement[] getChildren()
public IlvSettingsElement getChild(String type, String attributeName, Object attributeValue)
type - The type of the child element to retrieveattributeName - The name of the attribute with the value that is compared.attributeValue - The value to compare with.null if no child element of this element
matches the specified type and attribute value.public IlvSettingsElement ensureChildElement(IlvSettingsQuery query)
query exists. If a settings element could not be
retrieved with the specified query, a new settings element will be created
and added to this element, so that it is selectable from the specified
query.query - The query relative to this context element that selects the
descendent element to retrieve.null if no elements could be found or created.ensureChildElement(String),
ensureChildElement(String, String, Object)public IlvSettingsElement ensureChildElement(String type)
type exists. If no child element could be found with
this type, a new settings element will be created with this type and added
to this settings element.type - The type of the child element to retrieve.ensureChildElement(IlvSettingsQuery),
ensureChildElement(String, String, Object)public IlvSettingsElement ensureChildElement(String type, String attributeName, Object value)
type and with the value of the attribute
attributeName equal to value.
If no child element could be found that matches those parameters, a new
settings element will be created and initialized with those parameters. It will then be
inserted as a child of this element.type - The type of the child element to retrieve.attributeName - The name of the attribute to match the value with.value - The value of the attribute to match.ensureChildElement(IlvSettingsQuery),
ensureChildElement(String)public IlvSettingsElement getElement(String type, String attributeName, Object value)
attributeName attribute with the specified
value.type - The type of the returned element.attributeName - The name of the attribute to match the specified value
with.value - The value of the attribute to test.public Object getDefaultAttributeValue(String attributeName)
attributeName - The name of the attribute to retrieve a value from.null if the element does not
contain an attribute with the specified name.public Object getID()
null if no ID is found.public boolean setID(Object id)
id - The new ID value.true if the specified ID value could be set to this
settings element; false otherwise.public void add(IlvSettingsElement newChild)
newChild a new child of this settings element by adding
it to the child array of the element. All the descendent elements of the
specified element are copied with it.newChild - The element to add as a child of this element.public void insert(IlvSettingsElement newChild, int index)
newChild a new child of this settings element by adding
it to the child array of the element at the specified insertion index.newChild - The element to add as a child of this element.index - The insertion index of the new child. If equal to
-1, the new child is added to the end of the child
array of this element.public boolean remove(IlvSettingsElement aChild)
aChild - The element to remove from the child array of the element.true if the specified element was previously added
as a child of this element.public void removeFromParent()
public void removeAll(String type)
type - The settings type of the elements to remove. If null,
all the child elements will be removed.public int getCascadedElementCount()
public Object getCascadedElement(int level)
level cascaded element that this settings element
refers to.level - The cascading level to retrieve the cascaded element from.level cascaded element.public Object getCascadedElement(IlvSettings settings)
settings - The settings element that owns the element to retrievenull if the cascaded element of this settings element is owned by the
specified settings.public IlvSettings getCascadedSettings(int level)
level cascaded element
that this settings element refers to.level - The cascading level.level cascaded object.public boolean removeCascadedElement(Object element)
element - The cascaded element to remove.true if the specified element was cascaded within this
settings element; false otherwise.public boolean isDOMElement()
Element, without any cascading applied on this element.true if the method getDOMElement() returns
a non-null element; false otherwise.getDOMElement()public Element getDOMElement()
Element if and only
if this settings element verifies the two conditions:
getCascadedElementCount() returns 1Element
but not an instanceof IlvSettingsElement.
true if this settings element is associated with
a unique Element; false otherwise.isDOMElement(),
getCascadedElementCount(),
getCascadedElement(int)public boolean matchType(String type)
matchType in class IlvSettingsNodetype - The type to compare the type of the element with.true if the specified type is null
or equal to "*"; true is also returned
if the type of the element is equal to the specified type; false
otherwise.public boolean equals(Object obj)
public void resetModifications()
This method has no effects if this element was previously removed from the settings.
public static IlvSettingsElement[] AddElement(IlvSettingsElement[] elements, IlvSettingsElement element, int index)
elements - The array of elements to insert an element into.element - The element to insertindex - The insertion index. If equal to -1, the element
will be added at the last position of the array.public static IlvSettingsElement[] RemoveElement(IlvSettingsElement[] elements, IlvSettingsElement element)
elements - The array of elements to remove the element from.element - The element to remove.public String toString()
public String getNodeName()
Node.getNodeName() for more details on the
value returned by this method.getNodeName in interface Nodepublic String getNodeValue() throws DOMException
Node.getNodeValue() for more details on the
value returned by this method.getNodeValue in interface NodeDOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString variable on the implementation
platform.setNodeValue(java.lang.String)public void setNodeValue(String nodeValue) throws DOMException
setText(java.lang.String).setNodeValue in interface NodenodeValue - The new text of this element.DOMExceptionpublic NodeList getChildNodes()
NodeList that contains all children of this node.
Node.getChildNodes() for more details on the
value returned by this method.getChildNodes in interface Nodepublic Node getFirstChild()
null.getFirstChild in interface Nodepublic Node getLastChild()
null.getLastChild in interface Nodepublic Node getPreviousSibling()
null.getPreviousSibling in interface Nodepublic Node getNextSibling()
null.getNextSibling in interface Nodepublic NamedNodeMap getAttributes()
NamedNodeMap containing the attributes of this element.getAttributes in interface Nodepublic Document getOwnerDocument()
Document object associated with this node. This is also
the Document object used to create new nodes. When this
node is a Document this is null.getOwnerDocument in interface Nodepublic Node insertBefore(Node newChild, Node refChild) throws DOMException
newChild before the existing child node
refChild. If refChild is null,
insert newChild at the end of the list of children.
newChild is a DocumentFragment object,
all of its children are inserted, in the same order, before
refChild. If the newChild is already in the
tree, it is first removed.insertBefore in interface NodenewChild - The node to insert.refChild - The reference node, i.e., the node before which the new
node must be inserted.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild node, or if
the node to insert is one of this node's ancestors.
newChild was created
from a different document than the one that created this node.
refChild is not a child of
this node.public Node replaceChild(Node newChild, Node oldChild) throws DOMException
oldChild with newChild
in the list of children, and returns the oldChild node. If
the newChild is already in the tree, it is first removed.replaceChild in interface NodenewChild - The new node to put in the child list.oldChild - The node being replaced in the list.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild node, or it
the node to put in is one of this node's ancestors.
newChild was created
from a different document than the one that created this node.
oldChild is not a child of
this node.public Node removeChild(Node oldChild) throws DOMException
oldChild from the list
of children, and returns it.removeChild in interface NodeoldChild - The node being removed.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
oldChild is not a child of
this node.public Node appendChild(Node newChild) throws DOMException
newChild to the end of the list of children of
this node. If the newChild is already in the tree, it is
first removed.appendChild in interface NodenewChild - The node to add.If it is a DocumentFragment
object, the entire contents of the document fragment are moved into
the child list of this nodeDOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild node, or if
the node to append is one of this node's ancestors.
newChild was created
from a different document than the one that created this node.
public boolean hasChildNodes()
hasChildNodes in interface Nodetrue if the node has any children,
false if the node has no children.public Node cloneNode(boolean deep)
parentNode returns null.).
Element copies all attributes and their
values, including those generated by the XML processor to represent
defaulted attributes, but this method does not copy any text it contains
unless it is a deep clone, since the text is contained in a child
Text node. Cloning any other type of node simply returns a
copy of this node.public String getTagName()
tagName has
the value "elementExample". Note that this is
case-preserving in XML, as are all of the operations of the DOM. The
HTML DOM returns the tagName of an HTML element in the
canonical uppercase form, regardless of the case in the source HTML
document.getTagName in interface Elementpublic String getAttribute(String name)
getAttribute in interface Elementname - The name of the attribute to retrieve.Attr value as a string, or the empty string if
that attribute does not have a specified or default value.setAttribute(java.lang.String, java.lang.String)public void setAttribute(String name, String value) throws DOMException
Attr node plus any Text and
EntityReference nodes, build the appropriate subtree, and
use setAttributeNode to assign it as the value of an
attribute.setAttribute in interface Elementname - The name of the attribute to create or alter.value - Value to set in string form.DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an
invalid character.
public void removeAttribute(String name) throws DOMException
removeAttribute in interface Elementname - The name of the attribute to remove.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.public Attr getAttributeNode(String name)
Attr node by name.getAttributeNode in interface Elementname - The name of the attribute to retrieve.Attr node with the specified attribute name or
null if there is no such attribute.public Attr setAttributeNode(Attr newAttr) throws DOMException
setAttributeNode in interface ElementnewAttr - The Attr node to add to the attribute list.newAttr attribute replaces an existing
attribute with the same name, the previously existing
Attr node is returned, otherwise null is
returned.DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a
different document than the one that created the element.
newAttr is already an
attribute of another Element object. The DOM user must
explicitly clone Attr nodes to re-use them in other
elements.public Attr removeAttributeNode(Attr oldAttr) throws DOMException
removeAttributeNode in interface ElementoldAttr - The Attr node to remove from the attribute
list. If the removed Attr has a default value it is
immediately replaced.Attr node that was removed.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
oldAttr is not an attribute
of the element.public NodeList getElementsByTagName(String name)
NodeList of all descendant elements with a given
tag name, in the order in which they would be encountered in a preorder
traversal of the Element tree.getElementsByTagName in interface Elementname - The name of the tag to match on. The special value "*"
matches all tags.Element nodes.public void normalize()
Text nodes in the full depth of the sub-tree
underneath this Element into a "normal" form where only
markup (e.g., tags, comments, processing instructions, CDATA sections,
and entity references) separates Text nodes, i.e., there
are no adjacent Text nodes. This can be used to ensure
that the DOM view of a document is the same as if it were saved and
re-loaded, and is useful when operations (such as XPointer lookups) that
depend on a particular document tree structure are to be used.public boolean isSupported(String feature, String version)
isSupported in interface Nodefeature - The name of the feature to test. This is the same name
which can be passed to the method hasFeature on
DOMImplementation.version - This is the version number of the feature to test. In
Level 2, version 1, this is the string "2.0". If the version is not
specified, supporting any version of the feature will cause the
method to return true.true if the specified feature is
supported on this node, false otherwise.public String getNamespaceURI()
null if it is
unspecified.
ELEMENT_NODE and
ATTRIBUTE_NODE and nodes created with a DOM Level 1
method, such as createElement from the
Document interface, this is always null.Per
the Namespaces in XML Specification an attribute does not inherit
its namespace from the element it is attached to. If an attribute is
not explicitly given a namespace, it simply has no namespace.getNamespaceURI in interface Nodepublic String getPrefix()
null if it is
unspecified.
nodeName attribute, which holds the qualified name, as
well as the tagName and name attributes of
the Element and Attr interfaces, when
applicable.
namespaceURI and localName do not change.
ELEMENT_NODE and
ATTRIBUTE_NODE and nodes created with a DOM Level 1
method, such as createElement from the
Document interface, this is always null.getPrefix in interface NodeDOMException - INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
illegal character.
prefix is
malformed, if the namespaceURI of this node is
null, if the specified prefix is "xml" and the
namespaceURI of this node is different from "
http://www.w3.org/XML/1998/namespace", if this node is an attribute
and the specified prefix is "xmlns" and the
namespaceURI of this node is different from "
http://www.w3.org/2000/xmlns/", or if this node is an attribute and
the qualifiedName of this node is "xmlns" .setPrefix(java.lang.String)public void setPrefix(String prefix) throws DOMException
setPrefix in interface Nodeprefix - The new prefix of the element.DOMExceptiongetPrefix()public String getLocalName()
getLocalName in interface NodeNode.getLocalName()public boolean hasAttributes()
hasAttributes in interface Nodetrue if this node has any attributes,
false otherwise.public String getAttributeNS(String namespaceURI, String localName)
getAttributeNS in interface ElementnamespaceURI - The namespace URI of the attribute to retrieve.localName - The local name of the attribute to retrieve.Attr value as a string, or the empty string
if that attribute does not have a specified or default value.setAttributeNodeNS(org.w3c.dom.Attr)public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
qualifiedName, and
its value is changed to be the value parameter. This
value is a simple string; it is not parsed as it is being set. So any
markup (such as syntax to be recognized as an entity reference) is
treated as literal text, and needs to be appropriately escaped by the
implementation when it is written out. In order to assign an
attribute value that contains entity references, the user must create
an Attr node plus any Text and
EntityReference nodes, build the appropriate subtree,
and use setAttributeNodeNS or
setAttributeNode to assign it as the value of an
attribute.setAttributeNS in interface ElementnamespaceURI - The namespace URI of the attribute to create or
alter.qualifiedName - The qualified name of the attribute to create or
alter.value - The value to set in string form.DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
qualifiedName is
malformed, if the qualifiedName has a prefix and the
namespaceURI is null, if the
qualifiedName has a prefix that is "xml" and the
namespaceURI is different from "
http://www.w3.org/XML/1998/namespace", or if the
qualifiedName is "xmlns" and the
namespaceURI is different from "
http://www.w3.org/2000/xmlns/".getAttributeNS(java.lang.String, java.lang.String)public void removeAttributeNS(String namespaceURI, String localName) throws DOMException
removeAttributeNS in interface ElementnamespaceURI - The namespace URI of the attribute to remove.localName - The local name of the attribute to remove.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.setAttributeNS(java.lang.String, java.lang.String, java.lang.String)public Attr getAttributeNodeNS(String namespaceURI, String localName)
Attr node by local name and namespace URI.getAttributeNodeNS in interface ElementnamespaceURI - The namespace URI of the attribute to retrieve.localName - The local name of the attribute to retrieve.Attr node with the specified attribute local
name and namespace URI or null if there is no such
attribute.getAttributeNS(java.lang.String, java.lang.String),
setAttributeNodeNS(org.w3c.dom.Attr)public Attr setAttributeNodeNS(Attr newAttr) throws DOMException
setAttributeNodeNS in interface ElementnewAttr - The Attr node to add to the attribute list.newAttr attribute replaces an existing
attribute with the same local name and namespace URI, the replaced
Attr node is returned, otherwise null is
returned.DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a
different document than the one that created the element.
newAttr is already an
attribute of another Element object. The DOM user must
explicitly clone Attr nodes to re-use them in other
elements.getAttributeNodeNS(java.lang.String, java.lang.String)public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
NodeList of all the descendant
Elements with a given local name and namespace URI in
the order in which they are encountered in a preorder traversal of
this Element tree.getElementsByTagNameNS in interface ElementnamespaceURI - The namespace URI of the elements to match on. The
special value "*" matches all namespaces.localName - The local name of the elements to match on. The
special value "*" matches all local names.NodeList object containing all the matched
Elements.public boolean hasAttribute(String name)
true when an attribute with a given name is
specified on this element or has a default value, false
otherwise.hasAttribute in interface Elementname - The name of the attribute to look for.true if an attribute with the given name is
specified on this element or has a default value, false
otherwise.public boolean hasAttributeNS(String namespaceURI, String localName)
true when an attribute with a given local name and
namespace URI is specified on this element or has a default value,
false otherwise. HTML-only DOM implementations do not
need to implement this method.hasAttributeNS in interface ElementnamespaceURI - The namespace URI of the attribute to look for.localName - The local name of the attribute to look for.true if an attribute with the given local name
and namespace URI is specified or has a default value on this
element, false otherwise.© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.