org.apache.batik.bridge
Class UnitProcessor.DefaultContext

java.lang.Object
  |
  +--org.apache.batik.bridge.UnitProcessor.DefaultContext
All Implemented Interfaces:
UnitProcessor.Context
Enclosing class:
UnitProcessor

public static class UnitProcessor.DefaultContext
extends java.lang.Object
implements UnitProcessor.Context

This class is the default context for a particular element. Informations not available on the element are get from the bridge context (such as the viewport or the pixel to millimeter factor.


Field Summary
protected  BridgeContext ctx
           
protected  Element e
          The element.
 
Constructor Summary
UnitProcessor.DefaultContext(BridgeContext ctx, Element e)
           
 
Method Summary
 Element getElement()
          Returns the element.
 CSSPrimitiveValue getFontSize()
          Returns the font-size value.
 float getMediumFontSize()
          Returns the font-size medium value in pt.
 UnitProcessor.Context getParentElementContext()
          Returns the context of the parent element of this context.
 float getPixelToMM()
          Returns the pixel to mm factor.
 float getViewportHeight()
          Returns the viewport height used to compute units.
 float getViewportWidth()
          Returns the viewport width used to compute units.
 float getXHeight()
          Returns the x-height value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

e

protected Element e
The element.

ctx

protected BridgeContext ctx
Constructor Detail

UnitProcessor.DefaultContext

public UnitProcessor.DefaultContext(BridgeContext ctx,
                                    Element e)
Method Detail

getElement

public Element getElement()
Returns the element.
Specified by:
getElement in interface UnitProcessor.Context

getParentElementContext

public UnitProcessor.Context getParentElementContext()
Returns the context of the parent element of this context.
Specified by:
getParentElementContext in interface UnitProcessor.Context

getPixelToMM

public float getPixelToMM()
Returns the pixel to mm factor.
Specified by:
getPixelToMM in interface UnitProcessor.Context

getMediumFontSize

public float getMediumFontSize()
Returns the font-size medium value in pt.
Specified by:
getMediumFontSize in interface UnitProcessor.Context

getFontSize

public CSSPrimitiveValue getFontSize()
Returns the font-size value.
Specified by:
getFontSize in interface UnitProcessor.Context

getXHeight

public float getXHeight()
Returns the x-height value.
Specified by:
getXHeight in interface UnitProcessor.Context

getViewportWidth

public float getViewportWidth()
Returns the viewport width used to compute units.
Specified by:
getViewportWidth in interface UnitProcessor.Context

getViewportHeight

public float getViewportHeight()
Returns the viewport height used to compute units.
Specified by:
getViewportHeight in interface UnitProcessor.Context


Copyright © 2001 Apache Software Foundation. All Rights Reserved.