Interface Stylesheet


public interface Stylesheet
CSS style sheet
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the amount of rules in this stylesheet
    getRule(int index)
    Gets the rule at a specific index
    Get the stylesheet's source.
  • Method Details

    • getLength

      int getLength()
      Gets the amount of rules in this stylesheet
      Returns:
      Rule count
    • getRule

      StyleRule getRule(int index) throws IndexOutOfBoundsException
      Gets the rule at a specific index
      Parameters:
      index - Rule index
      Returns:
      Rule
      Throws:
      IndexOutOfBoundsException - If the index is less than 0, or greater/equal to getLength().
    • getSource

      String getSource()
      Get the stylesheet's source.
      Return values
      Stylesheet type Return value
      Inline stylesheet inline
      Programmatically created stylesheet programmatic
      Default styles sheet default-stylesheet
      Stylesheet loaded from a file (URI the stylesheet was loaded from)
      Returns:
      Stylesheet source