org.eclipse.mylyn.wikitext.core.parser.builder
Class HtmlDocumentBuilder.Stylesheet

java.lang.Object
  extended by org.eclipse.mylyn.wikitext.core.parser.builder.HtmlDocumentBuilder.Stylesheet
Enclosing class:
HtmlDocumentBuilder

public static class HtmlDocumentBuilder.Stylesheet
extends Object

A CSS stylesheet definition, created via one of HtmlDocumentBuilder.addCssStylesheet(File) or HtmlDocumentBuilder.addCssStylesheet(String).


Constructor Summary
HtmlDocumentBuilder.Stylesheet(File file)
          Create a CSS stylesheet where the contents of the CSS stylesheet are embedded in the HTML.
HtmlDocumentBuilder.Stylesheet(Reader reader)
          Create a CSS stylesheet where the contents of the CSS stylesheet are embedded in the HTML.
HtmlDocumentBuilder.Stylesheet(String url)
          Create a CSS stylesheet to the output document as an URL where the CSS stylesheet is referenced as an HTML link.
 
Method Summary
 Map<String,String> getAttributes()
          the attributes of the stylesheet, which may be modified prior to adding to the document.
 File getFile()
          the file of the stylesheet, or null if it's not defined
 Reader getReader()
          the content reader, or null if it's not defined.
 String getUrl()
          the url of the stylesheet, or null if it's not defined
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlDocumentBuilder.Stylesheet

public HtmlDocumentBuilder.Stylesheet(File file)
Create a CSS stylesheet where the contents of the CSS stylesheet are embedded in the HTML. Generates code similar to the following:
 <code>
   <style type="text/css">
   ... contents of the file ...
   </style>
 </code>
 

Parameters:
file - the CSS file whose contents must be available

HtmlDocumentBuilder.Stylesheet

public HtmlDocumentBuilder.Stylesheet(String url)
Create a CSS stylesheet to the output document as an URL where the CSS stylesheet is referenced as an HTML link. Calling this method after starting the document has no effect. Generates code similar to the following:
   <link type="text/css" rel="stylesheet" href="url"/>
 

Parameters:
url - the CSS url to use, which may be relative or absolute

HtmlDocumentBuilder.Stylesheet

public HtmlDocumentBuilder.Stylesheet(Reader reader)
Create a CSS stylesheet where the contents of the CSS stylesheet are embedded in the HTML. Generates code similar to the following:
 <code>
   <style type="text/css">
   ... contents of the file ...
   </style>
 </code>
 
The caller is responsible for closing the reader.

Parameters:
reader - the reader from which content is provided.
Method Detail

getAttributes

public Map<String,String> getAttributes()
the attributes of the stylesheet, which may be modified prior to adding to the document. Attributes href, type and rel are all ignored.


getFile

public File getFile()
the file of the stylesheet, or null if it's not defined


getUrl

public String getUrl()
the url of the stylesheet, or null if it's not defined


getReader

public Reader getReader()
the content reader, or null if it's not defined.



Copyright © 2011 FuseSource, Corp.. All Rights Reserved.