org.apache.batik.css.value
Class FontWeightResolver

java.lang.Object
  |
  +--org.apache.batik.css.value.FontWeightResolver
All Implemented Interfaces:
RelativeValueResolver

public class FontWeightResolver
extends java.lang.Object
implements RelativeValueResolver

This class provides a relative value resolver for the 'font-weight' CSS property.


Field Summary
protected  CommonCSSContext context
          The application context.
 
Constructor Summary
FontWeightResolver(CommonCSSContext ctx)
          Creates a new FontWeightResolver object.
 
Method Summary
protected  ImmutableValue createFontWeight(float f)
          Creates a font weight value.
 CSSOMReadOnlyValue getDefaultValue()
          Returns the default value for the handled property.
 java.lang.String getPropertyName()
          Returns the name of the handled property.
 boolean isInheritedProperty()
          Whether the handled property is inherited or not.
 void resolveValue(Element element, java.lang.String pseudoElement, ViewCSS view, CSSOMReadOnlyStyleDeclaration styleDeclaration, CSSOMReadOnlyValue value, java.lang.String priority, int origin)
          Resolves the given value if relative, and puts it in the given table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected CommonCSSContext context
The application context.
Constructor Detail

FontWeightResolver

public FontWeightResolver(CommonCSSContext ctx)
Creates a new FontWeightResolver object.
Parameters:
ctx - The application context.
Method Detail

isInheritedProperty

public boolean isInheritedProperty()
Whether the handled property is inherited or not.
Specified by:
isInheritedProperty in interface RelativeValueResolver

getPropertyName

public java.lang.String getPropertyName()
Returns the name of the handled property.
Specified by:
getPropertyName in interface RelativeValueResolver

getDefaultValue

public CSSOMReadOnlyValue getDefaultValue()
Returns the default value for the handled property.
Specified by:
getDefaultValue in interface RelativeValueResolver

resolveValue

public void resolveValue(Element element,
                         java.lang.String pseudoElement,
                         ViewCSS view,
                         CSSOMReadOnlyStyleDeclaration styleDeclaration,
                         CSSOMReadOnlyValue value,
                         java.lang.String priority,
                         int origin)
Resolves the given value if relative, and puts it in the given table.
Specified by:
resolveValue in interface RelativeValueResolver
Parameters:
element - The element to which this value applies.
pseudoElement - The pseudo element if one.
view - The view CSS of the current document.
styleDeclaration - The computed style declaration.
value - The cascaded value.
priority - The priority of the cascaded value.
origin - The origin of the cascaded value.

createFontWeight

protected ImmutableValue createFontWeight(float f)
Creates a font weight value.


Copyright © 2001 Apache Software Foundation. All Rights Reserved.