Class Layer
- All Implemented Interfaces:
FluentMutableMultiTokenHolder<ILayer>, FluentMutableOptionalIdHolder<ILayer>, MultiTokenHolder, OptionalIdHolder, Clearable, Resettable, EmptinessRequestable, GuiComponent<IWebGui<?>>, TypeRequestable, AttributesRepresentable, Element, SpecificationRepresentable, MutableElement, BackgroundManager<ILayer>, StylableElement<ILayer>, HtmlGetter, ILayer, RootControlManager<ILayer>
- Author:
- Silvan Wyss
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IColorstatic final ContentAlignmentstatic final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclear()Removes the elements of the currentClearable.booleancontainsControl(Control<?, ?> control) static LayerfromSpecification(Node<?> specification) getHtml()doublegetOptionalStoredControlByInternalId(String internalId) getRole()ExtendedIterable<? extends StylableElement<?>> ExtendedIterable<Control<?, ?>> IWebGui<?> Control<?, ?> ExtendedIterable<Control<?, ?>> booleanbooleanhasInternalId(String internalId) booleanhasRole()booleanvoidinternalSetParentGui(IWebGui<?> parentGui) booleanisEmpty()voidvoidvoidsetBackground(IBackground background) setBackgroundColor(IColor backgroundColor) setBackgroundColorGradient(IColorGradient backgroundColorGradient) setBackgroundImage(Image backgroundImage) setBackgroundImage(Image backgroundImage, ImageApplication imageApplication) setContentAlignment(ContentAlignment contentAlignment) setOpacity(double opacity) setRootControl(Control<?, ?> rootControl) Methods inherited from class AbstractStylableElement
addToken, getId, getTokens, hasId, removeId, removeToken, removeTokens, reset, resetStyleRecursively, setIdMethods inherited from class AbstractMutableElementWithProperties
addOrChangeAttribute, addOrChangeAttribute, equals, getAttributes, getSpecification, hashCode, toStringMethods inherited from interface AttributesRepresentable
getAttributesMethods inherited from interface EmptinessRequestable
containsAnyMethods inherited from interface FluentMutableMultiTokenHolder
addToken, removeToken, removeTokensMethods inherited from interface FluentMutableOptionalIdHolder
removeId, setIdMethods inherited from interface MultiTokenHolder
getTokensMethods inherited from interface MutableElement
addOrChangeAttribute, addOrChangeAttribute, addOrChangeAttributes, resetFromAttributes, resetFromSpecificationMethods inherited from interface OptionalIdHolder
getId, getIdInSingleQuotes, hasId, hasIdMethods inherited from interface Resettable
resetMethods inherited from interface SpecificationRepresentable
getSpecification, hasEqualSpecificationAsElement, toFormatedStringMethods inherited from interface StylableElement
resetStyleRecursivelyMethods inherited from interface TypeRequestable
getType, isOfConcreteType, isOfConcreteType, isOfType, isOfType
-
Field Details
-
DEFAULT_OPACITY
public static final double DEFAULT_OPACITY- See Also:
-
DEFAULT_BACKGROUND_COLOR
-
DEFAULT_CONTENT_POSITION
-
-
Constructor Details
-
Layer
public Layer()
-
-
Method Details
-
fromSpecification
-
belongsToGui
public boolean belongsToGui()- Specified by:
belongsToGuiin interfaceGuiComponent<IWebGui<?>>- Returns:
- true if the current
GuiComponentbelongs to a GUI, false otherwise
-
containsControl
- Specified by:
containsControlin interfaceILayer
-
clear
-
getBackground
- Specified by:
getBackgroundin interfaceBackgroundManager<ILayer>
-
getBackgroundColor
- Specified by:
getBackgroundColorin interfaceBackgroundManager<ILayer>
-
getBackgroundColorGradient
- Specified by:
getBackgroundColorGradientin interfaceBackgroundManager<ILayer>
-
getBackgroundImage
- Specified by:
getBackgroundImagein interfaceBackgroundManager<ILayer>
-
getBackgroundImageApplication
- Specified by:
getBackgroundImageApplicationin interfaceBackgroundManager<ILayer>
-
getBackgroundType
- Specified by:
getBackgroundTypein interfaceBackgroundManager<ILayer>
-
getContentAlignment
- Specified by:
getContentAlignmentin interfaceILayer
-
getCssRule
- Specified by:
getCssRulein interfaceILayer
-
getHtml
- Specified by:
getHtmlin interfaceHtmlGetter
-
getInternalId
- Specified by:
getInternalIdin interfaceILayer
-
getOpacity
public double getOpacity()- Specified by:
getOpacityin interfaceILayer
-
getOptionalStoredControlByInternalId
- Specified by:
getOptionalStoredControlByInternalIdin interfaceRootControlManager<ILayer>
-
getStoredControls
- Specified by:
getStoredControlsin interfaceRootControlManager<ILayer>
-
getStoredParentGui
- Specified by:
getStoredParentGuiin interfaceGuiComponent<IWebGui<?>>- Returns:
- the GUI of the current
GuiComponent
-
getStoredRootControl
- Specified by:
getStoredRootControlin interfaceRootControlManager<ILayer>
-
getStoredStructureControls
- Specified by:
getStoredStructureControlsin interfaceILayer
-
getRole
-
getStoredChildStylableElements
- Specified by:
getStoredChildStylableElementsin interfaceStylableElement<ILayer>- Returns:
- the child
StylableElements of the currentStylableElement.
-
hasBackground
public boolean hasBackground()- Specified by:
hasBackgroundin interfaceBackgroundManager<ILayer>
-
hasInternalId
- Specified by:
hasInternalIdin interfaceILayer
-
hasRole
-
hasRole
- Specified by:
hasRolein interfaceStylableElement<ILayer>- Parameters:
role-- Returns:
- true if the current
StylableElementhas the given role, false otherwise
-
internalSetParentGui
- Specified by:
internalSetParentGuiin interfaceILayer
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceEmptinessRequestable- Returns:
- true if
EmptinessRequestabledoes not contain an element, false otherwise
-
removeBackground
public void removeBackground()- Specified by:
removeBackgroundin interfaceBackgroundManager<ILayer>
-
removeRole
public void removeRole() -
removeSelfFromGui
public void removeSelfFromGui()- Specified by:
removeSelfFromGuiin interfaceILayer
-
setBackground
-
setBackgroundColor
- Specified by:
setBackgroundColorin interfaceBackgroundManager<ILayer>
-
setBackgroundColorGradient
- Specified by:
setBackgroundColorGradientin interfaceBackgroundManager<ILayer>
-
setBackgroundImage
- Specified by:
setBackgroundImagein interfaceBackgroundManager<ILayer>
-
setBackgroundImage
- Specified by:
setBackgroundImagein interfaceBackgroundManager<ILayer>
-
setRootControl
- Specified by:
setRootControlin interfaceRootControlManager<ILayer>
-
setContentAlignment
- Specified by:
setContentAlignmentin interfaceILayer
-
setOpacity
- Specified by:
setOpacityin interfaceILayer
-
setRole
-