com.day.cq.wcm.core.impl.designer
Class CSSWriter

java.lang.Object
  extended by com.day.cq.wcm.core.impl.designer.CSSWriter

public class CSSWriter
extends Object

Implements a writer that takes a design node and writes it's content as a style sheet.

.parsys { /** components: textimage text download; * / } div.textimage { color: blue; /** image-position: left; * / } div.textimage span { color: green; } div.textimage span.invert { color: white; background: green } img.textimage { font-family: verdana; font-size: 12pt; background: white; } would be stored as: + jcr:content + textimage + div - color: "blue" + span - color: "green" + span.invert - color: "white" - backgroud: "green" + img - font-family: "verdana" - font-size: "12pt" - background: "white" + jcr:content + textimage - div color: "blue" - div span color: "green" - div span_invert color: "white" - div span.invert.background: "green" - img.font-family: "verdana" - img.font-size: "12pt" - img.background: "white"


Constructor Summary
CSSWriter(Node root)
          creates a new css writer for the given root node
 
Method Summary
 boolean isIncludeCustom()
          Checks if custom CSS properties are included
 void setIncludeCustom(boolean includeCustom)
          Controls if custom CSS properties are included
 void write(PrintWriter out)
          Writes the content as style sheet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSSWriter

public CSSWriter(Node root)
creates a new css writer for the given root node

Parameters:
root - the root node of the design
Method Detail

isIncludeCustom

public boolean isIncludeCustom()
Checks if custom CSS properties are included

Returns:
true if custom css properties are included

setIncludeCustom

public void setIncludeCustom(boolean includeCustom)
Controls if custom CSS properties are included

Parameters:
includeCustom - true if custom CSS properties are included

write

public void write(PrintWriter out)
           throws IOException,
                  RepositoryException
Writes the content as style sheet

Parameters:
out - writer to write to
Throws:
IOException - if an I/O error occurs
RepositoryException - if an error during repository access occurs.


Copyright © 2008 Day Management AG. All Rights Reserved.