Class Layer
- All Implemented Interfaces:
IFluentMutableMultiTokenHolder<Layer>, IFluentMutableOptionalIdHolder<Layer>, IMultiTokenHolder, IOptionalIdHolder, IGuiComponent<IWebGui<?>>, TypeRequestable, Clearable, Resettable, EmptinessRequestable, IHtmlGetter, IElement, IStructureElement, IMutableElement, IBackgroundHolder<Layer>, IStylableElement<Layer>, ILayer<Layer>, IRootControlOwner<Layer>
- 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(IControl<?, ?> control) static LayerfromSpecification(INode<?> specification) getHtml()doublegetOptionalStoredControlByInternalId(String internalId) getRole()IContainer<? extends IStylableElement<?>> IContainer<IControl<?, ?>> IWebGui<?> IControl<?, ?> booleanbooleanhasInternalId(String internalId) booleanhasRole()booleanvoidinternalSetParentGui(IWebGui<?> parentGui) booleanisEmpty()voidvoidvoidsetBackground(IBackground background) setBackgroundColor(IColor backgroundColor) setBackgroundColorGradient(IColorGradient backgroundColorGradient) setBackgroundImage(IImage backgroundImage) setBackgroundImage(IImage backgroundImage, ImageApplication imageApplication) setContentAlignment(ContentAlignment contentAlignment) setOpacity(double opacity) setRootControl(IControl<?, ?> rootControl) Methods inherited from class AbstractStylableElement
addToken, getChildStructureElements, getId, getTokens, hasId, removeId, removeToken, removeTokens, reset, resetStyleRecursively, setIdMethods inherited from class AbstractMutableElement
addOrChangeAttribute, addOrChangeAttribute, equals, getAttributes, getSpecification, hashCode, resetFromFileWithFilePath, toStringMethods inherited from interface EmptinessRequestable
containsAnyMethods inherited from interface IElement
getAttributes, getSpecification, toFormatedString, toXmlMethods inherited from interface IFluentMutableMultiTokenHolder
addToken, removeToken, removeTokensMethods inherited from interface IFluentMutableOptionalIdHolder
removeId, setIdMethods inherited from interface IMultiTokenHolder
getTokensMethods inherited from interface IMutableElement
addOrChangeAttribute, addOrChangeAttribute, addOrChangeAttributes, addOrChangeAttributes, addOrChangeAttributes, resetFromAttributes, resetFromSpecificationMethods inherited from interface IOptionalIdHolder
getId, getIdInQuotes, hasId, hasIdMethods inherited from interface IStructureElement
getChildStructureElementsMethods inherited from interface IStylableElement
resetStyleRecursivelyMethods inherited from interface Resettable
resetMethods 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 interfaceIGuiComponent<IWebGui<?>>- Returns:
- true if the current
IGuiComponentbelongs to a GUI, false otherwise.
-
containsControl
- Specified by:
containsControlin interfaceILayer<Layer>
-
clear
-
getBackground
- Specified by:
getBackgroundin interfaceIBackgroundHolder<Layer>
-
getBackgroundColor
- Specified by:
getBackgroundColorin interfaceIBackgroundHolder<Layer>
-
getBackgroundColorGradient
- Specified by:
getBackgroundColorGradientin interfaceIBackgroundHolder<Layer>
-
getBackgroundImage
- Specified by:
getBackgroundImagein interfaceIBackgroundHolder<Layer>
-
getBackgroundImageApplication
- Specified by:
getBackgroundImageApplicationin interfaceIBackgroundHolder<Layer>
-
getBackgroundType
- Specified by:
getBackgroundTypein interfaceIBackgroundHolder<Layer>
-
getContentAlignment
- Specified by:
getContentAlignmentin interfaceILayer<Layer>
-
getCssRule
- Specified by:
getCssRulein interfaceILayer<Layer>
-
getHtml
- Specified by:
getHtmlin interfaceIHtmlGetter
-
getInternalId
- Specified by:
getInternalIdin interfaceILayer<Layer>
-
getOpacity
public double getOpacity()- Specified by:
getOpacityin interfaceILayer<Layer>
-
getOptionalStoredControlByInternalId
- Specified by:
getOptionalStoredControlByInternalIdin interfaceIRootControlOwner<Layer>
-
getStoredControls
- Specified by:
getStoredControlsin interfaceIRootControlOwner<Layer>
-
getStoredParentGui
- Specified by:
getStoredParentGuiin interfaceIGuiComponent<IWebGui<?>>- Returns:
- the GUI of the current
IGuiComponent.
-
getStoredRootControl
- Specified by:
getStoredRootControlin interfaceIRootControlOwner<Layer>
-
getRole
-
getStoredChildStylableElements
- Specified by:
getStoredChildStylableElementsin interfaceIStylableElement<Layer>- Returns:
- the child
IStylableElements of the currentIStylableElement.
-
hasBackground
public boolean hasBackground()- Specified by:
hasBackgroundin interfaceIBackgroundHolder<Layer>
-
hasInternalId
- Specified by:
hasInternalIdin interfaceILayer<Layer>
-
hasRole
-
hasRole
- Specified by:
hasRolein interfaceIStylableElement<Layer>- Parameters:
role-- Returns:
- true if the current
IStylableElementhas the given role, false otherwise.
-
internalSetParentGui
- Specified by:
internalSetParentGuiin interfaceILayer<Layer>
-
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 interfaceIBackgroundHolder<Layer>
-
removeRole
public void removeRole() -
removeSelfFromGui
public void removeSelfFromGui()- Specified by:
removeSelfFromGuiin interfaceILayer<Layer>
-
setBackground
-
setBackgroundColor
- Specified by:
setBackgroundColorin interfaceIBackgroundHolder<Layer>
-
setBackgroundColorGradient
- Specified by:
setBackgroundColorGradientin interfaceIBackgroundHolder<Layer>
-
setBackgroundImage
- Specified by:
setBackgroundImagein interfaceIBackgroundHolder<Layer>
-
setBackgroundImage
- Specified by:
setBackgroundImagein interfaceIBackgroundHolder<Layer>
-
setRootControl
- Specified by:
setRootControlin interfaceIRootControlOwner<Layer>
-
setContentAlignment
- Specified by:
setContentAlignmentin interfaceILayer<Layer>
-
setOpacity
- Specified by:
setOpacityin interfaceILayer<Layer>
-
setRole
-