Animatepublic class Animate extends AbstractAnimate Animate represents an SVG Tiny <animate>
element. |
Fields Summary |
---|
static final String[] | REQUIRED_TRAITSRequired Animate traits | String | traitQNameThe trait's qualified name. |
Constructors Summary |
---|
public Animate(DocumentNode ownerDocument)Builds a new Animate element that belongs to the given
document. This Animate will belong
to the DocumentNode 's time container.
super(ownerDocument, SVGConstants.SVG_ANIMATE_TAG);
| public Animate(DocumentNode ownerDocument, String localName)Builds a new Animate element that belongs to the given
document. This Animate will belong
to the DocumentNode 's time container.
super(ownerDocument, localName);
|
Methods Summary |
---|
public java.lang.String[] | getRequiredTraits()
return REQUIRED_TRAITS;
| public java.lang.String | getTraitImpl(java.lang.String name)
if (SVGConstants.SVG_ATTRIBUTE_NAME_ATTRIBUTE == name) {
return traitQName;
} else {
return super.getTraitImpl(name);
}
| public ElementNode | newInstance(DocumentNode doc)Used by DocumentNode to create a new instance from
a prototype TimedElementNode .
return new Animate(doc, getLocalName());
| public void | setTraitImpl(java.lang.String name, java.lang.String value)Animate supports the to, from, by, values, keyTimes, keySplines,
and attributeName traits.
if (SVGConstants.SVG_ATTRIBUTE_NAME_ATTRIBUTE == name) {
checkWriteLoading(name);
if (value == null) {
throw illegalTraitValue(name, value);
}
// Now, if this is a QName, we need to use the namespace prefix map.
int i = value.indexOf(':");
if (i == -1) {
this.traitName = value.intern();
this.traitQName = value.intern();
} else {
if (i == value.length() - 1) {
// ':' is the last character, this is invalid.
throw illegalTraitValue(name, value);
}
String prefix = value.substring(0, i);
String tName = value.substring(i+1);
String ns = ownerDocument.toNamespace(prefix, this);
if (ns == null) {
throw illegalTraitValue(name, value);
}
traitName = tName.intern();
traitNamespace = ns.intern();
traitQName = value;
}
} else {
super.setTraitImpl(name, value);
}
| boolean | supportsTrait(java.lang.String traitName)
if (SVGConstants.SVG_ATTRIBUTE_NAME_ATTRIBUTE == traitName) {
return true;
} else {
return super.supportsTrait(traitName);
}
|
|