org.vectomatic.dom.svg
Class OMSVGAngle

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by org.vectomatic.dom.svg.OMSVGAngle

public class OMSVGAngle
extends com.google.gwt.core.client.JavaScriptObject

The 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.


Field Summary
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).
 
Constructor Summary
protected OMSVGAngle()
           
 
Method Summary
 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().
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SVG_ANGLETYPE_UNKNOWN

public static final short SVG_ANGLETYPE_UNKNOWN
The unit type is not one of predefined unit types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.

See Also:
Constant Field Values

SVG_ANGLETYPE_UNSPECIFIED

public static final short SVG_ANGLETYPE_UNSPECIFIED
No unit type was provided (i.e., a unitless value was specified). For angles, a unitless value is treated the same as if degrees were specified.

See Also:
Constant Field Values

SVG_ANGLETYPE_DEG

public static final short SVG_ANGLETYPE_DEG
The unit type was explicitly set to degrees.

See Also:
Constant Field Values

SVG_ANGLETYPE_RAD

public static final short SVG_ANGLETYPE_RAD
The unit type is radians.

See Also:
Constant Field Values

SVG_ANGLETYPE_GRAD

public static final short SVG_ANGLETYPE_GRAD
The unit type is radians.

See Also:
Constant Field Values
Constructor Detail

OMSVGAngle

protected OMSVGAngle()
Method Detail

getUnitType

public final short getUnitType()
The type of the value as specified by one of the SVG_ANGLETYPE_ constants defined on this interface.


getValue

public final float getValue()
The angle value as a floating point value, in degrees. Setting this attribute will cause getValueInSpecifiedUnits() and getValueAsString() to be updated automatically to reflect this setting.


setValue

public final void setValue(float value)
                    throws com.google.gwt.core.client.JavaScriptException
The angle value as a floating point value, in degrees. Setting this attribute will cause getValueInSpecifiedUnits() and getValueAsString() to be updated automatically to reflect this setting.

Throws:
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

getValueInSpecifiedUnits

public final float getValueInSpecifiedUnits()
The angle value as a floating point value, in the units expressed by getUnitType(). Setting this attribute will cause getValue() and getValueAsString() to be updated automatically to reflect this setting.


setValueInSpecifiedUnits

public final void setValueInSpecifiedUnits(float value)
                                    throws com.google.gwt.core.client.JavaScriptException
The angle value as a floating point value, in the units expressed by getUnitType(). Setting this attribute will cause getValue() and getValueAsString() to be updated automatically to reflect this setting.

Throws:
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

getValueAsString

public final String getValueAsString()
The angle value as a string value, in the units expressed by getUnitType(). Setting this attribute will cause getValue(), getValueInSpecifiedUnits() and getUnitType() to be updated automatically to reflect this setting.


setValueAsString

public final void setValueAsString(String value)
                            throws com.google.gwt.core.client.JavaScriptException
The angle value as a string value, in the units expressed by getUnitType(). Setting this attribute will cause getValue(), getValueInSpecifiedUnits() and getUnitType() to be updated automatically to reflect this setting.

Throws:
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

newValueSpecifiedUnits

public final void newValueSpecifiedUnits(short unitType,
                                         float valueInSpecifiedUnits)
                                  throws com.google.gwt.core.client.JavaScriptException
Reset the value as a number with an associated getUnitType(), thereby replacing the values for all of the attributes on the object.

Parameters:
unitType - The unit type for the value (e.g., SVG_ANGLETYPE_DEG).
valueInSpecifiedUnits - The angle value.
Throws:
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

convertToSpecifiedUnits

public final void convertToSpecifiedUnits(short unitType)
                                   throws com.google.gwt.core.client.JavaScriptException
Preserve the same underlying stored value, but reset the stored unit identifier to the given unitType. Object attributes getUnitType(), getValueInSpecifiedUnits() and getValueAsString() might be modified as a result of this method.

Parameters:
unitType - The unit type to switch to (e.g., SVG_ANGLETYPE_DEG).
Throws:
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 © 2012. All Rights Reserved.