Flying Saucer Project Release ${app.version}

org.xhtmlrenderer.css.sheet
Class StylesheetInfo

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

public class StylesheetInfo
extends java.lang.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 a uri must be set

Origin defaults to USER_AGENT and media defaults to "all"

Author:
Torbjörn Gannholm

Field Summary
static int AUTHOR
          Origin of stylesheet - author
static int USER
          Origin of stylesheet - user
static int USER_AGENT
          Origin of stylesheet - user agent
 
Constructor Summary
StylesheetInfo()
           
 
Method Summary
 void addMedium(java.lang.String medium)
           
 boolean appliesToMedia(java.lang.String m)
           
 java.lang.String getContent()
           
 java.util.List getMedia()
          Gets the media attribute of the StylesheetInfo object
 int getOrigin()
          Gets the origin attribute of the StylesheetInfo object
 Stylesheet getStylesheet()
          Gets the stylesheet attribute of the StylesheetInfo object
 java.lang.String getTitle()
          Gets the title attribute of the StylesheetInfo object
 java.lang.String getType()
          Gets the type attribute of the StylesheetInfo object
 java.lang.String getUri()
          Gets the uri attribute of the StylesheetInfo object
 boolean isInline()
           
 void setContent(java.lang.String content)
           
 void setMedia(java.util.List mediaTypes)
           
 void setMedia(java.lang.String media)
          Sets the media attribute of the StylesheetInfo object
 void setOrigin(int origin)
          Sets the origin attribute of the StylesheetInfo object
 void setStylesheet(Stylesheet stylesheet)
          Sets the stylesheet attribute of the StylesheetInfo object
 void setTitle(java.lang.String title)
          Sets the title attribute of the StylesheetInfo object
 void setType(java.lang.String type)
          Sets the type attribute of the StylesheetInfo object
 void setUri(java.lang.String uri)
          Sets the uri attribute of the StylesheetInfo object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_AGENT

public static final int USER_AGENT
Origin of stylesheet - user agent

See Also:
Constant Field Values

USER

public static final int USER
Origin of stylesheet - user

See Also:
Constant Field Values

AUTHOR

public static final int AUTHOR
Origin of stylesheet - author

See Also:
Constant Field Values
Constructor Detail

StylesheetInfo

public StylesheetInfo()
Method Detail

appliesToMedia

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

setUri

public void setUri(java.lang.String uri)
Sets the uri attribute of the StylesheetInfo object

Parameters:
uri - The new uri value

setMedia

public void setMedia(java.lang.String media)
Sets the media attribute of the StylesheetInfo object

Parameters:
media - The new media value

setMedia

public void setMedia(java.util.List mediaTypes)

addMedium

public void addMedium(java.lang.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(java.lang.String type)
Sets the type attribute of the StylesheetInfo object

Parameters:
type - The new type value

setTitle

public void setTitle(java.lang.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 java.lang.String getUri()
Gets the uri attribute of the StylesheetInfo object

Returns:
The uri value

getMedia

public java.util.List 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 java.lang.String getType()
Gets the type attribute of the StylesheetInfo object

Returns:
The type value

getTitle

public java.lang.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 java.lang.String getContent()

setContent

public void setContent(java.lang.String content)

isInline

public boolean isInline()

Flying Saucer Project Release ${app.version}

Flying Saucer Project Home