Class AbstractStylableElement<E extends StylableElement<E>>
java.lang.Object
ch.nolix.system.element.mutableelement.AbstractMutableElementWithProperties
ch.nolix.system.style.stylable.AbstractStylableElement<E>
- Type Parameters:
E- the type of aAbstractStylableElement.
- All Implemented Interfaces:
FluentMutableMultiTokenHolder<E>, FluentMutableOptionalIdHolder<E>, MultiTokenHolder, OptionalIdHolder, Resettable, TypeRequestable, AttributesRepresentable, Element, SpecificationRepresentable, MutableElement, StylableElement<E>
- Direct Known Subclasses:
AbstractControl, AbstractStyleElement, Layer
public abstract class AbstractStylableElement<E extends StylableElement<E>>
extends AbstractMutableElementWithProperties
implements StylableElement<E>
- Author:
- Silvan Wyss
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal EAdds the given token to the currentFluentMutableMultiTokenHolderif the currentFluentMutableMultiTokenHolderdoes not contain already the given token.final StringgetId()final ExtendedIterable<String> final booleanhasId()final voidremoveId()Removes the id of the currentFluentMutableOptionalIdHolder.final voidremoveToken(String token) Removes the given token from the currentFluentMutableMultiTokenHolderif the currentFluentMutableMultiTokenHoldercontains the given token.final voidRemoves all tokens from the currentFluentMutableMultiTokenHolder.final voidreset()Resets the currentResettable.final voidResets the style of the currentStylableElementand the style of the childStylableElements of the currentStylableElement.final ESets the id of the currentFluentMutableOptionalIdHolder.Methods inherited from class AbstractMutableElementWithProperties
addOrChangeAttribute, addOrChangeAttribute, equals, getAttributes, getSpecification, hashCode, toStringMethods inherited from interface AttributesRepresentable
getAttributesMethods inherited from interface MutableElement
addOrChangeAttribute, addOrChangeAttribute, addOrChangeAttributes, resetFromAttributes, resetFromSpecificationMethods inherited from interface OptionalIdHolder
getIdInSingleQuotes, hasIdMethods inherited from interface SpecificationRepresentable
getSpecification, hasEqualSpecificationAsElement, toFormatedStringMethods inherited from interface StylableElement
getStoredChildStylableElements, hasRoleMethods inherited from interface TypeRequestable
getType, isOfConcreteType, isOfConcreteType, isOfType, isOfType
-
Constructor Details
-
AbstractStylableElement
public AbstractStylableElement()
-
-
Method Details
-
addToken
Description copied from interface:FluentMutableMultiTokenHolderAdds the given token to the currentFluentMutableMultiTokenHolderif the currentFluentMutableMultiTokenHolderdoes not contain already the given token.- Specified by:
addTokenin interfaceFluentMutableMultiTokenHolder<E extends StylableElement<E>>- Parameters:
token-- Returns:
- the current
FluentMutableMultiTokenHolder
-
getId
- Specified by:
getIdin interfaceOptionalIdHolder- Returns:
- the id of the current
OptionalIdHolder
-
getTokens
- Specified by:
getTokensin interfaceMultiTokenHolder- Returns:
- the tokens of the current
MultiTokenHolder
-
hasId
public final boolean hasId()- Specified by:
hasIdin interfaceOptionalIdHolder- Returns:
- true if the current
OptionalIdHolderhas an id, false otherwise
-
removeId
public final void removeId()Removes the id of the currentFluentMutableOptionalIdHolder.- Specified by:
removeIdin interfaceFluentMutableOptionalIdHolder<E extends StylableElement<E>>
-
removeToken
Removes the given token from the currentFluentMutableMultiTokenHolderif the currentFluentMutableMultiTokenHoldercontains the given token.- Specified by:
removeTokenin interfaceFluentMutableMultiTokenHolder<E extends StylableElement<E>>- Parameters:
token-
-
removeTokens
public final void removeTokens()Removes all tokens from the currentFluentMutableMultiTokenHolder.- Specified by:
removeTokensin interfaceFluentMutableMultiTokenHolder<E extends StylableElement<E>>
-
reset
public final void reset()Resets the currentResettable.- Specified by:
resetin interfaceResettable
-
resetStyleRecursively
public final void resetStyleRecursively()Resets the style of the currentStylableElementand the style of the childStylableElements of the currentStylableElement.- Specified by:
resetStyleRecursivelyin interfaceStylableElement<E extends StylableElement<E>>
-
setId
Sets the id of the currentFluentMutableOptionalIdHolder.- Specified by:
setIdin interfaceFluentMutableOptionalIdHolder<E extends StylableElement<E>>- Parameters:
id-- Returns:
- the current
FluentMutableOptionalIdHolder
-