E - component typepublic class NinePatchIconPainter<E extends javax.swing.JComponent> extends AbstractPainter<E>
NinePatchIcon,
NinePatchStatePainter,
AbstractPainter,
Painter| Modifier and Type | Field and Description |
|---|---|
protected NinePatchIcon |
icon
9-patch icon to paint.
|
listeners, margin, opaque, preferredSize| Constructor and Description |
|---|
NinePatchIconPainter()
Constructs new 9-patch icon painter.
|
NinePatchIconPainter(java.awt.image.BufferedImage bufferedImage)
Constructs new 9-patch icon painter.
|
NinePatchIconPainter(java.awt.Image image)
Constructs new 9-patch icon painter.
|
NinePatchIconPainter(javax.swing.ImageIcon imageIcon)
Constructs new 9-patch icon painter.
|
NinePatchIconPainter(NinePatchIcon icon)
Constructs new 9-patch icon painter.
|
NinePatchIconPainter(java.lang.String iconSrc)
Constructs new 9-patch icon painter.
|
NinePatchIconPainter(java.net.URL url)
Constructs new 9-patch icon painter.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.Insets |
getMargin(E c)
Returns margin required for visual data provided by this painter.
|
NinePatchIcon |
getNinePatchIcon()
Returns painted 9-patch icon.
|
java.awt.Dimension |
getPreferredSize(E c)
Returns preferred size required for proper painting of visual data provided by this painter.
|
void |
paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c)
Paints visual data onto the component graphics.
|
void |
setNinePatchIcon(NinePatchIcon icon)
Sets painted 9-patch icon.
|
addPainterListener, install, isOpaque, p, removePainterListener, repaint, repaint, repaint, revalidate, setMargin, setMargin, setMargin, setOpaque, setPreferredSize, uninstall, updateAll, updateOpacityprotected NinePatchIcon icon
public NinePatchIconPainter()
public NinePatchIconPainter(java.net.URL url)
url - 9-patch image URLpublic NinePatchIconPainter(java.lang.String iconSrc)
iconSrc - 9-patch image sourcepublic NinePatchIconPainter(javax.swing.ImageIcon imageIcon)
imageIcon - 9-patch imagepublic NinePatchIconPainter(java.awt.Image image)
image - 9-patch imagepublic NinePatchIconPainter(java.awt.image.BufferedImage bufferedImage)
bufferedImage - 9-patch imagepublic NinePatchIconPainter(NinePatchIcon icon)
icon - 9-patch iconpublic NinePatchIcon getNinePatchIcon()
public void setNinePatchIcon(NinePatchIcon icon)
icon - painted 9-patch iconpublic java.awt.Dimension getPreferredSize(E c)
getPreferredSize in interface Painter<E extends javax.swing.JComponent>getPreferredSize in class AbstractPainter<E extends javax.swing.JComponent>c - component to processpublic java.awt.Insets getMargin(E c)
public void paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c)
g2d - component graphicsbounds - bounds for painter visual datac - component to process