Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.batik.css.dom
Class CSSOMValue

    java.lang.Object
      org.apache.batik.css.dom.CSSOMValue

All Implemented Interfaces:
  Counter, CSSPrimitiveValue, CSSValue, CSSValueList, Rect, RGBColor

Direct Known Subclasses:
  CSSOMComputedStyle.ComputedCSSValue, CSSOMStyleDeclaration.StyleDeclarationValue, SVGStylableElement.PresentationAttributeValue

    public class CSSOMValue

extends Object
implements CSSPrimitiveValue, CSSValueList, Counter, Rect, RGBColor

This class implements the `CSSValue`, `CSSPrimitiveValue`, `CSSValueList` interfaces.

Nested Class Summary
`protected class` | `CSSOMValue.AbstractComponent` To store a component.
`class` | `CSSOMValue.AbstractModificationHandler` This class provides an abstract implementation of a ModificationHandler.
`protected class` | `CSSOMValue.BlueComponent` To represents a blue component.
`protected class` | `CSSOMValue.BottomComponent` To represents a bottom component.
`protected class` | `CSSOMValue.FloatComponent` To store a Float component.
`protected class` | `CSSOMValue.GreenComponent` To represents a green component.
`protected class` | `CSSOMValue.LeftComponent` To represents a left component.
`protected class` | `CSSOMValue.ListComponent` To represents a List component.
`static interface` | `CSSOMValue.ModificationHandler` To manage the modifications on a CSS value.
`protected class` | `CSSOMValue.RedComponent` To represents a red component.
`protected class` | `CSSOMValue.RightComponent` To represents a right component.
`protected class` | `CSSOMValue.TopComponent` To represents a top component.
`static interface` | `CSSOMValue.ValueProvider` To provides the actual value.

Field Summary
`protected CSSOMValue.BlueComponent` | `blueComponent` The blue component, if this value is a RGBColor.
`protected CSSOMValue.BottomComponent` | `bottomComponent` The bottom component, if this value is a Rect.
`protected CSSOMValue.GreenComponent` | `greenComponent` The green component, if this value is a RGBColor.
`protected CSSOMValue.ModificationHandler` | `handler` The modifications handler.
`protected CSSValue[]` | `items` The list items.
`protected CSSOMValue.LeftComponent` | `leftComponent` The left component, if this value is a Rect.
`protected CSSOMValue.RedComponent` | `redComponent` The red component, if this value is a RGBColor.
`protected CSSOMValue.RightComponent` | `rightComponent` The right component, if this value is a Rect.
`protected CSSOMValue.TopComponent` | `topComponent` The top component, if this value is a Rect.
`protected CSSOMValue.ValueProvider` | `valueProvider` The associated value.

Fields inherited from interface org.w3c.dom.css.CSSPrimitiveValue
`CSS_ATTR, CSS_CM, CSS_COUNTER, CSS_DEG, CSS_DIMENSION, CSS_EMS, CSS_EXS, CSS_GRAD, CSS_HZ, CSS_IDENT, CSS_IN, CSS_KHZ, CSS_MM, CSS_MS, CSS_NUMBER, CSS_PC, CSS_PERCENTAGE, CSS_PT, CSS_PX, CSS_RAD, CSS_RECT, CSS_RGBCOLOR, CSS_S, CSS_STRING, CSS_UNKNOWN, CSS_URI`

Fields inherited from interface org.w3c.dom.css.CSSValue
`CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST`

Constructor Summary
`CSSOMValue(CSSOMValue.ValueProvider vp)` Creates a new CSSOMValue.

Method Summary
`static float` | `convertFloatValue(short unitType, Value value)` Converts the actual float value to the given unit type.
`CSSPrimitiveValue` | `getBlue()` DOM: Implements `RGBColor.getBlue()`.
`CSSPrimitiveValue` | `getBottom()` DOM: Implements `Rect.getBottom()`.
`Counter` | `getCounterValue()` DOM: Implements `CSSPrimitiveValue.getCounterValue()`.
`String` | `getCssText()` DOM: Implements `CSSValue.getCssText()`.
`short` | `getCssValueType()` DOM: Implements `CSSValue.getCssValueType()`.
`float` | `getFloatValue(short unitType)` DOM: Implements `CSSPrimitiveValue.getFloatValue(short)`.
`CSSPrimitiveValue` | `getGreen()` DOM: Implements `RGBColor.getGreen()`.
`String` | `getIdentifier()` DOM: Implements `Counter.getIdentifier()`.
`CSSPrimitiveValue` | `getLeft()` DOM: Implements `Rect.getLeft()`.
`int` | `getLength()` DOM: Implements `CSSValueList.getLength()`.
`String` | `getListStyle()` DOM: Implements `Counter.getListStyle()`.
`short` | `getPrimitiveType()` DOM: Implements `CSSPrimitiveValue.getPrimitiveType()`.
`Rect` | `getRectValue()` DOM: Implements `CSSPrimitiveValue.getRectValue()`.
`CSSPrimitiveValue` | `getRed()` DOM: Implements `RGBColor.getRed()`.
`RGBColor` | `getRGBColorValue()` DOM: Implements `CSSPrimitiveValue.getRGBColorValue()`.
`CSSPrimitiveValue` | `getRight()` DOM: Implements `Rect.getRight()`.
`String` | `getSeparator()` DOM: Implements `Counter.getSeparator()`.
`String` | `getStringValue()` DOM: Implements `CSSPrimitiveValue.getStringValue()`.
`CSSPrimitiveValue` | `getTop()` DOM: Implements `Rect.getTop()`.
`CSSValue` | `item(int index)` DOM: Implements `CSSValueList.item(int)`.
`void` | `setCssText(String cssText)` DOM: Implements `CSSValue.setCssText(String)`.
`void` | `setFloatValue(short unitType, float floatValue)` DOM: Implements `CSSPrimitiveValue.setFloatValue(short,float)`.
`void` | `setModificationHandler(CSSOMValue.ModificationHandler h)` Sets the modification handler of this value.
`void` | `setStringValue(short stringType, String stringValue)` DOM: Implements `CSSPrimitiveValue.setStringValue(short,String)`.
`protected static float` | `toCentimeters(Value value)` Converts the current value into centimeters.
`protected static float` | `toDegrees(Value value)` Converts the current value into degrees.
`protected static float` | `toGradians(Value value)` Converts the current value into gradians.
`protected static float` | `toHertz(Value value)` Converts the current value into Hertz.
`protected static float` | `toInches(Value value)` Converts the current value into inches.
`protected static float` | `tokHertz(Value value)` Converts the current value into kHertz.
`protected static float` | `toMillimeters(Value value)` Converts the current value into millimeters.
`protected static float` | `toMilliseconds(Value value)` Converts the current value into milliseconds.
`protected static float` | `toPicas(Value value)` Converts the current value into picas.
`protected static float` | `toPoints(Value value)` Converts the current value into points.
`protected static float` | `toRadians(Value value)` Converts the current value into radians.
`protected static float` | `toSeconds(Value value)` Converts the current value into seconds.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### valueProvider

    protected CSSOMValue.ValueProvider valueProvider

  The associated value.

### handler

    protected CSSOMValue.ModificationHandler handler

  The modifications handler.

### leftComponent

    protected CSSOMValue.LeftComponent leftComponent

  The left component, if this value is a Rect.

### rightComponent

    protected CSSOMValue.RightComponent rightComponent

  The right component, if this value is a Rect.

### bottomComponent

    protected CSSOMValue.BottomComponent bottomComponent

  The bottom component, if this value is a Rect.

### topComponent

    protected CSSOMValue.TopComponent topComponent

  The top component, if this value is a Rect.

### redComponent

    protected CSSOMValue.RedComponent redComponent

  The red component, if this value is a RGBColor.

### greenComponent

    protected CSSOMValue.GreenComponent greenComponent

  The green component, if this value is a RGBColor.

### blueComponent

    protected CSSOMValue.BlueComponent blueComponent

  The blue component, if this value is a RGBColor.

### items

    protected CSSValue[] items

  The list items.

Constructor Detail

### CSSOMValue

    public CSSOMValue(CSSOMValue.ValueProvider vp)

  Creates a new CSSOMValue.

Method Detail

### setModificationHandler

    public void setModificationHandler(CSSOMValue.ModificationHandler h)

  Sets the modification handler of this value.

### getCssText

    public String getCssText()

  DOM: Implements `CSSValue.getCssText()`.

  Specified by:
    `getCssText` in interface `CSSValue`

### setCssText

    public void setCssText(String cssText)
                    throws DOMException

  DOM: Implements `CSSValue.setCssText(String)`.

  Specified by:
    `setCssText` in interface `CSSValue`
  Throws:
    `DOMException`

### getCssValueType

    public short getCssValueType()

  DOM: Implements `CSSValue.getCssValueType()`.

  Specified by:
    `getCssValueType` in interface `CSSValue`

### getPrimitiveType

    public short getPrimitiveType()

  DOM: Implements `CSSPrimitiveValue.getPrimitiveType()`.

  Specified by:
    `getPrimitiveType` in interface `CSSPrimitiveValue`

### setFloatValue

    public void setFloatValue(short unitType,
                              float floatValue)
                       throws DOMException

  DOM: Implements `CSSPrimitiveValue.setFloatValue(short,float)`.

  Specified by:
    `setFloatValue` in interface `CSSPrimitiveValue`
  Throws:
    `DOMException`

### getFloatValue

    public float getFloatValue(short unitType)
                        throws DOMException

  DOM: Implements `CSSPrimitiveValue.getFloatValue(short)`.

  Specified by:
    `getFloatValue` in interface `CSSPrimitiveValue`
  Throws:
    `DOMException`

### convertFloatValue

    public static float convertFloatValue(short unitType,
                                          Value value)

  Converts the actual float value to the given unit type.

### toCentimeters

    protected static float toCentimeters(Value value)

  Converts the current value into centimeters.

### toInches

    protected static float toInches(Value value)

  Converts the current value into inches.

### toMillimeters

    protected static float toMillimeters(Value value)

  Converts the current value into millimeters.

### toPoints

    protected static float toPoints(Value value)

  Converts the current value into points.

### toPicas

    protected static float toPicas(Value value)

  Converts the current value into picas.

### toDegrees

    protected static float toDegrees(Value value)

  Converts the current value into degrees.

### toRadians

    protected static float toRadians(Value value)

  Converts the current value into radians.

### toGradians

    protected static float toGradians(Value value)

  Converts the current value into gradians.

### toMilliseconds

    protected static float toMilliseconds(Value value)

  Converts the current value into milliseconds.

### toSeconds

    protected static float toSeconds(Value value)

  Converts the current value into seconds.

### toHertz

    protected static float toHertz(Value value)

  Converts the current value into Hertz.

### tokHertz

    protected static float tokHertz(Value value)

  Converts the current value into kHertz.

### setStringValue

    public void setStringValue(short stringType,
                               String stringValue)
                        throws DOMException

  DOM: Implements `CSSPrimitiveValue.setStringValue(short,String)`.

  Specified by:
    `setStringValue` in interface `CSSPrimitiveValue`
  Throws:
    `DOMException`

### getStringValue

    public String getStringValue()
                          throws DOMException

  DOM: Implements `CSSPrimitiveValue.getStringValue()`.

  Specified by:
    `getStringValue` in interface `CSSPrimitiveValue`
  Throws:
    `DOMException`

### getCounterValue

    public Counter getCounterValue()
                            throws DOMException

  DOM: Implements `CSSPrimitiveValue.getCounterValue()`.

  Specified by:
    `getCounterValue` in interface `CSSPrimitiveValue`
  Throws:
    `DOMException`

### getRectValue

    public Rect getRectValue()
                      throws DOMException

  DOM: Implements `CSSPrimitiveValue.getRectValue()`.

  Specified by:
    `getRectValue` in interface `CSSPrimitiveValue`
  Throws:
    `DOMException`

### getRGBColorValue

    public RGBColor getRGBColorValue()
                              throws DOMException

  DOM: Implements `CSSPrimitiveValue.getRGBColorValue()`.

  Specified by:
    `getRGBColorValue` in interface `CSSPrimitiveValue`
  Throws:
    `DOMException`

### getLength

    public int getLength()

  DOM: Implements `CSSValueList.getLength()`.

  Specified by:
    `getLength` in interface `CSSValueList`

### item

    public CSSValue item(int index)

  DOM: Implements `CSSValueList.item(int)`.

  Specified by:
    `item` in interface `CSSValueList`

### getIdentifier

    public String getIdentifier()

  DOM: Implements `Counter.getIdentifier()`.

  Specified by:
    `getIdentifier` in interface `Counter`

### getListStyle

    public String getListStyle()

  DOM: Implements `Counter.getListStyle()`.

  Specified by:
    `getListStyle` in interface `Counter`

### getSeparator

    public String getSeparator()

  DOM: Implements `Counter.getSeparator()`.

  Specified by:
    `getSeparator` in interface `Counter`

### getTop

    public CSSPrimitiveValue getTop()

  DOM: Implements `Rect.getTop()`.

  Specified by:
    `getTop` in interface `Rect`

### getRight

    public CSSPrimitiveValue getRight()

  DOM: Implements `Rect.getRight()`.

  Specified by:
    `getRight` in interface `Rect`

### getBottom

    public CSSPrimitiveValue getBottom()

  DOM: Implements `Rect.getBottom()`.

  Specified by:
    `getBottom` in interface `Rect`

### getLeft

    public CSSPrimitiveValue getLeft()

  DOM: Implements `Rect.getLeft()`.

  Specified by:
    `getLeft` in interface `Rect`

### getRed

    public CSSPrimitiveValue getRed()

  DOM: Implements `RGBColor.getRed()`.

  Specified by:
    `getRed` in interface `RGBColor`

### getGreen

    public CSSPrimitiveValue getGreen()

  DOM: Implements `RGBColor.getGreen()`.

  Specified by:
    `getGreen` in interface `RGBColor`

### getBlue

    public CSSPrimitiveValue getBlue()

  DOM: Implements `RGBColor.getBlue()`.

  Specified by:
    `getBlue` in interface `RGBColor`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Apache Software Foundation. All Rights Reserved.