Class InheritValue

java.lang.Object
io.sf.carte.doc.style.css.property.StyleValue
io.sf.carte.doc.style.css.property.InheritValue
All Implemented Interfaces:
ExtendedCSSValue, ValueItem, Cloneable, CSSValue

public class InheritValue extends StyleValue implements ValueItem
An inherit value.
  • Constructor Details

    • InheritValue

      protected InheritValue()
      Must access instance through static method.
  • Method Details

    • getValue

      public static InheritValue getValue()
    • getCssText

      public String getCssText()
      Description copied from class: StyleValue
      Get a string representation of the current value.
      Specified by:
      getCssText in interface CSSValue
      Specified by:
      getCssText in class StyleValue
      Returns:
      the css text representing the value of this property.
    • writeCssText

      public void writeCssText(SimpleWriter wri) throws IOException
      Description copied from interface: ExtendedCSSValue
      Serialize this value to a SimpleWriter.
      Specified by:
      writeCssText in interface ExtendedCSSValue
      Parameters:
      wri - the SimpleWriter.
      Throws:
      IOException - if an error happened while writing.
    • getCSSValue

      public StyleValue getCSSValue()
      Description copied from interface: ValueItem
      Gets the CSSValue associated to this item.

      If there is an item there must be a value, so this method cannot return null.

      Specified by:
      getCSSValue in interface ValueItem
      Returns:
      the CSSValue associated to this item.
    • getNextLexicalUnit

      public LexicalUnit getNextLexicalUnit()
      Description copied from interface: ValueItem
      Get the next lexical unit after processing this item.

      This method is useful as some primitive values (ratio) may take more than one unit.

      Specified by:
      getNextLexicalUnit in interface ValueItem
      Returns:
      the next lexical unit after this item was processed.
    • hasWarnings

      public boolean hasWarnings()
      Description copied from interface: ValueItem
      Has this item any warning to report ?
      Specified by:
      hasWarnings in interface ValueItem
      Returns:
      true if this item any warning to report.
    • handleSyntaxWarnings

      public void handleSyntaxWarnings(StyleDeclarationErrorHandler handler)
      Description copied from interface: ValueItem
      Use the given error handler to handle warnings.
      Specified by:
      handleSyntaxWarnings in interface ValueItem
      Parameters:
      handler - the error handler.
    • setCssText

      public void setCssText(String cssText) throws DOMException
      Description copied from class: StyleValue
      Attempts to change this value to match the supplied css text.

      In css4j, it is not recommended to set property values using this method.

      Specified by:
      setCssText in interface CSSValue
      Overrides:
      setCssText in class StyleValue
      Throws:
      DOMException - SYNTAX_ERR: Raised if the specified CSS string value has a syntax error (according to the attached property) or is unparsable.
      INVALID_MODIFICATION_ERR: Raised if the specified CSS string value represents a different type of values than the values allowed by the CSS property.
      NO_MODIFICATION_ALLOWED_ERR: Raised if this value is read-only.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class StyleValue
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class StyleValue
    • asSubproperty

      public InheritValue asSubproperty()
    • clone

      public InheritValue clone()
      Description copied from interface: ExtendedCSSValue
      Creates and returns a copy of this value.
      Specified by:
      clone in interface ExtendedCSSValue
      Specified by:
      clone in class StyleValue
      Returns:
      a clone of this value.