E - component typeD - decoration typeI - background typepublic abstract class AbstractTextureBackground<E extends javax.swing.JComponent,D extends IDecoration<E,D>,I extends AbstractTextureBackground<E,D,I>> extends AbstractBackground<E,D,I>
| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Rectangle |
bounds
Cached texture bounds.
|
protected java.awt.TexturePaint |
paint
Cached texture paint.
|
id, opacity| Constructor and Description |
|---|
AbstractTextureBackground() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
Resets texture cache.
|
protected abstract java.awt.TexturePaint |
getTexturePaint(java.awt.Rectangle bounds)
Returns texture paint implementation.
|
protected abstract boolean |
isPaintable()
Returns whether or not texture background is paintable right now.
|
void |
paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
D d,
java.awt.Shape shape)
Fills the specified shape with this background.
|
clone, getDefaultId, getId, getOpacity, mergeprotected transient java.awt.TexturePaint paint
protected transient java.awt.Rectangle bounds
public void clearCache()
public void paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
D d,
java.awt.Shape shape)
IBackgroundg2d - graphics contextbounds - painting boundsc - painted componentd - painted decoration stateshape - background shapeprotected abstract boolean isPaintable()
protected abstract java.awt.TexturePaint getTexturePaint(java.awt.Rectangle bounds)
bounds - painting bounds