EchoPoint
1.0

echopoint.stylesheet
Class CssStyleSheetWriter

java.lang.Object
  extended byechopoint.stylesheet.CssStyleSheetWriter

public class CssStyleSheetWriter
extends java.lang.Object

The CssStyleSheetWriter class allows a CSS stylesheet fragment to be created for a given Component or Component class.

You can use this class to auto-generate valid CSS files.

This class releies on the StyleInfo support being available for a given Component. This allows the CssStyleSheetWriter to know what properties to look in for values and also what the names of the style attributes should be.


Constructor Summary
CssStyleSheetWriter()
          Constructs a CssStyleSheetCreator
 
Method Summary
 void createCssStyleSheet(java.lang.Class clazz, java.io.PrintWriter out)
          Create a style sheet entry for the given clazz and places the result into the provided PrintWriter.
 void createCssStyleSheet(nextapp.echo.Component c, java.io.PrintWriter out)
          Create a style sheet entry for the given Component and places the result into the provided PrintWriter.
 int getJustificationWidth()
          Returns the justification width
 boolean isClassCommentsGenerated()
          Returns whether class comments are generated.
 boolean isDetailCommentsShown()
          Returns true if all detail is to be shown.
 boolean isMostSpecificClassOrder()
          returns true if the classes will be presented in most specific class order.
 void setClassCommentsGenerated(boolean b)
          Set this to true to generate class comments for each class that makes up the component class.
 void setDetailCommentsShown(boolean b)
          Controls whether all detail is to be shown.
 void setJustificationWidth(int i)
          Sets the justification with of a CSS line.
 void setMostSpecificClassOrder(boolean b)
          Controls whether or not will be presented in most specific class order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CssStyleSheetWriter

public CssStyleSheetWriter()
Constructs a CssStyleSheetCreator

Method Detail

createCssStyleSheet

public void createCssStyleSheet(java.lang.Class clazz,
                                java.io.PrintWriter out)
Create a style sheet entry for the given clazz and places the result into the provided PrintWriter.

Parameters:
clazz - the component clazz to check
out - -the output stream for results.

createCssStyleSheet

public void createCssStyleSheet(nextapp.echo.Component c,
                                java.io.PrintWriter out)
Create a style sheet entry for the given Component and places the result into the provided PrintWriter. If it can, then values will be taken from the Component bean properties.

Parameters:
c - the compoennt to check
out - -the output stream for results.

isDetailCommentsShown

public boolean isDetailCommentsShown()
Returns true if all detail is to be shown.

Returns:
boolean

setDetailCommentsShown

public void setDetailCommentsShown(boolean b)
Controls whether all detail is to be shown.

Parameters:
b -

getJustificationWidth

public int getJustificationWidth()
Returns the justification width

Returns:
int

setJustificationWidth

public void setJustificationWidth(int i)
Sets the justification with of a CSS line. This name/value pair will be justified within this width if detail is shown.

Parameters:
i -

isClassCommentsGenerated

public boolean isClassCommentsGenerated()
Returns whether class comments are generated.

Returns:
boolean

setClassCommentsGenerated

public void setClassCommentsGenerated(boolean b)
Set this to true to generate class comments for each class that makes up the component class.

Parameters:
b - the flag

isMostSpecificClassOrder

public boolean isMostSpecificClassOrder()
returns true if the classes will be presented in most specific class order.

Returns:
a boolean

setMostSpecificClassOrder

public void setMostSpecificClassOrder(boolean b)
Controls whether or not will be presented in most specific class order.

Parameters:
b -

EchoPoint
1.0