Interface IBaseStyle<S extends IBaseStyle<S>>
- Type Parameters:
S- is the type of aIBaseStyle.
- All Superinterfaces:
IElement
- All Known Subinterfaces:
ISelectingStyle<S>, ISelectingStyleWithSelectors, IStyle
- All Known Implementing Classes:
AbstractSelectingStyle, DeepSelectingStyle, SelectingStyle, Style
A
IBaseStyle can style IStylableElements. A
IBaseStyle can distinguish if it would style also the child elements
of a given IStylableElement.- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToElement(IStylableElement<?> element) Applies the currentIBaseStyleto the given element.booleanIContainer<? extends ISelectingStyleWithSelectors> withAttachingAttributes(IContainer<String> attachingAttributes) withAttachingAttributes(String... attachingAttributes) withSubStyle(ISelectingStyleWithSelectors subStyle, ISelectingStyleWithSelectors... subStyles) withSubStyles(IContainer<? extends ISelectingStyleWithSelectors> subStyles) Methods inherited from interface IElement
getAttributes, getSpecification, toFormatedString, toXml
-
Method Details
-
applyToElement
Applies the currentIBaseStyleto the given element.- Parameters:
element-
-
getAttachingAttributes
IContainer<String> getAttachingAttributes()- Returns:
- the attaching attributes of the current
IBaseStyle.
-
getSubStyles
IContainer<? extends ISelectingStyleWithSelectors> getSubStyles()- Returns:
- the sub styles of the current
IBaseStyle.
-
containsAttachingAttributes
boolean containsAttachingAttributes()- Returns:
- true if the current
IBaseStylecontains attaching attributes, false otherwise.
-
withAttachingAttributes
- Parameters:
attachingAttributes-- Returns:
- a new
IStylefrom the currentIStylewith the given attachingAttributes added. - Throws:
RuntimeException- if the given attachingAttributes is null.RuntimeException- if one of the given attachingAttributes is not valid.
-
withAttachingAttributes
- Parameters:
attachingAttributes-- Returns:
- a new
IStylefrom the currentIStylewith the given attachingAttributes added. - Throws:
RuntimeException- if the given attachingAttributes is null.RuntimeException- if one of the given attachingAttributes is not valid.
-
withSubStyle
- Parameters:
subStyle-subStyles-- Returns:
- a new
IStylefrom the currentIStylewith the given subStyle and subStyles added. - Throws:
RuntimeException- if the given subStyle is not valid.RuntimeException- if the given subStyles is null.RuntimeException- if one of the given subStyles is not valid.
-
withSubStyles
- Parameters:
subStyles-- Returns:
- a new
IStylefrom the currentIStylewith the given subStyles added. - Throws:
RuntimeException- if the given subStyles is null.RuntimeException- if one of the given subStyles is not valid.
-