Klasse Style
java.lang.Object
ch.nolix.system.element.base.AbstractElement
ch.nolix.system.style.model.Style
- Alle implementierten Schnittstellen:
IElement, IBaseStyle<IStyle>, IStyle
- Autor:
- Silvan Wyss
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungStyle()Creates a new emptyStyle.Style(IContainer<String> attachingAttributes, IContainer<? extends ISelectingStyleWithSelectors> subStyles) Creates a newStyle. -
Methodenübersicht
Modifikator und TypMethodeBeschreibungvoidapplyToElement(IStylableElement<?> element) Applies the currentIBaseStyleto the given element.final booleanstatic Stylestatic StylefromSpecification(INode<?> specification) final IContainer<String> IContainer<INode<?>> final IContainer<? extends ISelectingStyleWithSelectors> protected 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.withAttachingAttributes(IContainer<String> attachingAttributes) final IStylewithAttachingAttributes(String... attachingAttributes) final IStylewithSubStyle(ISelectingStyleWithSelectors subStyle, ISelectingStyleWithSelectors... subStyles) withSubStyles(IContainer<? extends ISelectingStyleWithSelectors> subStyles) Von Klasse geerbte Methoden AbstractElement
equals, getSpecification, hashCode, toStringVon Schnittstelle geerbte Methoden IBaseStyle
containsAttachingAttributes, getAttachingAttributes, getSubStyles, withAttachingAttributes, withSubStyleVon Schnittstelle geerbte Methoden IElement
getSpecification, toFormatedString, toXml
-
Felddetails
-
ATTACHING_ATTRIBUTE_HEADER
- Siehe auch:
-
-
Konstruktordetails
-
Style
public Style()Creates a new emptyStyle. -
Style
public Style(IContainer<String> 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 currentIBaseStyleto the given element.- Angegeben von:
applyToElementin SchnittstelleIBaseStyle<IStyle>- Parameter:
element-
-
withAttachingAttributes
- Angegeben von:
withAttachingAttributesin SchnittstelleIBaseStyle<IStyle>- Parameter:
attachingAttributes-- Gibt zurück:
- a new
IStylefrom the currentIStylewith the given attachingAttributes added.
-
withStyle
-
withSubStyles
- Angegeben von:
withSubStylesin SchnittstelleIBaseStyle<IStyle>- Parameter:
subStyles-- Gibt zurück:
- a new
IStylefrom the currentIStylewith the given subStyles added.
-
getAttachingAttributes
- Angegeben von:
getAttachingAttributesin SchnittstelleIBaseStyle<S extends IBaseStyle<S>>- Gibt zurück:
- the attaching attributes of the current
IBaseStyle.
-
getSubStyles
- Angegeben von:
getSubStylesin SchnittstelleIBaseStyle<S extends IBaseStyle<S>>- Gibt zurück:
- the sub styles of the current
IBaseStyle.
-
containsAttachingAttributes
public final boolean containsAttachingAttributes()- Angegeben von:
containsAttachingAttributesin SchnittstelleIBaseStyle<S extends IBaseStyle<S>>- Gibt zurück:
- true if the current
IBaseStylecontains attaching attributes, false otherwise.
-
withAttachingAttributes
- Angegeben von:
withAttachingAttributesin SchnittstelleIBaseStyle<S extends IBaseStyle<S>>- Parameter:
attachingAttributes-- Gibt zurück:
- a new
IStylefrom the currentIStylewith the given attachingAttributes added.
-
withSubStyle
public final IStyle withSubStyle(ISelectingStyleWithSelectors subStyle, ISelectingStyleWithSelectors... subStyles) - Angegeben von:
withSubStylein SchnittstelleIBaseStyle<S extends IBaseStyle<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-
-