public class OMSVGAngle
extends com.google.gwt.core.client.JavaScriptObject
OMSVGAngle
interface corresponds to
the <angle> basic data type.
An OMSVGAngle
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 and Type | Field and Description |
---|---|
static short |
SVG_ANGLETYPE_DEG
The unit type was explicitly set to degrees.
|
static short |
SVG_ANGLETYPE_GRAD
The unit type is radians.
|
static short |
SVG_ANGLETYPE_RAD
The unit type is radians.
|
static short |
SVG_ANGLETYPE_UNKNOWN
The unit type is not one of predefined unit types.
|
static short |
SVG_ANGLETYPE_UNSPECIFIED
No unit type was provided (i.e., a unitless value was specified).
|
Modifier | Constructor and Description |
---|---|
protected |
OMSVGAngle() |
Modifier and Type | Method and Description |
---|---|
void |
convertToSpecifiedUnits(short unitType)
Preserve the same underlying stored value, but reset the stored unit identifier
to the given unitType.
|
short |
getUnitType()
The type of the value as specified by one of the SVG_ANGLETYPE_ constants
defined on this interface.
|
float |
getValue()
The angle value as a floating point value, in degrees.
|
String |
getValueAsString()
The angle value as a string value, in the units expressed by
getUnitType() . |
float |
getValueInSpecifiedUnits()
The angle value as a floating point value, in the units expressed by
getUnitType() . |
void |
newValueSpecifiedUnits(short unitType,
float valueInSpecifiedUnits)
Reset the value as a number with an associated
getUnitType() ,
thereby replacing the values for all of the attributes on the object. |
void |
setValue(float value)
The angle value as a floating point value, in degrees.
|
void |
setValueAsString(String value)
The angle value as a string value, in the units expressed by
getUnitType() . |
void |
setValueInSpecifiedUnits(float value)
The angle value as a floating point value, in the units expressed by
getUnitType() . |
public static final short SVG_ANGLETYPE_UNKNOWN
public static final short SVG_ANGLETYPE_UNSPECIFIED
public static final short SVG_ANGLETYPE_DEG
public static final short SVG_ANGLETYPE_RAD
public static final short SVG_ANGLETYPE_GRAD
public final short getUnitType()
public final float getValue()
getValueInSpecifiedUnits()
and getValueAsString()
to be
updated automatically to reflect this setting.public final void setValue(float value) throws com.google.gwt.core.client.JavaScriptException
getValueInSpecifiedUnits()
and getValueAsString()
to be
updated automatically to reflect this setting.DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised when the angle
corresponds to a read only attribute
or when the object itself is read only.com.google.gwt.core.client.JavaScriptException
public final float getValueInSpecifiedUnits()
getUnitType()
. Setting this attribute
will cause getValue()
and getValueAsString()
to be updated automatically
to reflect this setting.public final void setValueInSpecifiedUnits(float value) throws com.google.gwt.core.client.JavaScriptException
getUnitType()
. Setting this attribute
will cause getValue()
and getValueAsString()
to be updated automatically
to reflect this setting.DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised when the angle
corresponds to a read only attribute
or when the object itself is read only.com.google.gwt.core.client.JavaScriptException
public final String getValueAsString()
getUnitType()
.
Setting this attribute will cause getValue()
,
getValueInSpecifiedUnits()
and
getUnitType()
to be updated automatically
to reflect this setting.public final void setValueAsString(String value) throws com.google.gwt.core.client.JavaScriptException
getUnitType()
.
Setting this attribute will cause getValue()
,
getValueInSpecifiedUnits()
and
getUnitType()
to be updated automatically
to reflect this setting.DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised when the angle
corresponds to a read only attribute
or when the object itself is read only.DOMException(SYNTAX_ERR)
- Raised if the assigned string cannot
be parsed as a valid <angle>
.com.google.gwt.core.client.JavaScriptException
public final void newValueSpecifiedUnits(short unitType, float valueInSpecifiedUnits) throws com.google.gwt.core.client.JavaScriptException
getUnitType()
,
thereby replacing the values for all of the attributes on the object.unitType
- The unit type for the value (e.g., SVG_ANGLETYPE_DEG
).valueInSpecifiedUnits
- The angle value.DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised when the angle
corresponds to a read only attribute
or when the object itself is read only.DOMException(NOT_SUPPORTED_ERR)
- Raised if unitType is SVG_ANGLETYPE_UNKNOWN
or not a valid unit type constant (one of the other SVG_ANGLETYPE_ constants
defined on this interface).com.google.gwt.core.client.JavaScriptException
public final void convertToSpecifiedUnits(short unitType) throws com.google.gwt.core.client.JavaScriptException
getUnitType()
,
getValueInSpecifiedUnits()
and
getValueAsString()
might be modified
as a result of this method.unitType
- The unit type to switch to (e.g., SVG_ANGLETYPE_DEG
).DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised when the angle
corresponds to a read only attribute
or when the object itself is read only.DOMException(NOT_SUPPORTED_ERR)
- Raised if unitType is SVG_ANGLETYPE_UNKNOWN
or not a valid unit type constant (one of the other SVG_ANGLETYPE_ constants
defined on this interface).com.google.gwt.core.client.JavaScriptException
Copyright © 2018. All Rights Reserved.