eu.webtoolkit.jwt
Class WCssTemplateRule

java.lang.Object
  extended by eu.webtoolkit.jwt.WObject
      extended by eu.webtoolkit.jwt.WCssRule
          extended by eu.webtoolkit.jwt.WCssTemplateRule

public class WCssTemplateRule
extends WCssRule

A CSS rule based on a template widget.

This is a CSS rule whose CSS style properties are defined based on properties of a template widget. When modifying the template widget, these changes are reflected on the CSS rule and thus all widgets that have this CSS rule.

See Also:
WCssStyleSheet

Constructor Summary
WCssTemplateRule(java.lang.String selector)
          Creates a CSS rule with a given selector.
WCssTemplateRule(java.lang.String selector, WObject parent)
          Creates a CSS rule with a given selector.
 
Method Summary
 java.lang.String getDeclarations()
          Returns the declarations.
 WWidget getTemplateWidget()
          Returns the widget that is used as a template.
 void remove()
          Destructor.
 
Methods inherited from class eu.webtoolkit.jwt.WCssRule
getSelector, getSheet, modified
 
Methods inherited from class eu.webtoolkit.jwt.WObject
addChild, getId, getObjectName, setObjectName, tr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WCssTemplateRule

public WCssTemplateRule(java.lang.String selector,
                        WObject parent)
Creates a CSS rule with a given selector.

The selector should be a valid CSS selector.

Note: If you want to update the rule, then the selector should be unique and not contain commas, since this is not supported by Microsoft Internet Explorer.


WCssTemplateRule

public WCssTemplateRule(java.lang.String selector)
Creates a CSS rule with a given selector.

Calls this(selector, (WObject)null)

Method Detail

remove

public void remove()
Description copied from class: WCssRule
Destructor.

Overrides:
remove in class WCssRule

getTemplateWidget

public WWidget getTemplateWidget()
Returns the widget that is used as a template.

Various properties of the widget are reflected in the CSS style:

When modifying one of these properties of the returned widget, the rule will be updated accordingly.


getDeclarations

public java.lang.String getDeclarations()
Description copied from class: WCssRule
Returns the declarations.

This is a semi-colon separated list of CSS declarations.

Specified by:
getDeclarations in class WCssRule