Package eu.webtoolkit.jwt
Class WCssTemplateRule
java.lang.Object
eu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WCssRule
eu.webtoolkit.jwt.WCssTemplateRule
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the declarations.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 Details
-
WCssTemplateRule
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 Details
-
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
Description copied from class:WCssRule
Returns the declarations.This is a semi-colon separated list of CSS declarations.
- Specified by:
getDeclarations
in classWCssRule
-