Flying Saucer Project Release ${app.version}

org.xhtmlrenderer.css.style
Interface FSDerivedValue

All Known Implementing Classes:
ColorValue, DerivedValue, FunctionValue, IdentValue, LengthValue, ListValue, NumberValue, StringValue

public interface FSDerivedValue

Marker interface for all derived values. All methods for any possible style are declared here, which doesn't make complete sense, as, for example, a length can't return a value for asColor(). This is done so that CalculatedStyle can just look up an FSDerivedValue, without casting, and call the appropriate function without a cast to the appropriate subtype. The users of CalculatedStyle have to then make sure they don't make meaningless calls like asColor(CSSName.HEIGHT). DerivedValue and IdentValue, the two implementations of this interface, just throw a RuntimeException if they can't handle the call. NOTE: When resolving proportional property values, implementations of this interface must be prepared to handle calls with different base values.


Method Summary
 FSColor asColor()
           
 float asFloat()
           
 IdentValue asIdentValue()
           
 java.lang.String asString()
           
 java.lang.String[] asStringArray()
           
 float getFloatProportionalTo(CSSName cssName, float baseValue, CssContext ctx)
           
 boolean hasAbsoluteUnit()
           
 boolean isDeclaredInherit()
           
 boolean isDependentOnFontSize()
           
 boolean isIdent()
           
 

Method Detail

isDeclaredInherit

boolean isDeclaredInherit()

asFloat

float asFloat()

asColor

FSColor asColor()

getFloatProportionalTo

float getFloatProportionalTo(CSSName cssName,
                             float baseValue,
                             CssContext ctx)

asString

java.lang.String asString()

asStringArray

java.lang.String[] asStringArray()

asIdentValue

IdentValue asIdentValue()

hasAbsoluteUnit

boolean hasAbsoluteUnit()

isDependentOnFontSize

boolean isDependentOnFontSize()

isIdent

boolean isIdent()

Flying Saucer Project Release ${app.version}

Flying Saucer Project Home