Class KeywordValue

java.lang.Object
io.sf.carte.doc.style.css.property.StyleValue
io.sf.carte.doc.style.css.property.KeywordValue
All Implemented Interfaces:
CSSValue, CSSValueItem, ValueItem, Serializable, Cloneable
Direct Known Subclasses:
InheritValue, InitialValue, RevertValue, UnsetValue

public abstract class KeywordValue extends StyleValue implements ValueItem
A CSS-wide keyword value, like inherit.
See Also:
  • Constructor Details

    • KeywordValue

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

    • getCssValueType

      public CSSValue.CssType getCssValueType()
      Description copied from interface: CSSValue
      Get the general category to which this value belongs.
      Specified by:
      getCssValueType in interface CSSValue
      Returns:
      the general value type.
    • getNextLexicalUnit

      public LexicalUnit getNextLexicalUnit()
      Description copied from interface: CSSValueItem
      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 CSSValueItem
      Returns:
      the next lexical unit after this item was processed.
    • hasWarnings

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

      public void handleSyntaxWarnings(StyleDeclarationErrorHandler handler)
      Description copied from interface: CSSValueItem
      Use the given error handler to handle warnings.
      Specified by:
      handleSyntaxWarnings in interface CSSValueItem
      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
      Parameters:
      cssText - the text value.
      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 KeywordValue asSubproperty()
    • clone

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