Package ch.nolix.system.style.model
Klasse Style
java.lang.Object
ch.nolix.system.element.base.AbstractElement
ch.nolix.system.style.model.Style
- Alle implementierten Schnittstellen:
IElement,IAbstractStyle<IStyle>,IStyle
- Version:
- 2016-02-01
- Autor:
- Silvan Wyss
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungStyle()Creates a new emptyStyle.Style(IContainer<? extends IAttachingAttribute> attachingAttributes, IContainer<? extends ISelectingStyleWithSelectors> subStyles) Creates a newStyle. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidapplyToElement(IStylableElement<?> element) Applies the currentIAbstractStyleto the given element.static Stylestatic StylefromSpecification(INode<?> specification) final IContainer<? extends IAttachingAttribute> IContainer<INode<?>> final IContainer<? extends ISelectingStyleWithSelectors> final booleanprotected final voidLets the sub styles of the currentAbstractStylestyle the child element of the given element.protected final voidsetAttachingAttributesToElement(IStylableElement<?> element) Sets the attaching attributes of the currentAbstractStyleto the given element.final IStylewithAttachingAttribute(Enum<?> tag, String value) final IStylewithAttachingAttribute(String attachingAttribute, String... attachingAttributes) withAttachingAttributes(IContainer<? extends IAttachingAttribute> attachingAttributes) withNewAttachingAttributesWhereSelectorType(String selectorType, IContainer<String> newAttachingAttributes) final IStylewithNewAttachingAttributesWhereSelectorType(String selectorType, String newAttachingAttribute, String... newAttachingAttributes) withReplacedAttachingAttributes(IContainer<IPair<String, String>> attachingAttributeReplacements) final IStylewithReplacedAttachingAttributes(IPair<String, String> attachingAttributeReplacement, IPair<String, String>... attachingAttributeReplacements) withReplacedTaggedAttachingAttributes(IContainer<IPair<Enum<?>, String>> attachingAttributeReplacements) final IStylewithReplacedTaggedAttachingAttributes(IPair<Enum<?>, String> attachingAttributeReplacement, IPair<Enum<?>, String>... attachingAttributeReplacements) final IStylewithSubStyle(ISelectingStyleWithSelectors subStyle, ISelectingStyleWithSelectors... subStyles) withSubStyles(IContainer<? extends ISelectingStyleWithSelectors> subStyles) Von 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, toXml
-
Felddetails
-
ATTACHING_ATTRIBUTE_HEADER
- Siehe auch:
-
-
Konstruktordetails
-
Style
public Style()Creates a new emptyStyle. -
Style
public Style(IContainer<? extends IAttachingAttribute> attachingAttributes, IContainer<? extends ISelectingStyleWithSelectors> subStyles) Creates a newStyle.- Parameter:
attachingAttributes-subStyles-
-
-
Methodendetails
-
fromFile
- Parameter:
filePath-- Gibt zurück:
- a new standard specification from the file with the given file path.
- Löst aus:
InvalidArgumentException- if the given file path is not valid.InvalidArgumentException- if the file with the given file path does not represent a standard configuration.
-
fromSpecification
- Parameter:
specification-- Gibt zurück:
- a new
Stylefrom the given specification. - Löst aus:
InvalidArgumentException- if the given specification is not valid.
-
getAttributes
- Angegeben von:
getAttributesin SchnittstelleIElement- Gibt zurück:
- the attributes of the current
IElement.
-
applyToElement
Applies the currentIAbstractStyleto the given element.- Angegeben von:
applyToElementin SchnittstelleIAbstractStyle<IStyle>- Parameter:
element-
-
withAttachingAttributes
public IStyle withAttachingAttributes(IContainer<? extends IAttachingAttribute> attachingAttributes) - Angegeben von:
withAttachingAttributesin SchnittstelleIAbstractStyle<IStyle>- Parameter:
attachingAttributes-- Gibt zurück:
- a new
IStylefrom the currentIStylewith the given attachingAttributes added.
-
withNewAttachingAttributesWhereSelectorType
public IStyle withNewAttachingAttributesWhereSelectorType(String selectorType, IContainer<String> newAttachingAttributes) - Angegeben von:
withNewAttachingAttributesWhereSelectorTypein SchnittstelleIAbstractStyle<IStyle>- 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 IStyle withReplacedAttachingAttributes(IContainer<IPair<String, String>> attachingAttributeReplacements) - Angegeben von:
withReplacedAttachingAttributesin SchnittstelleIAbstractStyle<IStyle>- Parameter:
attachingAttributeReplacements-- Gibt zurück:
- a new
IStylefrom the currentIStylewhere the given attachingAttributeReplacements replaced all the according attaching attributes.
-
withReplacedTaggedAttachingAttributes
public IStyle withReplacedTaggedAttachingAttributes(IContainer<IPair<Enum<?>, String>> attachingAttributeReplacements) - Angegeben von:
withReplacedTaggedAttachingAttributesin SchnittstelleIAbstractStyle<IStyle>- Parameter:
attachingAttributeReplacements-- Gibt zurück:
- a new
IStylefrom the currentIStylewhere the given attachingAttributeReplacements replaced all the according attaching attributes.
-
withStyle
-
withSubStyles
- Angegeben von:
withSubStylesin SchnittstelleIAbstractStyle<IStyle>- Parameter:
subStyles-- Gibt zurück:
- a new
IStylefrom the currentIStylewith the given subStyles added.
-
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 IStyle 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 IStyle 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 IStyle 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 IStyle 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 IStyle 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-
-