|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.bridge.CSSUtilities
A collection of utility method involving CSS property. The listed methods bellow could be used as convenient methods to create concrete objects regarding to CSS properties.
Fields inherited from interface org.apache.batik.bridge.ErrorConstants |
ERR_ATTRIBUTE_MISSING, ERR_ATTRIBUTE_VALUE_MALFORMED, ERR_CSS_LENGTH_NEGATIVE, ERR_CSS_URI_BAD_TARGET, ERR_LENGTH_NEGATIVE, ERR_URI_IMAGE_INVALID, ERR_URI_IO, ERR_URI_MALFORMED, ERR_URI_REFERENCE_A_DOCUMENT, ERR_XLINK_HREF_CIRCULAR_DEPENDENCIES |
Constructor Summary | |
protected |
CSSUtilities()
No instance of this class is required. |
Method Summary | |
static void |
computeStyleAndURIs(Element refElement,
Element localRefElement)
Partially computes the style in the 'def' tree and set it in the 'use' tree. |
static float[] |
convertClip(Element e)
Returns an array of floating offsets representing the 'clip' property or null if 'auto'. |
static ClipRable |
convertClipPath(Element clipedElement,
GraphicsNode clipedNode,
BridgeContext ctx)
Returns a Clip referenced by the specified element and which applies on the specified graphics node. |
static int |
convertClipRule(Element e)
Returns the 'clip-rule' for the specified element. |
static MultipleGradientPaint.ColorSpaceEnum |
convertColorInterpolation(Element e)
Returns the color space for the specified element. |
static boolean |
convertColorInterpolationFilter(Element filterElement)
Returns the color space for the specified filter element. |
static java.util.Map |
convertColorRendering(Element e)
Returns the rendering hints for the specified element or null none has been specified. |
static boolean |
convertDisplay(Element e)
Returns true if the specified element has to be displayed, false otherwise. |
static java.awt.geom.Rectangle2D |
convertEnableBackground(Element e,
UnitProcessor.Context uctx)
Returns the subregion of user space where access to the background image is allowed to happen. |
static int |
convertFillRule(Element e)
Returns the 'fill-rule' for the specified element. |
static Filter |
convertFilter(Element filteredElement,
GraphicsNode filteredNode,
BridgeContext ctx)
Returns a Filter referenced by the specified element and which applies on the specified graphics node. |
static java.awt.Color |
convertFloodColor(Element e,
BridgeContext ctx)
Converts the color defined on the specified <feFlood> element to a Color. |
static java.util.Map |
convertImageRendering(Element e)
Returns the rendering hints for the specified image element or null none has been specified. |
static java.awt.Color |
convertLightingColor(Element e,
BridgeContext ctx)
Converts the color defined on the specified lighting filter element to a Color. |
static Mask |
convertMask(Element maskedElement,
GraphicsNode maskedNode,
BridgeContext ctx)
Returns a Mask referenced by the specified element and which applies on the specified graphics node. |
static java.awt.Composite |
convertOpacity(Element e)
Returns a composite object that represents the 'opacity' of the specified element. |
static boolean |
convertOverflow(Element e)
Returns true if the 'overflow' property indicates that an additional clip is required, false otherwise. |
static java.util.Map |
convertShapeRendering(Element e)
Returns the rendering hints for the specified shape element or null none has been specified. |
static java.awt.Color |
convertStopColor(Element stopElement,
float opacity,
BridgeContext ctx)
Converts the color defined on the specified <stop> element to a Color. |
static java.util.Map |
convertTextRendering(Element e)
Returns the rendering hints for the specified text element or null none has been specified. |
static boolean |
convertVisibility(Element e)
Returns true if the specified element is visible, false otherwise. |
static CSSOMReadOnlyStyleDeclaration |
getComputedStyle(Element e)
Returns the computed style of the specified element. |
static AbstractViewCSS |
getViewCSS(Element e)
Returns the View CSS associated to the specified element. |
protected static int |
rule(CSSValue v)
Returns the winding rule represented by the specified CSSValue. |
static void |
updateURIs(CSSOMReadOnlyStyleDeclaration sd,
java.net.URL url)
Updates the URIs in the given style declaration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected CSSUtilities()
Method Detail |
public static AbstractViewCSS getViewCSS(Element e)
e
- the elementpublic static CSSOMReadOnlyStyleDeclaration getComputedStyle(Element e)
e
- the elementpublic static java.awt.geom.Rectangle2D convertEnableBackground(Element e, UnitProcessor.Context uctx)
e
- the container elementpublic static boolean convertColorInterpolationFilter(Element filterElement)
filterElement
- the elementpublic static MultipleGradientPaint.ColorSpaceEnum convertColorInterpolation(Element e)
e
- the elementpublic static java.util.Map convertShapeRendering(Element e)
e
- the elementpublic static java.util.Map convertTextRendering(Element e)
e
- the elementpublic static java.util.Map convertImageRendering(Element e)
e
- the elementpublic static java.util.Map convertColorRendering(Element e)
e
- the elementpublic static boolean convertDisplay(Element e)
e
- the elementpublic static boolean convertVisibility(Element e)
e
- the elementpublic static java.awt.Composite convertOpacity(Element e)
e
- the elementpublic static boolean convertOverflow(Element e)
e
- the element with the 'overflow' propertypublic static float[] convertClip(Element e)
e
- the element with the 'clip' propertypublic static Filter convertFilter(Element filteredElement, GraphicsNode filteredNode, BridgeContext ctx)
filteredElement
- the element that references the filterfilteredNode
- the graphics node associated to the element to filterctx
- the bridge contextpublic static ClipRable convertClipPath(Element clipedElement, GraphicsNode clipedNode, BridgeContext ctx)
clipedElement
- the element that references the clipclipedNode
- the graphics node associated to the element to clipctx
- the bridge contextpublic static int convertClipRule(Element e)
e
- the element interested in its a 'clip-rule'public static Mask convertMask(Element maskedElement, GraphicsNode maskedNode, BridgeContext ctx)
maskedElement
- the element that references the maskmaskedNode
- the graphics node associated to the element to maskctx
- the bridge contextpublic static int convertFillRule(Element e)
e
- the element interested in its a 'fill-rule'public static java.awt.Color convertLightingColor(Element e, BridgeContext ctx)
e
- the lighting filter elementctx
- the bridge contextpublic static java.awt.Color convertFloodColor(Element e, BridgeContext ctx)
e
- the feFlood elementctx
- the bridge contextpublic static java.awt.Color convertStopColor(Element stopElement, float opacity, BridgeContext ctx)
stopElement
- the stop elementopacity
- the paint opacityctx
- the bridge context to usepublic static void computeStyleAndURIs(Element refElement, Element localRefElement)
Note: This method must be called only when 'use' has been added to the DOM tree.
refElement
- the referenced elementlocalRefElement
- the referenced element in the current documentpublic static void updateURIs(CSSOMReadOnlyStyleDeclaration sd, java.net.URL url) throws java.net.MalformedURLException
protected static int rule(CSSValue v)
v
- the value that represents the rule
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |