Class StylesheetInfo

java.lang.Object
org.xhtmlrenderer.css.sheet.StylesheetInfo

public class StylesheetInfo extends Object
A reference to a stylesheet. If no stylesheet is set, the matcher will try to find the stylesheet by uri, first from the StylesheetFactory cache, then by loading the uri if it is not cached.

Therefore, either a stylesheet must be set, or an uri must be set

Origin defaults to USER_AGENT and media defaults to "all"

  • Field Details

    • stylesheet

      private Stylesheet stylesheet
    • title

      private String title
    • uri

      private String uri
    • origin

      private int origin
    • type

      private String type
    • mediaTypes

      private List<String> mediaTypes
    • content

      private String content
    • USER_AGENT

      public static final int USER_AGENT
      Origin of stylesheet - user agent
      See Also:
    • USER

      public static final int USER
      Origin of stylesheet - user
      See Also:
    • AUTHOR

      public static final int AUTHOR
      Origin of stylesheet - author
      See Also:
  • Constructor Details

    • StylesheetInfo

      public StylesheetInfo()
  • Method Details

    • appliesToMedia

      public boolean appliesToMedia(String m)
      Parameters:
      m - a single media identifier
      Returns:
      true if the stylesheet referenced applies to the medium
    • setUri

      public void setUri(String uri)
      Sets the uri attribute of the StylesheetInfo object
      Parameters:
      uri - The new uri value
    • setMedia

      public void setMedia(String media)
      Sets the media attribute of the StylesheetInfo object
      Parameters:
      media - The new media value
    • setMedia

      public void setMedia(List<String> mediaTypes)
    • addMedium

      public void addMedium(String medium)
    • setOrigin

      public void setOrigin(int origin)
      Sets the origin attribute of the StylesheetInfo object
      Parameters:
      origin - The new origin value
    • setType

      public void setType(String type)
      Sets the type attribute of the StylesheetInfo object
      Parameters:
      type - The new type value
    • setTitle

      public void setTitle(String title)
      Sets the title attribute of the StylesheetInfo object
      Parameters:
      title - The new title value
    • setStylesheet

      public void setStylesheet(Stylesheet stylesheet)
      Sets the stylesheet attribute of the StylesheetInfo object
      Parameters:
      stylesheet - The new stylesheet value
    • getUri

      public String getUri()
      Gets the uri attribute of the StylesheetInfo object
      Returns:
      The uri value
    • getMedia

      public List<String> getMedia()
      Gets the media attribute of the StylesheetInfo object
      Returns:
      The media value
    • getOrigin

      public int getOrigin()
      Gets the origin attribute of the StylesheetInfo object
      Returns:
      The origin value
    • getType

      public String getType()
      Gets the type attribute of the StylesheetInfo object
      Returns:
      The type value
    • getTitle

      public String getTitle()
      Gets the title attribute of the StylesheetInfo object
      Returns:
      The title value
    • getStylesheet

      public Stylesheet getStylesheet()
      Gets the stylesheet attribute of the StylesheetInfo object
      Returns:
      The stylesheet value
    • getContent

      public String getContent()
    • setContent

      public void setContent(String content)
    • isInline

      public boolean isInline()