org.apache.batik.css.dom

Class CSSOMValue

public class CSSOMValue extends Object implements CSSPrimitiveValue, CSSValueList, Counter, Rect, RGBColor

This class implements the {@link org.w3c.dom.css.CSSValue}, {@link org.w3c.dom.css.CSSPrimitiveValue}, {@link org.w3c.dom.css.CSSValueList} interfaces.
Nested Class Summary
protected abstract classCSSOMValue.AbstractComponent
To store a component.
abstract classCSSOMValue.AbstractModificationHandler
This class provides an abstract implementation of a ModificationHandler.
protected classCSSOMValue.BlueComponent
To represents a blue component.
protected classCSSOMValue.BottomComponent
To represents a bottom component.
protected abstract classCSSOMValue.FloatComponent
To store a Float component.
protected classCSSOMValue.GreenComponent
To represents a green component.
protected classCSSOMValue.LeftComponent
To represents a left component.
protected classCSSOMValue.ListComponent
To represents a List component.
interfaceCSSOMValue.ModificationHandler
To manage the modifications on a CSS value.
protected classCSSOMValue.RedComponent
To represents a red component.
protected classCSSOMValue.RightComponent
To represents a right component.
protected classCSSOMValue.TopComponent
To represents a top component.
interfaceCSSOMValue.ValueProvider
To provides the actual value.
Field Summary
protected CSSOMValue.BlueComponentblueComponent
The blue component, if this value is a RGBColor.
protected CSSOMValue.BottomComponentbottomComponent
The bottom component, if this value is a Rect.
protected CSSOMValue.GreenComponentgreenComponent
The green component, if this value is a RGBColor.
protected CSSOMValue.ModificationHandlerhandler
The modifications handler.
protected CSSValue[]items
The list items.
protected CSSOMValue.LeftComponentleftComponent
The left component, if this value is a Rect.
protected CSSOMValue.RedComponentredComponent
The red component, if this value is a RGBColor.
protected CSSOMValue.RightComponentrightComponent
The right component, if this value is a Rect.
protected CSSOMValue.TopComponenttopComponent
The top component, if this value is a Rect.
protected CSSOMValue.ValueProvidervalueProvider
The associated value.
Constructor Summary
CSSOMValue(CSSOMValue.ValueProvider vp)
Creates a new CSSOMValue.
Method Summary
static floatconvertFloatValue(short unitType, Value value)
Converts the actual float value to the given unit type.
CSSPrimitiveValuegetBlue()
DOM: Implements {@link org.w3c.dom.css.RGBColor#getBlue()}.
CSSPrimitiveValuegetBottom()
DOM: Implements {@link org.w3c.dom.css.Rect#getBottom()}.
CountergetCounterValue()
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#getCounterValue()}.
StringgetCssText()
DOM: Implements {@link org.w3c.dom.css.CSSValue#getCssText()}.
shortgetCssValueType()
DOM: Implements {@link org.w3c.dom.css.CSSValue#getCssValueType()}.
floatgetFloatValue(short unitType)
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#getFloatValue(short)}.
CSSPrimitiveValuegetGreen()
DOM: Implements {@link org.w3c.dom.css.RGBColor#getGreen()}.
StringgetIdentifier()
DOM: Implements {@link org.w3c.dom.css.Counter#getIdentifier()}.
CSSPrimitiveValuegetLeft()
DOM: Implements {@link org.w3c.dom.css.Rect#getLeft()}.
intgetLength()
DOM: Implements {@link org.w3c.dom.css.CSSValueList#getLength()}.
StringgetListStyle()
DOM: Implements {@link org.w3c.dom.css.Counter#getListStyle()}.
shortgetPrimitiveType()
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#getPrimitiveType()}.
RectgetRectValue()
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#getRectValue()}.
CSSPrimitiveValuegetRed()
DOM: Implements {@link org.w3c.dom.css.RGBColor#getRed()}.
RGBColorgetRGBColorValue()
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#getRGBColorValue()}.
CSSPrimitiveValuegetRight()
DOM: Implements {@link org.w3c.dom.css.Rect#getRight()}.
StringgetSeparator()
DOM: Implements {@link org.w3c.dom.css.Counter#getSeparator()}.
StringgetStringValue()
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#getStringValue()}.
CSSPrimitiveValuegetTop()
DOM: Implements {@link org.w3c.dom.css.Rect#getTop()}.
CSSValueitem(int index)
DOM: Implements {@link org.w3c.dom.css.CSSValueList#item(int)}.
voidsetCssText(String cssText)
DOM: Implements {@link org.w3c.dom.css.CSSValue#setCssText(String)}.
voidsetFloatValue(short unitType, float floatValue)
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#setFloatValue(short,float)}.
voidsetModificationHandler(CSSOMValue.ModificationHandler h)
Sets the modification handler of this value.
voidsetStringValue(short stringType, String stringValue)
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#setStringValue(short,String)}.
protected static floattoCentimeters(Value value)
Converts the current value into centimeters.
protected static floattoDegrees(Value value)
Converts the current value into degrees.
protected static floattoGradians(Value value)
Converts the current value into gradians.
protected static floattoHertz(Value value)
Converts the current value into Hertz.
protected static floattoInches(Value value)
Converts the current value into inches.
protected static floattokHertz(Value value)
Converts the current value into kHertz.
protected static floattoMillimeters(Value value)
Converts the current value into millimeters.
protected static floattoMilliseconds(Value value)
Converts the current value into milliseconds.
protected static floattoPicas(Value value)
Converts the current value into picas.
protected static floattoPoints(Value value)
Converts the current value into points.
protected static floattoRadians(Value value)
Converts the current value into radians.
protected static floattoSeconds(Value value)
Converts the current value into seconds.

Field Detail

blueComponent

protected CSSOMValue.BlueComponent blueComponent
The blue component, if this value is a RGBColor.

bottomComponent

protected CSSOMValue.BottomComponent bottomComponent
The bottom component, if this value is a Rect.

greenComponent

protected CSSOMValue.GreenComponent greenComponent
The green component, if this value is a RGBColor.

handler

protected CSSOMValue.ModificationHandler handler
The modifications handler.

items

protected CSSValue[] items
The list items.

leftComponent

protected CSSOMValue.LeftComponent leftComponent
The left component, if this value is a Rect.

redComponent

protected CSSOMValue.RedComponent redComponent
The red component, if this value is a RGBColor.

rightComponent

protected CSSOMValue.RightComponent rightComponent
The right component, if this value is a Rect.

topComponent

protected CSSOMValue.TopComponent topComponent
The top component, if this value is a Rect.

valueProvider

protected CSSOMValue.ValueProvider valueProvider
The associated value.

Constructor Detail

CSSOMValue

public CSSOMValue(CSSOMValue.ValueProvider vp)
Creates a new CSSOMValue.

Method Detail

convertFloatValue

public static float convertFloatValue(short unitType, Value value)
Converts the actual float value to the given unit type.

getBlue

public CSSPrimitiveValue getBlue()
DOM: Implements {@link org.w3c.dom.css.RGBColor#getBlue()}.

getBottom

public CSSPrimitiveValue getBottom()
DOM: Implements {@link org.w3c.dom.css.Rect#getBottom()}.

getCounterValue

public Counter getCounterValue()
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#getCounterValue()}.

getCssText

public String getCssText()
DOM: Implements {@link org.w3c.dom.css.CSSValue#getCssText()}.

getCssValueType

public short getCssValueType()
DOM: Implements {@link org.w3c.dom.css.CSSValue#getCssValueType()}.

getFloatValue

public float getFloatValue(short unitType)
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#getFloatValue(short)}.

getGreen

public CSSPrimitiveValue getGreen()
DOM: Implements {@link org.w3c.dom.css.RGBColor#getGreen()}.

getIdentifier

public String getIdentifier()
DOM: Implements {@link org.w3c.dom.css.Counter#getIdentifier()}.

getLeft

public CSSPrimitiveValue getLeft()
DOM: Implements {@link org.w3c.dom.css.Rect#getLeft()}.

getLength

public int getLength()
DOM: Implements {@link org.w3c.dom.css.CSSValueList#getLength()}.

getListStyle

public String getListStyle()
DOM: Implements {@link org.w3c.dom.css.Counter#getListStyle()}.

getPrimitiveType

public short getPrimitiveType()
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#getPrimitiveType()}.

getRectValue

public Rect getRectValue()
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#getRectValue()}.

getRed

public CSSPrimitiveValue getRed()
DOM: Implements {@link org.w3c.dom.css.RGBColor#getRed()}.

getRGBColorValue

public RGBColor getRGBColorValue()
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#getRGBColorValue()}.

getRight

public CSSPrimitiveValue getRight()
DOM: Implements {@link org.w3c.dom.css.Rect#getRight()}.

getSeparator

public String getSeparator()
DOM: Implements {@link org.w3c.dom.css.Counter#getSeparator()}.

getStringValue

public String getStringValue()
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#getStringValue()}.

getTop

public CSSPrimitiveValue getTop()
DOM: Implements {@link org.w3c.dom.css.Rect#getTop()}.

item

public CSSValue item(int index)
DOM: Implements {@link org.w3c.dom.css.CSSValueList#item(int)}.

setCssText

public void setCssText(String cssText)
DOM: Implements {@link org.w3c.dom.css.CSSValue#setCssText(String)}.

setFloatValue

public void setFloatValue(short unitType, float floatValue)
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#setFloatValue(short,float)}.

setModificationHandler

public void setModificationHandler(CSSOMValue.ModificationHandler h)
Sets the modification handler of this value.

setStringValue

public void setStringValue(short stringType, String stringValue)
DOM: Implements {@link org.w3c.dom.css.CSSPrimitiveValue#setStringValue(short,String)}.

toCentimeters

protected static float toCentimeters(Value value)
Converts the current value into centimeters.

toDegrees

protected static float toDegrees(Value value)
Converts the current value into degrees.

toGradians

protected static float toGradians(Value value)
Converts the current value into gradians.

toHertz

protected static float toHertz(Value value)
Converts the current value into Hertz.

toInches

protected static float toInches(Value value)
Converts the current value into inches.

tokHertz

protected static float tokHertz(Value value)
Converts the current value into kHertz.

toMillimeters

protected static float toMillimeters(Value value)
Converts the current value into millimeters.

toMilliseconds

protected static float toMilliseconds(Value value)
Converts the current value into milliseconds.

toPicas

protected static float toPicas(Value value)
Converts the current value into picas.

toPoints

protected static float toPoints(Value value)
Converts the current value into points.

toRadians

protected static float toRadians(Value value)
Converts the current value into radians.

toSeconds

protected static float toSeconds(Value value)
Converts the current value into seconds.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.