Package ch.nolix.system.element.style
Klasse SelectingStyle
java.lang.Object
ch.nolix.system.element.base.Element
ch.nolix.system.element.style.BaseSelectingStyle
ch.nolix.system.element.style.SelectingStyle
- Alle implementierten Schnittstellen:
IElement
,IBaseStyle<ISelectingStyleWithSelectors>
,ISelectingStyle<ISelectingStyleWithSelectors>
,ISelectingStyleWithSelectors
- Version:
- 2023-07-09
- Autor:
- Silvan Wyss
-
Feldübersicht
Von Klasse geerbte Felder ch.nolix.system.element.style.BaseSelectingStyle
SELECTOR_ID_HEADER, SELECTOR_ROLE_HEADER, SELECTOR_TOKEN_HEADER, SELECTOR_TYPE_HEADER
-
Konstruktorübersicht
KonstruktorBeschreibungCreates a new emptySelectingStyle
.SelectingStyle
(String optionalSelectorId, String optionalSelectorType, IContainer<String> selectorRoles, IContainer<String> selectorTokens, IContainer<? extends INode<?>> attachingAttributes, IContainer<? extends ISelectingStyleWithSelectors> subStyles) Creates a newSelectingStyle
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
applyToElement
(IStylableElement<?> element) Applies the currentIBaseStyle
to the given element.static SelectingStyle
fromSelectingStyle
(ISelectingStyleWithSelectors selectingStyle) static SelectingStyle
fromSpecification
(INode<?> specification) final IContainer
<? extends INode<?>> final IContainer
<? extends ISelectingStyleWithSelectors> final boolean
protected final void
Lets the sub styles of the currentBaseStyle
style the child element of the given element.boolean
protected final void
setAttachingAttributesToElement
(IStylableElement<?> element) Sets the attaching attributes of the currentBaseStyle
to the given element.withAttachingAttribute
(String attachingAttribute, String... attachingAttributes) withAttachingAttributes
(IContainer<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) Von Klasse geerbte Methoden ch.nolix.system.element.style.BaseSelectingStyle
containsSelectorRole, containsSelectorRoles, containsSelectorToken, containsSelectorTokens, getAttributes, getSelectorId, getSelectorRoles, getSelectorTokens, getSelectorType, hasSelectorId, hasSelectorId, hasSelectorType, hasSelectorType, selectsElement, withSelectorRole, withSelectorRole, withSelectorToken, withSelectorType
Von Klasse geerbte Methoden ch.nolix.system.element.base.Element
equals, getSpecification, hashCode, toString
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.nolix.systemapi.elementapi.styleapi.IBaseStyle
getAttachingAttributes, getSubStyles, withAttachingAttribute, withSubStyle
Von Schnittstelle geerbte Methoden ch.nolix.systemapi.elementapi.baseapi.IElement
getSpecification, toFormatedString, toXml
Von Schnittstelle geerbte Methoden ch.nolix.systemapi.elementapi.styleapi.ISelectingStyle
skipsChildElements, skipsElement
-
Felddetails
-
TYPE_NAME
- Siehe auch:
-
ATTACHING_ATTRIBUTE_HEADER
- Siehe auch:
-
-
Konstruktordetails
-
SelectingStyle
public SelectingStyle()Creates a new emptySelectingStyle
. -
SelectingStyle
public SelectingStyle(String optionalSelectorId, String optionalSelectorType, IContainer<String> selectorRoles, IContainer<String> selectorTokens, IContainer<? extends INode<?>> attachingAttributes, IContainer<? extends ISelectingStyleWithSelectors> subStyles) Creates a newSelectingStyle
.- Parameter:
optionalSelectorId
-optionalSelectorType
-selectorRoles
-selectorTokens
-attachingAttributes
-subStyles
-
-
-
Methodendetails
-
fromSelectingStyle
-
fromSpecification
- Parameter:
specification
-- Gibt zurück:
- a new
SelectingStyle
from the given specification. - Löst aus:
NullPointerException
- if the given specification is null.InvalidArgumentException
- if the given specification is not valid.
-
selectsChildElements
public boolean selectsChildElements()- Gibt zurück:
- true if the current
ISelectingStyle
would select the child elements of a givenIStylableElement
to style.
-
applyToElement
Applies the currentIBaseStyle
to the given element.- Parameter:
element
-
-
withAttachingAttributes
-
withSelectorId
- Parameter:
selectorId
-- Gibt zurück:
- a new
ISelectingStyleWithSelectors
from the currentISelectingStyleWithSelectors
with the given selectorId set.
-
withSelectorRoles
- Parameter:
selectorRoles
-- Gibt zurück:
- a new
ISelectingStyleWithSelectors
from the currentISelectingStyleWithSelectors
with the given selectorRoles added.
-
withSelectorTokens
- Parameter:
selectorTokens
-- Gibt zurück:
- a new
ISelectingStyleWithSelectors
from the currentISelectingStyleWithSelectors
with the given selectorTokens added.
-
withSelectorType
- Parameter:
selectorType
-- Gibt zurück:
- a new
ISelectingStyleWithSelectors
from the currentISelectingStyleWithSelectors
with the given selectorType set.
-
withSubStyles
public ISelectingStyleWithSelectors withSubStyles(IContainer<? extends ISelectingStyleWithSelectors> subStyles) -
getAttachingAttributes
- Angegeben von:
getAttachingAttributes
in SchnittstelleIBaseStyle<S extends IBaseStyle<S>>
- Gibt zurück:
- the attaching attributes of the current
IBaseStyle
.
-
getSubStyles
- Angegeben von:
getSubStyles
in SchnittstelleIBaseStyle<S extends IBaseStyle<S>>
- Gibt zurück:
- the sub styles of the current
IBaseStyle
.
-
hasAttachingAttributes
public final boolean hasAttachingAttributes()- Gibt zurück:
- true if the current
BaseStyle
has attaching attributes.
-
withAttachingAttribute
public final ISelectingStyleWithSelectors withAttachingAttribute(String attachingAttribute, String... attachingAttributes) - Angegeben von:
withAttachingAttribute
in SchnittstelleIBaseStyle<S extends IBaseStyle<S>>
- Parameter:
attachingAttribute
-attachingAttributes
-- Gibt zurück:
- a new
IStyle
from the currentIStyle
with the given attachingAttribute and attachingAttributes added.
-
withSubStyle
public final ISelectingStyleWithSelectors withSubStyle(ISelectingStyleWithSelectors subStyle, ISelectingStyleWithSelectors... subStyles) - Angegeben von:
withSubStyle
in SchnittstelleIBaseStyle<S extends IBaseStyle<S>>
- Parameter:
subStyle
-subStyles
-- Gibt zurück:
- a new
IStyle
from the currentIStyle
with the given subStyle and subStyles added.
-
setAttachingAttributesToElement
Sets the attaching attributes of the currentBaseStyle
to the given element.- Parameter:
element
-- Löst aus:
InvalidArgumentException
- if an attaching attribute of the currentBaseStyle
is not valid for the given element.
-
letSubStylesStyleChildElementsOfElement
Lets the sub styles of the currentBaseStyle
style the child element of the given element.- Parameter:
element
-
-