com.jidesoft.gantt
Class PaintedTexture
java.lang.Object
com.jidesoft.gantt.PaintedTexture
public abstract class PaintedTexture
- extends Object
A utility class so you can easily create a TexturePaint by painting the pattern in Java 2D.
Method Summary |
static TexturePaint |
createDiagonalLines(int width,
int height,
Paint paint,
boolean forward,
boolean backward)
|
static TexturePaint |
createLines(int width,
int height,
Paint paint,
boolean horizontal,
boolean vertical)
|
TexturePaint |
createTexturePaint()
|
protected abstract void |
drawTexture(Graphics2D graphics)
Sub classes should paint the pattern in the rectangle (0, 0, width, height). |
int |
getHeight()
|
int |
getWidth()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PaintedTexture
public PaintedTexture(int width,
int height)
- Parameters:
width
- The width of the pattern tile.height
- The height of the pattern tile.
getWidth
public int getWidth()
getHeight
public int getHeight()
drawTexture
protected abstract void drawTexture(Graphics2D graphics)
- Sub classes should paint the pattern in the rectangle (0, 0, width, height).
- Parameters:
graphics
- The graphics to paint with.
createTexturePaint
public TexturePaint createTexturePaint()
createDiagonalLines
public static TexturePaint createDiagonalLines(int width,
int height,
Paint paint,
boolean forward,
boolean backward)
createLines
public static TexturePaint createLines(int width,
int height,
Paint paint,
boolean horizontal,
boolean vertical)