Top Description Fields Constructors Methods
com.openhtmltopdf.css.sheet

public Class StylesheetInfo

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .List, .Locale

A reference to a stylesheet. If no stylesheet is set, the matcher will try to find the stylesheet by uri, first from the StylesheetFactory, 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
Torbjoern Gannholm

Field Summary

Modifier and TypeField and Description
public static final int
AUTHOR

Origin of stylesheet - author

private String
private final List<String>
private int
private Stylesheet
private String
private String
private String
public static final int
USER

Origin of stylesheet - user

public static final int
USER_AGENT

Origin of stylesheet - user agent

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addMedium(String medium)

public boolean

Returns:

true if the stylesheet referenced applies to the medium
appliesToMedia
(String
a single media identifier
m
)

public String
public List<String>

Returns:

The media value
getMedia
()

Gets the media attribute of the StylesheetInfo object

public int

Returns:

The origin value
getOrigin
()

Gets the origin attribute of the StylesheetInfo object

public Stylesheet

Returns:

The stylesheet value
getStylesheet
()

Gets the stylesheet attribute of the StylesheetInfo object

public String

Returns:

The title value
getTitle
()

Gets the title attribute of the StylesheetInfo object

public String

Returns:

The type value
getType
()

Gets the type attribute of the StylesheetInfo object

public String

Returns:

The uri value
getUri
()

Gets the uri attribute of the StylesheetInfo object

public boolean
public void
setContent(String content)

public void
setMedia(String
The new media value
media
)

Sets the media attribute of the StylesheetInfo object

public void
setOrigin(int
The new origin value
origin
)

Sets the origin attribute of the StylesheetInfo object

public void
setStylesheet(Stylesheet
The new stylesheet value
stylesheet
)

Sets the stylesheet attribute of the StylesheetInfo object

public void
setTitle(String
The new title value
title
)

Sets the title attribute of the StylesheetInfo object

public void
setType(String
The new type value
type
)

Sets the type attribute of the StylesheetInfo object

public void
setUri(String
The new uri value
uri
)

Sets the uri attribute of the StylesheetInfo object

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AUTHORback to summary
public static final int AUTHOR

Origin of stylesheet - author

contentback to summary
private String content
mediaTypesback to summary
private final List<String> mediaTypes
originback to summary
private int origin
stylesheetback to summary
private Stylesheet stylesheet
titleback to summary
private String title
typeback to summary
private String type
uriback to summary
private String uri
USERback to summary
public static final int USER

Origin of stylesheet - user

USER_AGENTback to summary
public static final int USER_AGENT

Origin of stylesheet - user agent

Constructor Detail

StylesheetInfoback to summary
public StylesheetInfo()

Method Detail

addMediumback to summary
public void addMedium(String medium)
appliesToMediaback to summary
public boolean appliesToMedia(String m)
Parameters
m:String

a single media identifier

Returns:boolean

true if the stylesheet referenced applies to the medium

getContentback to summary
public String getContent()
getMediaback to summary
public List<String> getMedia()

Gets the media attribute of the StylesheetInfo object

Returns:List<String>

The media value

getOriginback to summary
public int getOrigin()

Gets the origin attribute of the StylesheetInfo object

Returns:int

The origin value

getStylesheetback to summary
public Stylesheet getStylesheet()

Gets the stylesheet attribute of the StylesheetInfo object

Returns:Stylesheet

The stylesheet value

getTitleback to summary
public String getTitle()

Gets the title attribute of the StylesheetInfo object

Returns:String

The title value

getTypeback to summary
public String getType()

Gets the type attribute of the StylesheetInfo object

Returns:String

The type value

getUriback to summary
public String getUri()

Gets the uri attribute of the StylesheetInfo object

Returns:String

The uri value

isInlineback to summary
public boolean isInline()
setContentback to summary
public void setContent(String content)
setMediaback to summary
public void setMedia(String media)

Sets the media attribute of the StylesheetInfo object

Parameters
media:String

The new media value

setOriginback to summary
public void setOrigin(int origin)

Sets the origin attribute of the StylesheetInfo object

Parameters
origin:int

The new origin value

setStylesheetback to summary
public void setStylesheet(Stylesheet stylesheet)

Sets the stylesheet attribute of the StylesheetInfo object

Parameters
stylesheet:Stylesheet

The new stylesheet value

setTitleback to summary
public void setTitle(String title)

Sets the title attribute of the StylesheetInfo object

Parameters
title:String

The new title value

setTypeback to summary
public void setType(String type)

Sets the type attribute of the StylesheetInfo object

Parameters
type:String

The new type value

setUriback to summary
public void setUri(String uri)

Sets the uri attribute of the StylesheetInfo object

Parameters
uri:String

The new uri value