de.infinityloop.util.style
Class CSSPropertyDefaultUnits

java.lang.Object
  extended by de.infinityloop.util.style.CSSPropertyDefaultUnits

public class CSSPropertyDefaultUnits
extends java.lang.Object

This class reads a cssunits.map and holds it in an internal object.


Constructor Summary
CSSPropertyDefaultUnits()
          Default constructor creating an object that returns the default unit (mm) and precision (2) for each length property.
CSSPropertyDefaultUnits(InputProxy src)
          Constructor creating an object that is based on an external description text file.
 
Method Summary
 int getUnitId(java.lang.String prop)
          Retrieves the unit id for the passed property name
 int getUnitPrecision(java.lang.String prop)
          Retrieves the unit precision for the passed property name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSSPropertyDefaultUnits

public CSSPropertyDefaultUnits()
Default constructor creating an object that returns the default unit (mm) and precision (2) for each length property.


CSSPropertyDefaultUnits

public CSSPropertyDefaultUnits(InputProxy src)
Constructor creating an object that is based on an external description text file.
      Available options (must be before anything else):
      @option-default-length-unit  default unit for all
                                   undefined length properties

      @option-default-length-precision  default precision for 
                                        all undefined length 
                                        precisions
       Basic structure: 
       property-name:unitname,precision
     

Example:

        @option-default-length-unit:mm
        @option-default-length-precision:2

        font-size:pt,1
        text-indent:mm,1
        width:mm,1
        height:mm,1
        ...
     

Parameters:
src - the configuration file source
Method Detail

getUnitId

public int getUnitId(java.lang.String prop)
Retrieves the unit id for the passed property name


getUnitPrecision

public int getUnitPrecision(java.lang.String prop)
Retrieves the unit precision for the passed property name