public class OMSVGTransformList extends Object implements Iterable<OMSVGTransform>
This interface defines a list of SVGTransform objects.
The OMSVGTransformList
and OMSVGTransform
interfaces correspond to the various attributes which specify a set of
transformations, such as the transform
attribute which is
available for many of SVG's elements.
OMSVGTransformList
has the same attributes and methods as other SVGxxxList interfaces. Implementers
may consider using a single base class to implement the various SVGxxxList
interfaces.
An OMSVGTransformList
object can be designated as read only, which means that attempts
to modify the object will result in an exception being thrown, as described
below.
Modifier | Constructor and Description |
---|---|
protected |
OMSVGTransformList(com.google.gwt.core.client.JavaScriptObject ot) |
Modifier and Type | Method and Description |
---|---|
OMSVGTransform |
appendItem(OMSVGTransform newItem)
Inserts a new item at the end of the list.
|
void |
clear()
Clears all existing current items from the list, with the result being
an empty list.
|
OMSVGTransform |
consolidate()
Consolidates the list of separate
OMSVGTransform
objects by multiplying the equivalent transformation matrices together
to result in a list consisting of a single OMSVGTransform
object of type SVG_TRANSFORM_MATRIX. |
OMSVGTransform |
createSVGTransformFromMatrix(OMSVGMatrix matrix)
Creates an |
String |
getDescription()
Returns a textual description of the transform list for debugging purposes.
|
OMSVGTransform |
getItem(int index)
Returns the specified item from the list.
|
int |
getNumberOfItems()
The number of items in the list.
|
OMSVGTransform |
initialize(OMSVGTransform newItem)
Clears all existing current items from the list and re-initializes the
list to hold the single item specified by the parameter.
|
OMSVGTransform |
insertItemBefore(OMSVGTransform newItem,
int index)
Inserts a new item into the list at the specified position.
|
Iterator<OMSVGTransform> |
iterator()
Returns an iterator over the
OMSVGTransform
elements in this list in proper sequence. |
OMSVGTransform |
removeItem(int index)
Removes an existing item from the list.
|
OMSVGTransform |
replaceItem(OMSVGTransform newItem,
int index)
Replaces an existing item in the list with a new item.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected OMSVGTransformList(com.google.gwt.core.client.JavaScriptObject ot)
public final int getNumberOfItems()
public final void clear() throws com.google.gwt.core.client.JavaScriptException
DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised when the list
corresponds to a read only attribute
or when the object itself is read only.com.google.gwt.core.client.JavaScriptException
public final OMSVGTransform initialize(OMSVGTransform newItem) throws com.google.gwt.core.client.JavaScriptException
newItem
- The item which should become the only member of the list.DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised when the list
corresponds to a read only attribute
or when the object itself is read only.com.google.gwt.core.client.JavaScriptException
public final OMSVGTransform getItem(int index) throws com.google.gwt.core.client.JavaScriptException
index
- The index of the item from the list which is to be returned.
The first item is number 0.DOMException(INDEX_SIZE_ERR)
- Raised if the index number is greater
than or equal to getNumberOfItems()
.com.google.gwt.core.client.JavaScriptException
public final OMSVGTransform insertItemBefore(OMSVGTransform newItem, int index) throws com.google.gwt.core.client.JavaScriptException
newItem
- The item which is to be inserted into the list.index
- The index of the item before which the new item is to be
inserted. The first item is number 0. If the index is equal to 0, then
the new item is inserted at the front of the list. If the index is greater
than or equal to getNumberOfItems()
,
then the new item is appended to the end of the list.DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised when the list
corresponds to a read only attribute
or when the object itself is read only.com.google.gwt.core.client.JavaScriptException
public final OMSVGTransform replaceItem(OMSVGTransform newItem, int index) throws com.google.gwt.core.client.JavaScriptException
newItem
- The item which is to be inserted into the list.index
- The index of the item which is to be replaced. The first
item is number 0.DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised when the list
corresponds to a read only attribute
or when the object itself is read only.DOMException(INDEX_SIZE_ERR)
- Raised if the index number is greater
than or equal to getNumberOfItems()
.com.google.gwt.core.client.JavaScriptException
public final OMSVGTransform removeItem(int index) throws com.google.gwt.core.client.JavaScriptException
index
- The index of the item which is to be removed. The first
item is number 0.DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised when the list
corresponds to a read only attribute
or when the object itself is read only.DOMException(INDEX_SIZE_ERR)
- Raised if the index number is greater
than or equal to getNumberOfItems()
.com.google.gwt.core.client.JavaScriptException
public final OMSVGTransform appendItem(OMSVGTransform newItem) throws com.google.gwt.core.client.JavaScriptException
newItem
- The item which is to be inserted. The first item is number
0.DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised when the list
corresponds to a read only attribute
or when the object itself is read only.com.google.gwt.core.client.JavaScriptException
public final OMSVGTransform createSVGTransformFromMatrix(OMSVGMatrix matrix)
Creates an OMSVGTransform
object which is initialized to transform of type SVG_TRANSFORM_MATRIX and
whose values are the given matrix. The values from the parameter matrix
are copied, the matrix parameter is not adopted as SVGTransform::matrix.
matrix
- The matrix which defines the transformation.OMSVGTransform
object.public final OMSVGTransform consolidate() throws com.google.gwt.core.client.JavaScriptException
OMSVGTransform
objects by multiplying the equivalent transformation matrices together
to result in a list consisting of a single OMSVGTransform
object of type SVG_TRANSFORM_MATRIX. The consolidation operation creates
new SVGTransform object as the first and only item in the list. The returned
item is the item itself and not a copy. Any changes made to the item are
immediately reflected in the list.OMSVGTransform
object
which becomes single item in the list. If the list was empty, then a
value of null is returned.DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised when the list
corresponds to a read only attribute
or when the object itself is read only.com.google.gwt.core.client.JavaScriptException
public final Iterator<OMSVGTransform> iterator()
OMSVGTransform
elements in this list in proper sequence.
This implementation returns a straightforward implementation of the
iterator interface, relying on the backing list's getNumberOfItems()
,
and getItem(int)
methods.
Note that the iterator returned by this method will throw an
UnsupportedOperationException
in response to its
remove
method.
iterator
in interface Iterable<OMSVGTransform>
OMSVGTransform
elements in this list in proper sequencepublic final String getDescription()
Copyright © 2018. All Rights Reserved.