Package ch.nolix.system.element.style
Klasse Style
java.lang.Object
ch.nolix.system.element.base.Element
ch.nolix.system.element.style.Style
- Alle implementierten Schnittstellen:
IElement
,IBaseStyle<IStyle>
,IStyle
- Version:
- 2016-02-01
- Autor:
- Silvan Wyss
-
Feldübersicht
-
Konstruktorübersicht
KonstruktorBeschreibungStyle()
Creates a new emptyStyle
.Style
(IContainer<? extends INode<?>> attachingAttributes, IContainer<? extends ISelectingStyleWithSelectors> subStyles) Creates a newStyle
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
applyToElement
(IStylableElement<?> element) Applies the currentIBaseStyle
to the given element.static Style
static Style
fromSpecification
(INode<?> specification) final IContainer
<? extends INode<?>> IContainer
<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.protected final void
setAttachingAttributesToElement
(IStylableElement<?> element) Sets the attaching attributes of the currentBaseStyle
to the given element.final IStyle
withAttachingAttribute
(String attachingAttribute, String... attachingAttributes) withAttachingAttributes
(IContainer<String> attachingAttributes) final IStyle
withSubStyle
(ISelectingStyleWithSelectors subStyle, ISelectingStyleWithSelectors... subStyles) withSubStyles
(IContainer<? extends ISelectingStyleWithSelectors> subStyles) 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
-
Felddetails
-
ATTACHING_ATTRIBUTE_HEADER
- Siehe auch:
-
-
Konstruktordetails
-
Style
public Style()Creates a new emptyStyle
. -
Style
public Style(IContainer<? extends INode<?>> 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
Style
from the given specification. - Löst aus:
InvalidArgumentException
- if the given specification is not valid.
-
getAttributes
- Angegeben von:
getAttributes
in SchnittstelleIElement
- Gibt zurück:
- the attributes of the current
IElement
.
-
applyToElement
Applies the currentIBaseStyle
to the given element.- Angegeben von:
applyToElement
in SchnittstelleIBaseStyle<IStyle>
- Parameter:
element
-
-
withAttachingAttributes
- Angegeben von:
withAttachingAttributes
in SchnittstelleIBaseStyle<IStyle>
- Parameter:
attachingAttributes
-- Gibt zurück:
- a new
IStyle
from the currentIStyle
with the given attachingAttributes added.
-
withSubStyles
- Angegeben von:
withSubStyles
in SchnittstelleIBaseStyle<IStyle>
- Parameter:
subStyles
-- Gibt zurück:
- a new
IStyle
from the currentIStyle
with the given subStyles added.
-
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 IStyle 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 IStyle 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
-
-