Class StyleDeclaration

java.lang.Object
io.sf.carte.echosvg.css.engine.StyleDeclaration

public class StyleDeclaration extends Object
This class represents a collection of CSS property values.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    The number of values in the declaration.
    protected int[]
    The value indexes.
    protected static final int
     
    protected boolean[]
    The value priorities.
    protected Value[]
    The values.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(Value v, int idx, boolean prio)
    Appends a value to the declaration.
    int
    getIndex(int idx)
    Returns the property index of a value.
    boolean
    getPriority(int idx)
    Tells whether a value is important.
    getValue(int idx)
    Returns the value at the given index.
    void
    put(int idx, Value v, int i, boolean prio)
    Sets a value within the declaration.
    void
    remove(int idx)
    Removes the value at the given index.
    int
    Returns the number of values in the declaration.
    Returns a printable representation of this style rule.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INITIAL_LENGTH

      protected static final int INITIAL_LENGTH
      See Also:
    • values

      protected Value[] values
      The values.
    • indexes

      protected int[] indexes
      The value indexes.
    • priorities

      protected boolean[] priorities
      The value priorities.
    • count

      protected int count
      The number of values in the declaration.
  • Constructor Details

    • StyleDeclaration

      public StyleDeclaration()
  • Method Details

    • size

      public int size()
      Returns the number of values in the declaration.
    • getValue

      public Value getValue(int idx)
      Returns the value at the given index.
    • getIndex

      public int getIndex(int idx)
      Returns the property index of a value.
    • getPriority

      public boolean getPriority(int idx)
      Tells whether a value is important.
    • remove

      public void remove(int idx)
      Removes the value at the given index.
    • put

      public void put(int idx, Value v, int i, boolean prio)
      Sets a value within the declaration.
    • append

      public void append(Value v, int idx, boolean prio)
      Appends a value to the declaration.
    • toString

      public String toString(CSSEngine eng)
      Returns a printable representation of this style rule.