Class GFillSolid

java.lang.Object
com.iizix.prop.GFill
com.iizix.prop.GFillSolid
All Implemented Interfaces:
Cloneable

public class GFillSolid extends GFill
Solid fill using a single color to fill a shape.
Author:
Christopher Mindus
  • Constructor Details

    • GFillSolid

      public GFillSolid(GColor color)
      Creates a solid fill from a color.
      Parameters:
      color - The color, never null.
      Throws:
      NullPointerException - If color is null. A solid fill with no colour is not a fill: append(PropMgr,SendTransaction), equals(Object) and hashCode() all dereference it, so the failure would otherwise surface far from the caller that caused it.
  • Method Details

    • getColor

      public GColor getColor()
      Gets the color.
    • getType

      public GFill.Type getType()
      Gets the fill type.
      Specified by:
      getType in class GFill
      Returns:
      SOLID.
    • equals

      public boolean equals(Object o)
      Checks if two fill objects are equal.
      Specified by:
      equals in class GFill
    • hashCode

      public int hashCode()
      Gets the hash code of this instance, consistent with equals: the color.
      Overrides:
      hashCode in class Object
      Returns:
      The hash code.
    • clone

      public GFillSolid clone()
      Clones this instance.
      Specified by:
      clone in class GFill
      Returns:
      As GFillPattern is immutable, cloning will return "this".
    • paramString

      protected String paramString()
      Returns the parameter string representing the state of this event. This string is useful for debugging. Subclasses adds extra information to the string by preceding it with a comma followed by the extra information.
      Returns:
      the parameter string of this event.