Class CornerShadow
java.lang.Object
ch.nolix.system.element.base.AbstractElement
ch.nolix.system.gui.box.CornerShadow
- All Implemented Interfaces:
IElement, ICornerShadow
A
CornerShadow is not mutable.- Author:
- Silvan Wyss
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic CornerShadowfromCornerShadow(ICornerShadow cornerShadow) static CornerShadowfromSpecification(INode<?> specification) IContainer<INode<?>> intgetColor()intintstatic CornerShadowwithCornerAndLocationAndSide1ThicknessAnsSide2ThicknessAndBlurRadiusAndColor(Corner corner, Location location, int side1Thickness, int side2Thickness, int blurRadius, IColor color) Methods inherited from class AbstractElement
equals, getSpecification, hashCode, toStringMethods inherited from interface IElement
toFormatedString, toXml
-
Field Details
-
DEFAULT_LOCATION
-
-
Method Details
-
fromCornerShadow
- Parameters:
cornerShadow-- Returns:
- a
CornerShadowfrom the given cornerShadow. - Throws:
RuntimeException- if the given cornerShadow is null.
-
fromSpecification
- Parameters:
specification-- Returns:
- a
CornerShadowfrom the given specification. - Throws:
RuntimeException- if the given specification is not valid.
-
withCornerAndLocationAndSide1ThicknessAnsSide2ThicknessAndBlurRadiusAndColor
public static CornerShadow withCornerAndLocationAndSide1ThicknessAnsSide2ThicknessAndBlurRadiusAndColor(Corner corner, Location location, int side1Thickness, int side2Thickness, int blurRadius, IColor color) - Parameters:
corner-location-side1Thickness-side2Thickness-blurRadius-color-- Returns:
- a new
CornerShadowwith the given corner, location, side1Thickness, side2Thickness, blurRadius and color. - Throws:
RuntimeException- if the given corner is null.RuntimeException- if the given location is null.RuntimeException- if the given side1Thickness is negative.RuntimeException- if the given side2Thickness is negative.RuntimeException- if the given blurRadius is negative.RuntimeException- if the given color is null.
-
getAttributes
- Specified by:
getAttributesin interfaceIElement- Returns:
- the attributes of the current
IElement.
-
getBlurRadius
public int getBlurRadius()- Specified by:
getBlurRadiusin interfaceICornerShadow- Returns:
- the blur radius of the current {ICornerShadow}.
-
getColor
- Specified by:
getColorin interfaceICornerShadow- Returns:
- the color of the current {ICornerShadow}.
-
getCorner
- Specified by:
getCornerin interfaceICornerShadow- Returns:
- the corner of the current {ICornerShadow}.
-
getLocation
- Specified by:
getLocationin interfaceICornerShadow- Returns:
- the location of the current {ICornerShadow}.
-
getSide1Thickness
public int getSide1Thickness()- Specified by:
getSide1Thicknessin interfaceICornerShadow- Returns:
- the side 1 thickness of the current {ICornerShadow}.
-
getSide2Thickness
public int getSide2Thickness()- Specified by:
getSide2Thicknessin interfaceICornerShadow- Returns:
- the side 2 thickness of the current {ICornerShadow}.
-