public static class HtmlDocumentBuilder.Stylesheet
extends java.lang.Object
HtmlDocumentBuilder.addCssStylesheet(File)
or
HtmlDocumentBuilder.addCssStylesheet(String)
.Constructor and Description |
---|
HtmlDocumentBuilder.Stylesheet(java.io.File file)
Create a CSS stylesheet where the contents of the CSS stylesheet are embedded in the HTML.
|
HtmlDocumentBuilder.Stylesheet(java.io.Reader reader)
Create a CSS stylesheet where the contents of the CSS stylesheet are embedded in the HTML.
|
HtmlDocumentBuilder.Stylesheet(java.lang.String url)
Create a CSS stylesheet to the output document as an URL where the CSS stylesheet is referenced as an HTML
link.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
the attributes of the stylesheet, which may be modified prior to adding to the document.
|
java.io.File |
getFile()
the file of the stylesheet, or null if it's not defined
|
java.io.Reader |
getReader()
the content reader, or null if it's not defined.
|
java.lang.String |
getUrl()
the url of the stylesheet, or null if it's not defined
|
public HtmlDocumentBuilder.Stylesheet(java.io.File file)
<code> <style type="text/css"> ... contents of the file ... </style> </code>
file
- the CSS file whose contents must be availablepublic HtmlDocumentBuilder.Stylesheet(java.lang.String url)
starting the document
has no effect. Generates code
similar to the following:
<link type="text/css" rel="stylesheet" href="url"/>
url
- the CSS url to use, which may be relative or absolutepublic HtmlDocumentBuilder.Stylesheet(java.io.Reader reader)
<code> <style type="text/css"> ... contents of the file ... </style> </code>The caller is responsible for closing the reader.
reader
- the reader from which content is provided.public java.util.Map<java.lang.String,java.lang.String> getAttributes()
href
, type
and rel
are all ignored.public java.io.File getFile()
public java.lang.String getUrl()
public java.io.Reader getReader()
Copyright © 2007, 2013 David Green and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html