Package eu.webtoolkit.jwt
Class WCssTemplateRule
- java.lang.Object
-
- eu.webtoolkit.jwt.WObject
-
- eu.webtoolkit.jwt.WCssRule
-
- 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
-
Constructor Summary
Constructors Constructor Description WCssTemplateRule(java.lang.String selector)Creates a CSS rule with a given selector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDeclarations()Returns the declarations.WWidgetgetTemplateWidget()Returns the widget that is used as a template.-
Methods inherited from class eu.webtoolkit.jwt.WCssRule
getSelector, getSheet, modified, setSelector
-
Methods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, setFormData, setObjectName, tr
-
-
-
-
Constructor Detail
-
WCssTemplateRule
public WCssTemplateRule(java.lang.String selector)
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.
-
-
Method Detail
-
getTemplateWidget
public WWidget getTemplateWidget()
Returns the widget that is used as a template.Various properties of the widget are reflected in the CSS style:
- size and dimensions:
WWidget#resize(),WWidget#setMinimumSize(), andWWidget#setMaximumSize() - its position:
WWidget#setPositionScheme(),WWidget#setOffsets(),WWidget#setFloatSide(),WWidget#setClearSides() - visibility:
WWidget.hide(),WWidget.show()andWWidget#setHidden() - margins:
WWidget#setMargin() - line height:
WWidget#setLineHeight() - all decoration style properties:
WWidget.getDecorationStyle()
When modifying one of these properties of the returned widget, the rule will be updated accordingly.
- size and dimensions:
-
getDeclarations
public java.lang.String getDeclarations()
Description copied from class:WCssRuleReturns the declarations.This is a semi-colon separated list of CSS declarations.
- Specified by:
getDeclarationsin classWCssRule
-
-