Class SelectingStyle
java.lang.Object
ch.nolix.system.element.base.AbstractElement
ch.nolix.system.style.model.AbstractSelectingStyle
ch.nolix.system.style.model.SelectingStyle
- All Implemented Interfaces:
IElement, IBaseStyle<ISelectingStyleWithSelectors>, ISelectingStyle<ISelectingStyleWithSelectors>, ISelectingStyleWithSelectors
- Author:
- Silvan Wyss
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToElement(IStylableElement<?> element) Applies the currentIBaseStyleto the given element.final booleanstatic SelectingStylefromSelectingStyle(ISelectingStyleWithSelectors selectingStyle) static SelectingStylefromSpecification(INode<?> specification) final IContainer<String> final IContainer<? extends ISelectingStyleWithSelectors> booleanwithAttachingAttributes(IContainer<String> attachingAttributes) withAttachingAttributes(String... attachingAttributes) withSelectorId(String selectorId) withSelectorRoles(IContainer<String> selectorRoles) withSelectorTokens(IContainer<String> selectorTokens) withSelectorType(String selectorType) withSubStyle(ISelectingStyleWithSelectors subStyle, ISelectingStyleWithSelectors... subStyles) withSubStyles(IContainer<? extends ISelectingStyleWithSelectors> subStyles) Methods inherited from class AbstractSelectingStyle
containsSelectorRole, containsSelectorRoles, containsSelectorToken, containsSelectorTokens, getAttributes, getSelectorId, getSelectorRoles, getSelectorTokens, getSelectorType, hasSelectorId, hasSelectorId, hasSelectorType, hasSelectorType, hasSelectorType, selectsElement, withSelectorRole, withSelectorRole, withSelectorToken, withSelectorTypeMethods inherited from class AbstractElement
equals, getSpecification, hashCode, toStringMethods inherited from interface IBaseStyle
containsAttachingAttributes, getAttachingAttributes, getSubStyles, withAttachingAttributes, withSubStyleMethods inherited from interface IElement
getSpecification, toFormatedString, toXmlMethods inherited from interface ISelectingStyle
skipsChildElements, skipsElement
-
Field Details
-
TYPE_NAME
- See Also:
-
EMPTY
-
-
Method Details
-
fromSelectingStyle
-
fromSpecification
- Parameters:
specification-- Returns:
- a new
SelectingStylefrom the given specification. - Throws:
NullPointerException- if the given specification is null.RuntimeException- if the given specification is not valid.
-
selectsChildElements
public boolean selectsChildElements()- Returns:
- true if the current
ISelectingStylewould select the child elements of a givenIStylableElementto style, false otherwise.
-
applyToElement
Applies the currentIBaseStyleto the given element.- Parameters:
element-
-
withAttachingAttributes
-
withSelectorId
- Parameters:
selectorId-- Returns:
- a new
ISelectingStyleWithSelectorsfrom the currentISelectingStyleWithSelectorswith the given selectorId set.
-
withSelectorRoles
- Parameters:
selectorRoles-- Returns:
- a new
ISelectingStyleWithSelectorsfrom the currentISelectingStyleWithSelectorswith the given selectorRoles added.
-
withSelectorTokens
- Parameters:
selectorTokens-- Returns:
- a new
ISelectingStyleWithSelectorsfrom the currentISelectingStyleWithSelectorswith the given selectorTokens added.
-
withSelectorType
- Parameters:
selectorType-- Returns:
- a new
ISelectingStyleWithSelectorsfrom the currentISelectingStyleWithSelectorswith the given selectorType set.
-
withSubStyles
public ISelectingStyleWithSelectors withSubStyles(IContainer<? extends ISelectingStyleWithSelectors> subStyles) -
getAttachingAttributes
- Specified by:
getAttachingAttributesin interfaceIBaseStyle<S extends IBaseStyle<S>>- Returns:
- the attaching attributes of the current
IBaseStyle.
-
getSubStyles
- Specified by:
getSubStylesin interfaceIBaseStyle<S extends IBaseStyle<S>>- Returns:
- the sub styles of the current
IBaseStyle.
-
containsAttachingAttributes
public final boolean containsAttachingAttributes()- Specified by:
containsAttachingAttributesin interfaceIBaseStyle<S extends IBaseStyle<S>>- Returns:
- true if the current
IBaseStylecontains attaching attributes, false otherwise.
-
withAttachingAttributes
- Specified by:
withAttachingAttributesin interfaceIBaseStyle<S extends IBaseStyle<S>>- Parameters:
attachingAttributes-- Returns:
- a new
IStylefrom the currentIStylewith the given attachingAttributes added.
-
withSubStyle
public final ISelectingStyleWithSelectors withSubStyle(ISelectingStyleWithSelectors subStyle, ISelectingStyleWithSelectors... subStyles) - Specified by:
withSubStylein interfaceIBaseStyle<S extends IBaseStyle<S>>- Parameters:
subStyle-subStyles-- Returns:
- a new
IStylefrom the currentIStylewith the given subStyle and subStyles added.
-