org.apache.batik.css.engine

Interface CSSContext

public interface CSSContext

This interface allows the user of a CSSEngine to provide contextual informations.
Method Summary
voidcheckLoadExternalResource(ParsedURL resourceURL, ParsedURL docURL)
This method should throw a SecurityException if the resource found at url and referenced from docURL should not be loaded.
floatgetBlockHeight(Element elt)
Returns the height of the block which directly contains the given element.
floatgetBlockWidth(Element elt)
Returns the width of the block which directly contains the given element.
floatgetBolderFontWeight(float f)
Returns a bolder font-weight.
CSSEnginegetCSSEngineForElement(Element e)
Returns the CSS engine associated with given element.
ValuegetDefaultFontFamily()
Returns the value corresponding to the default font-family.
floatgetLighterFontWeight(float f)
Returns a lighter font-weight.
floatgetMediumFontSize()
Returns the medium font size.
floatgetPixelToMillimeter()
Returns the size of a px CSS unit in millimeters.
floatgetPixelUnitToMillimeter()
Returns the size of a px CSS unit in millimeters.
ValuegetSystemColor(String ident)
Returns the Value corresponding to the given system color.
booleanisDynamic()
Returns true if the document is dynamic, false otherwise.
booleanisInteractive()
Returns true if the document is interactive, false otherwise.

Method Detail

checkLoadExternalResource

public void checkLoadExternalResource(ParsedURL resourceURL, ParsedURL docURL)
This method should throw a SecurityException if the resource found at url and referenced from docURL should not be loaded.

Parameters: resourceURL url for the resource, as defined in the resource's xlink:href attribute. If that attribute was empty, then this parameter should be null docURL url for the document into which the resource was found.

getBlockHeight

public float getBlockHeight(Element elt)
Returns the height of the block which directly contains the given element.

getBlockWidth

public float getBlockWidth(Element elt)
Returns the width of the block which directly contains the given element.

getBolderFontWeight

public float getBolderFontWeight(float f)
Returns a bolder font-weight.

getCSSEngineForElement

public CSSEngine getCSSEngineForElement(Element e)
Returns the CSS engine associated with given element.

getDefaultFontFamily

public Value getDefaultFontFamily()
Returns the value corresponding to the default font-family.

getLighterFontWeight

public float getLighterFontWeight(float f)
Returns a lighter font-weight.

getMediumFontSize

public float getMediumFontSize()
Returns the medium font size.

getPixelToMillimeter

public float getPixelToMillimeter()
Returns the size of a px CSS unit in millimeters. This will be removed after next release.

See Also: getPixelUnitToMillimeter

getPixelUnitToMillimeter

public float getPixelUnitToMillimeter()
Returns the size of a px CSS unit in millimeters.

getSystemColor

public Value getSystemColor(String ident)
Returns the Value corresponding to the given system color.

isDynamic

public boolean isDynamic()
Returns true if the document is dynamic, false otherwise.

isInteractive

public boolean isInteractive()
Returns true if the document is interactive, false otherwise.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.