E - component typepublic class TexturePainter<E extends javax.swing.JComponent,U extends javax.swing.plaf.ComponentUI> extends AbstractPainter<E,U>
TextureType,
AbstractPainter,
Painter| Modifier and Type | Field and Description |
|---|---|
protected java.awt.TexturePaint |
paint
Cached texture paint.
|
protected TextureType |
textureType
Texture type.
|
component, listeners, ltr, propertyChangeListener, ui| Constructor and Description |
|---|
TexturePainter(java.awt.image.BufferedImage image)
Constructs texture paint with the specified image as a texture.
|
TexturePainter(java.awt.Image image)
Constructs texture paint with the specified image as a texture.
|
TexturePainter(javax.swing.ImageIcon icon)
Constructs texture paint with the specified icon as a texture.
|
TexturePainter(TextureType textureType)
Constructs texture paint with the specified texture type.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.image.BufferedImage |
getImage()
Returns texture image.
|
TextureType |
getTextureType()
Returns texture type.
|
void |
paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
U ui)
Paints visual data onto the component graphics.
|
void |
setImage(java.awt.image.BufferedImage image)
Sets texture image.
|
void |
setTextureType(TextureType textureType)
Sets texture type.
|
protected void |
updatePainter(java.awt.image.BufferedImage image)
Updates cached texture paint.
|
addPainterListener, b, borderChange, getBorders, getCompleteBorder, getPreferredSize, i, i, i, install, installPropertyChangeListener, isOpaque, isSectionPainter, isSettingsUpdateAllowed, orientationChange, p, propertyChange, removePainterListener, repaint, repaint, repaint, revalidate, saveOrientation, uninstall, uninstallPropertyChangeListener, updateAll, updateBorder, updateOpacity, updateOrientationprotected java.awt.TexturePaint paint
protected TextureType textureType
public TexturePainter(javax.swing.ImageIcon icon)
icon - texture iconpublic TexturePainter(java.awt.Image image)
image - texture imagepublic TexturePainter(java.awt.image.BufferedImage image)
image - texture imagepublic TexturePainter(TextureType textureType)
textureType - predefined texture typepublic TextureType getTextureType()
TextureTypepublic void setTextureType(TextureType textureType)
textureType - new texture typeTextureTypepublic java.awt.image.BufferedImage getImage()
public void setImage(java.awt.image.BufferedImage image)
image - new texture imageprotected void updatePainter(java.awt.image.BufferedImage image)
image - texture imagepublic void paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
U ui)
g2d - component graphicsbounds - bounds for painter visual datac - component to processui - painted component UI