|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.extended.painter.AbstractPainter<E> com.alee.extended.painter.TexturePainter<E>
E
- component typepublic class TexturePainter<E extends javax.swing.JComponent>
Texure painter. This painter fills component background with a texture based on the specified image.
TextureType
,
AbstractPainter
,
Painter
Field Summary | |
---|---|
protected java.awt.TexturePaint |
paint
Cached texture paint. |
protected TextureType |
textureType
Texture type. |
Fields inherited from class com.alee.extended.painter.AbstractPainter |
---|
listeners, margin, opaque, preferredSize |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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)
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. |
Methods inherited from class com.alee.extended.painter.AbstractPainter |
---|
addPainterListener, getMargin, getPreferredSize, install, isOpaque, p, removePainterListener, repaint, repaint, repaint, revalidate, setMargin, setMargin, setMargin, setOpaque, setPreferredSize, uninstall, updateAll, updateOpacity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.awt.TexturePaint paint
protected TextureType textureType
Constructor Detail |
---|
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 typeMethod Detail |
---|
public TextureType getTextureType()
TextureType
public void setTextureType(TextureType textureType)
textureType
- new texture typeTextureType
public 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)
g2d
- component graphicsbounds
- bounds for painter visual datac
- component to process
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |