Class CornerShadow

All Implemented Interfaces:
IElement, ICornerShadow

public final class CornerShadow extends AbstractElement implements ICornerShadow
A CornerShadow is not mutable.
Author:
Silvan Wyss
  • Field Details

    • DEFAULT_LOCATION

      public static final Location DEFAULT_LOCATION
  • Method Details

    • fromCornerShadow

      public static CornerShadow fromCornerShadow(ICornerShadow cornerShadow)
      Parameters:
      cornerShadow -
      Returns:
      a CornerShadow from the given cornerShadow.
      Throws:
      RuntimeException - if the given cornerShadow is null.
    • fromSpecification

      public static CornerShadow fromSpecification(INode<?> specification)
      Parameters:
      specification -
      Returns:
      a CornerShadow from 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 CornerShadow with 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

      public IContainer<INode<?>> getAttributes()
      Specified by:
      getAttributes in interface IElement
      Returns:
      the attributes of the current IElement.
    • getBlurRadius

      public int getBlurRadius()
      Specified by:
      getBlurRadius in interface ICornerShadow
      Returns:
      the blur radius of the current {ICornerShadow}.
    • getColor

      public IColor getColor()
      Specified by:
      getColor in interface ICornerShadow
      Returns:
      the color of the current {ICornerShadow}.
    • getCorner

      public Corner getCorner()
      Specified by:
      getCorner in interface ICornerShadow
      Returns:
      the corner of the current {ICornerShadow}.
    • getLocation

      public Location getLocation()
      Specified by:
      getLocation in interface ICornerShadow
      Returns:
      the location of the current {ICornerShadow}.
    • getSide1Thickness

      public int getSide1Thickness()
      Specified by:
      getSide1Thickness in interface ICornerShadow
      Returns:
      the side 1 thickness of the current {ICornerShadow}.
    • getSide2Thickness

      public int getSide2Thickness()
      Specified by:
      getSide2Thickness in interface ICornerShadow
      Returns:
      the side 2 thickness of the current {ICornerShadow}.