Package com.iizix.prop
Class GFillPattern
- java.lang.Object
- com.iizix.prop.GFill
- com.iizix.prop.GFillPattern
- All Implemented Interfaces:
java.lang.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
Nested classes/interfaces inherited from class com.iizix.prop.GFill
GFill.Type
Field Summary
Fields Modifier and Type Field Description int
cx
The height of the pattern image.int
cy
The width of the pattern image.java.lang.String
imageReference
The image reference string.int
x
The X coordinate of the position of the pattern.int
y
The Y coordinate of the position of the pattern.
Constructor Summary
Constructors Constructor Description GFillPattern(int x, int y, int width, int height, java.lang.String imageReference)
Creates a pattern fill from an image reference string path as "module:/image/path".
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GFillPattern
clone()
Clones this instance.boolean
equals(java.lang.Object o)
Checks if two fill objects are equal.java.lang.String
getImageReference()
Gets the image reference string path.GRect
getRect()
Gets the rectangle of the image x, y, width and height.GFill.Type
getType()
Gets the fill type.protected java.lang.String
paramString()
Returns the parameter string representing the state of this event.
Field Detail
x
public final int x
The X coordinate of the position of the pattern.
y
public final int y
The Y coordinate of the position of the pattern.
cx
public final int cx
The height of the pattern image.
cy
public final int cy
The width of the pattern image.
imageReference
public final java.lang.String imageReference
The image reference string.
Constructor Detail
GFillPattern
public GFillPattern(int x, int y, int width, int height, java.lang.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:
java.lang.IllegalArgumentException
- For invalid x, y, width or height values.java.lang.NullPointerException
- If imageReference is null.
Method Detail
getRect
public GRect getRect()
Gets the rectangle of the image x, y, width and height.
getImageReference
public java.lang.String getImageReference()
Gets the image reference string path.
getType
public GFill.Type getType()
Gets the fill type.
equals
public boolean equals(java.lang.Object o)
Checks if two fill objects are equal.
clone
public GFillPattern clone()
Clones this instance.
paramString
protected java.lang.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.