Class GFillPattern

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

public class GFillPattern extends GFill
Pattern fill for a shape with a close relation to dojox/gfx.Pattern.
Author:
Christopher Mindus
  • Nested Class Summary Link icon

    Nested classes/interfaces inherited from class com.iizix.prop.GFill Link icon

    GFill.Type
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    final int
    The height of the pattern image.
    final int
    The width of the pattern image.
    final String
    The image reference string.
    final int
    The X coordinate of the position of the pattern.
    final int
    The Y coordinate of the position of the pattern.

    Fields inherited from class com.iizix.prop.GFill Link icon

    DEFAULT
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    GFillPattern(int x, int y, int width, int height, String imageReference)
    Creates a pattern fill from an image reference string path as "module:/image/path".
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    Clones this instance.
    boolean
    Checks if two fill objects are equal.
    Gets the image reference string path.
    Gets the rectangle of the image x, y, width and height.
    Gets the fill type.
    protected String
    Returns the parameter string representing the state of this event.

    Methods inherited from class com.iizix.prop.GFill Link icon

    getString, toString

    Methods inherited from class java.lang.Object Link icon

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details Link icon

    • x Link icon

      public final int x
      The X coordinate of the position of the pattern.
    • y Link icon

      public final int y
      The Y coordinate of the position of the pattern.
    • cx Link icon

      public final int cx
      The height of the pattern image.
    • cy Link icon

      public final int cy
      The width of the pattern image.
    • imageReference Link icon

      public final String imageReference
      The image reference string.
  • Constructor Details Link icon

    • GFillPattern Link icon

      public GFillPattern(int x, int y, int width, int height, String imageReference)
      Creates a pattern fill from an image reference string path as "module:/image/path".
      Parameters:
      x - The X coordinate of the position of the pattern.
      y - The Y coordinate of the position of the pattern.
      width - The height of the pattern image.
      height - The width of the pattern image.
      imageReference - The image reference.
      Throws:
      IllegalArgumentException - For invalid x, y, width or height values.
      NullPointerException - If imageReference is null.
  • Method Details Link icon

    • getRect Link icon

      public GRect getRect()
      Gets the rectangle of the image x, y, width and height.
    • getImageReference Link icon

      public String getImageReference()
      Gets the image reference string path.
    • getType Link icon

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

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

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

      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.