eu.webtoolkit.jwt
Class WCssStyleSheet

java.lang.Object
  extended by eu.webtoolkit.jwt.WCssStyleSheet

public class WCssStyleSheet
extends java.lang.Object

A CSS style sheet.

See Also:
WApplication.getStyleSheet()

Constructor Summary
WCssStyleSheet()
          Creates a new empty style sheet.
 
Method Summary
 WCssTextRule addRule(java.lang.String selector, java.lang.String declarations)
          Adds a CSS rule.
 WCssTextRule addRule(java.lang.String selector, java.lang.String declarations, java.lang.String ruleName)
          Adds a CSS rule.
 WCssTemplateRule addRule(java.lang.String selector, WCssDecorationStyle style)
          Adds a CSS rule.
 WCssTemplateRule addRule(java.lang.String selector, WCssDecorationStyle style, java.lang.String ruleName)
          Adds a CSS rule.
 WCssRule addRule(WCssRule rule)
          Adds a CSS rule.
 WCssRule addRule(WCssRule rule, java.lang.String ruleName)
          Adds a CSS rule.
 boolean isDefined(java.lang.String ruleName)
          Returns if a rule was already defined in this style sheet.
 void javaScriptUpdate(WApplication app, java.io.Writer js, boolean all)
           
 void removeRule(WCssRule rule)
          Removes a rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WCssStyleSheet

public WCssStyleSheet()
Creates a new empty style sheet.

Method Detail

addRule

public WCssTextRule addRule(java.lang.String selector,
                            java.lang.String declarations,
                            java.lang.String ruleName)
Adds a CSS rule.

Add a rule using the CSS selector selector, with CSS declarations in declarations. These declarations must be a list separated by semi-colons (;).

Optionally, you may give a ruleName, which may later be used to check if the rule was already defined.

See Also:
isDefined(String ruleName)

addRule

public final WCssTextRule addRule(java.lang.String selector,
                                  java.lang.String declarations)
Adds a CSS rule.

Returns addRule(selector, declarations, "")


addRule

public WCssTemplateRule addRule(java.lang.String selector,
                                WCssDecorationStyle style,
                                java.lang.String ruleName)
Adds a CSS rule.

Add a rule using the CSS selector selector, with styles specified in style.

Optionally, you may give a ruleName, which may later be used to check if the rule was already defined.

See Also:
isDefined(String ruleName)

addRule

public final WCssTemplateRule addRule(java.lang.String selector,
                                      WCssDecorationStyle style)
Adds a CSS rule.

Returns addRule(selector, style, "")


addRule

public WCssRule addRule(WCssRule rule,
                        java.lang.String ruleName)
Adds a CSS rule.

Optionally, you may give a ruleName, which may later be used to check if the rule was already defined.

See Also:
isDefined(String ruleName)

addRule

public final WCssRule addRule(WCssRule rule)
Adds a CSS rule.

Returns addRule(rule, "")


isDefined

public boolean isDefined(java.lang.String ruleName)
Returns if a rule was already defined in this style sheet.

Returns whether a rule was added with the given ruleName.

See Also:
addRule(String selector, String declarations, String ruleName)

removeRule

public void removeRule(WCssRule rule)
Removes a rule.


javaScriptUpdate

public void javaScriptUpdate(WApplication app,
                             java.io.Writer js,
                             boolean all)
                      throws java.io.IOException
Throws:
java.io.IOException