Package ch.nolix.system.style.model
Klasse SelectingStyle
java.lang.Object
ch.nolix.system.element.base.AbstractElement
ch.nolix.system.style.model.AbstractSelectingStyle
ch.nolix.system.style.model.SelectingStyle
- Alle implementierten Schnittstellen:
IElement,IAbstractStyle<ISelectingStyleWithSelectors>,ISelectingStyle<ISelectingStyleWithSelectors>,ISelectingStyleWithSelectors
- Version:
- 2023-07-09
- Autor:
- Silvan Wyss
-
Feldübersicht
FelderVon Klasse geerbte Felder ch.nolix.system.style.model.AbstractSelectingStyle
SELECTOR_ID_HEADER, SELECTOR_ROLE_HEADER, SELECTOR_TOKEN_HEADER, SELECTOR_TYPE_HEADER -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCreates a new emptySelectingStyle.SelectingStyle(String optionalSelectorId, String optionalSelectorType, IContainer<String> selectorRoles, IContainer<String> selectorTokens, IContainer<? extends IAttachingAttribute> attachingAttributes, IContainer<? extends ISelectingStyleWithSelectors> subStyles) Creates a newSelectingStyle. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidapplyToElement(IStylableElement<?> element) Applies the currentIAbstractStyleto the given element.static SelectingStylefromSelectingStyle(ISelectingStyleWithSelectors selectingStyle) static SelectingStylefromSpecification(INode<?> specification) final IContainer<? extends IAttachingAttribute> final IContainer<? extends ISelectingStyleWithSelectors> final booleanprotected final voidLets the sub styles of the currentAbstractStylestyle the child element of the given element.booleanprotected final voidsetAttachingAttributesToElement(IStylableElement<?> element) Sets the attaching attributes of the currentAbstractStyleto the given element.withAttachingAttribute(Enum<?> tag, String value) withAttachingAttribute(String attachingAttribute, String... attachingAttributes) withAttachingAttributes(IContainer<? extends IAttachingAttribute> attachingAttributes) withNewAttachingAttributesWhereSelectorType(String selectorType, IContainer<String> newAttachingAttributes) withNewAttachingAttributesWhereSelectorType(String selectorType, String newAttachingAttribute, String... newAttachingAttributes) withReplacedAttachingAttributes(IContainer<IPair<String, String>> attachingAttributeReplacements) withReplacedAttachingAttributes(IPair<String, String> attachingAttributeReplacement, IPair<String, String>... attachingAttributeReplacements) withReplacedTaggedAttachingAttributes(IContainer<IPair<Enum<?>, String>> attachingAttributeReplacements) withReplacedTaggedAttachingAttributes(IPair<Enum<?>, String> attachingAttributeReplacement, IPair<Enum<?>, String>... attachingAttributeReplacements) 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.style.model.AbstractSelectingStyle
containsSelectorRole, containsSelectorRoles, containsSelectorToken, containsSelectorTokens, getAttributes, getSelectorId, getSelectorRoles, getSelectorTokens, getSelectorType, hasSelectorId, hasSelectorId, hasSelectorType, hasSelectorType, hasSelectorType, selectsElement, withSelectorRole, withSelectorRole, withSelectorToken, withSelectorTypeVon Klasse geerbte Methoden ch.nolix.system.element.base.AbstractElement
equals, getSpecification, hashCode, toStringVon Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden ch.nolix.systemapi.style.model.IAbstractStyle
getAttachingAttributes, getSubStyles, hasAttachingAttributes, withAttachingAttribute, withAttachingAttribute, withNewAttachingAttributesWhereSelectorType, withReplacedAttachingAttributes, withReplacedTaggedAttachingAttributes, withSubStyleVon Schnittstelle geerbte Methoden ch.nolix.systemapi.element.base.IElement
getSpecification, toFormatedString, toXmlVon Schnittstelle geerbte Methoden ch.nolix.systemapi.style.model.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 IAttachingAttribute> 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
SelectingStylefrom 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
ISelectingStylewould select the child elements of a givenIStylableElementto style.
-
applyToElement
Applies the currentIAbstractStyleto the given element.- Parameter:
element-
-
withAttachingAttributes
public ISelectingStyleWithSelectors withAttachingAttributes(IContainer<? extends IAttachingAttribute> attachingAttributes) -
withNewAttachingAttributesWhereSelectorType
public ISelectingStyleWithSelectors withNewAttachingAttributesWhereSelectorType(String selectorType, IContainer<String> newAttachingAttributes) - Parameter:
selectorType-newAttachingAttributes-- Gibt zurück:
- a new
IAbstractStylefrom the currentIAbstractStylewhere each of the given newAttachingAttributes was either added or updated the according attachingAttributes where the given selectorType is.
-
withReplacedAttachingAttributes
public ISelectingStyleWithSelectors withReplacedAttachingAttributes(IContainer<IPair<String, String>> attachingAttributeReplacements) -
withReplacedTaggedAttachingAttributes
public ISelectingStyleWithSelectors withReplacedTaggedAttachingAttributes(IContainer<IPair<Enum<?>, String>> attachingAttributeReplacements) -
withSelectorId
- Parameter:
selectorId-- Gibt zurück:
- a new
ISelectingStyleWithSelectorsfrom the currentISelectingStyleWithSelectorswith the given selectorId set.
-
withSelectorRoles
- Parameter:
selectorRoles-- Gibt zurück:
- a new
ISelectingStyleWithSelectorsfrom the currentISelectingStyleWithSelectorswith the given selectorRoles added.
-
withSelectorTokens
- Parameter:
selectorTokens-- Gibt zurück:
- a new
ISelectingStyleWithSelectorsfrom the currentISelectingStyleWithSelectorswith the given selectorTokens added.
-
withSelectorType
- Parameter:
selectorType-- Gibt zurück:
- a new
ISelectingStyleWithSelectorsfrom the currentISelectingStyleWithSelectorswith the given selectorType set.
-
withSubStyles
public ISelectingStyleWithSelectors withSubStyles(IContainer<? extends ISelectingStyleWithSelectors> subStyles) -
getAttachingAttributes
- Angegeben von:
getAttachingAttributesin SchnittstelleIAbstractStyle<S extends IAbstractStyle<S>>- Gibt zurück:
- the attaching attributes of the current
IAbstractStyle.
-
getSubStyles
- Angegeben von:
getSubStylesin SchnittstelleIAbstractStyle<S extends IAbstractStyle<S>>- Gibt zurück:
- the sub styles of the current
IAbstractStyle.
-
hasAttachingAttributes
public final boolean hasAttachingAttributes()- Angegeben von:
hasAttachingAttributesin SchnittstelleIAbstractStyle<S extends IAbstractStyle<S>>- Gibt zurück:
- true if the current
IAbstractStylehas attaching attributes, false otherwise.
-
withAttachingAttribute
- Angegeben von:
withAttachingAttributein SchnittstelleIAbstractStyle<S extends IAbstractStyle<S>>- Parameter:
tag-value-- Gibt zurück:
- a new
IStylefrom the currentIStylewith an attaching attribute added that has the given tag and value.
-
withAttachingAttribute
public final ISelectingStyleWithSelectors withAttachingAttribute(String attachingAttribute, String... attachingAttributes) - Angegeben von:
withAttachingAttributein SchnittstelleIAbstractStyle<S extends IAbstractStyle<S>>- Parameter:
attachingAttribute-attachingAttributes-- Gibt zurück:
- a new
IStylefrom the currentIStylewith the given attachingAttribute and attachingAttributes added.
-
withNewAttachingAttributesWhereSelectorType
public final ISelectingStyleWithSelectors withNewAttachingAttributesWhereSelectorType(String selectorType, String newAttachingAttribute, String... newAttachingAttributes) - Angegeben von:
withNewAttachingAttributesWhereSelectorTypein SchnittstelleIAbstractStyle<S extends IAbstractStyle<S>>- Parameter:
selectorType-newAttachingAttribute-newAttachingAttributes-- Gibt zurück:
- a new
IAbstractStylefrom the currentIAbstractStylewhere the newAttachingAttribute and each of the given newAttachingAttributes either was added or updated the according attachingAttributes where the given selectorType is.
-
withReplacedAttachingAttributes
public final ISelectingStyleWithSelectors withReplacedAttachingAttributes(IPair<String, String> attachingAttributeReplacement, IPair<String, String>... attachingAttributeReplacements) - Angegeben von:
withReplacedAttachingAttributesin SchnittstelleIAbstractStyle<S extends IAbstractStyle<S>>- Parameter:
attachingAttributeReplacement-attachingAttributeReplacements-- Gibt zurück:
- a new
IStylefrom the currentIStylewhere the given attributeAttributeReplacement and attachingAttributeReplacements replaced all the according attachingAttributes.
-
withReplacedTaggedAttachingAttributes
public final ISelectingStyleWithSelectors withReplacedTaggedAttachingAttributes(IPair<Enum<?>, String> attachingAttributeReplacement, IPair<Enum<?>, String>... attachingAttributeReplacements) - Angegeben von:
withReplacedTaggedAttachingAttributesin SchnittstelleIAbstractStyle<S extends IAbstractStyle<S>>- Parameter:
attachingAttributeReplacement-attachingAttributeReplacements-- Gibt zurück:
- a new
IStylefrom the currentIStylewhere the given attributeAttributeReplacement and attachingAttributeReplacements replaced all the according attachingAttributes.
-
withSubStyle
public final ISelectingStyleWithSelectors withSubStyle(ISelectingStyleWithSelectors subStyle, ISelectingStyleWithSelectors... subStyles) - Angegeben von:
withSubStylein SchnittstelleIAbstractStyle<S extends IAbstractStyle<S>>- Parameter:
subStyle-subStyles-- Gibt zurück:
- a new
IStylefrom the currentIStylewith the given subStyle and subStyles added.
-
setAttachingAttributesToElement
Sets the attaching attributes of the currentAbstractStyleto the given element.- Parameter:
element-- Löst aus:
InvalidArgumentException- if an attaching attribute of the currentAbstractStyleis not valid for the given element.
-
letSubStylesStyleChildElementsOfElement
Lets the sub styles of the currentAbstractStylestyle the child element of the given element.- Parameter:
element-
-