ch.randelshofer.quaqua.border
Class QuaquaNativeButtonStateBorder
java.lang.Object
ch.randelshofer.quaqua.util.CachedPainter
ch.randelshofer.quaqua.border.QuaquaNativeButtonStateBorder
- All Implemented Interfaces:
- VisualMargin, javax.swing.border.Border
- Direct Known Subclasses:
- QuaquaNativeButtonStateBorder.UIResource
public class QuaquaNativeButtonStateBorder
- extends CachedPainter
- implements javax.swing.border.Border, VisualMargin
Native Aqua border for an AbstractButton.
This border draws everything except the focus ring. To draw the focus
wring, wrap this border into a FocusedBorder.
- Version:
- $Id$
- Author:
- Werner Randelshofer
|
Method Summary |
protected java.awt.Image |
createImage(java.awt.Component c,
int w,
int h,
java.awt.GraphicsConfiguration config)
Creates the image to cache. |
java.awt.Insets |
getBorderInsets(java.awt.Component c)
|
java.awt.Insets |
getVisualMargin(java.awt.Component c)
|
boolean |
isBorderOpaque()
|
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
|
protected void |
paintToImage(java.awt.Component c,
java.awt.Graphics g,
int w,
int h,
java.lang.Object args)
Paints the representation to cache to the supplied Graphics. |
protected void |
paintToImage(java.awt.Component c,
java.awt.Image img,
int w,
int h,
java.lang.Object args)
Paints the representation to cache to the supplied Graphics. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QuaquaNativeButtonStateBorder
public QuaquaNativeButtonStateBorder(OSXAquaPainter.Widget widget)
QuaquaNativeButtonStateBorder
public QuaquaNativeButtonStateBorder(OSXAquaPainter.Widget widget,
java.awt.Insets imageInsets,
java.awt.Insets borderInsets)
paintBorder
public void paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
- Specified by:
paintBorder in interface javax.swing.border.Border
createImage
protected java.awt.Image createImage(java.awt.Component c,
int w,
int h,
java.awt.GraphicsConfiguration config)
- Description copied from class:
CachedPainter
- Creates the image to cache. This returns an opaque image, subclasses
that require translucency or transparency will need to override this
method.
- Overrides:
createImage in class CachedPainter
- Parameters:
c - Component painting tow - Width of image to createh - Height to image to createconfig - GraphicsConfiguration that will be
rendered to, this may be null.
paintToImage
protected void paintToImage(java.awt.Component c,
java.awt.Image img,
int w,
int h,
java.lang.Object args)
- Description copied from class:
CachedPainter
- Paints the representation to cache to the supplied Graphics.
- Overrides:
paintToImage in class CachedPainter
- Parameters:
c - Component painting toimg - Image to paint tow - Width to paint toh - Height to paint toargs - Arguments supplied to paint
paintToImage
protected void paintToImage(java.awt.Component c,
java.awt.Graphics g,
int w,
int h,
java.lang.Object args)
- Description copied from class:
CachedPainter
- Paints the representation to cache to the supplied Graphics.
- Specified by:
paintToImage in class CachedPainter
- Parameters:
c - Component painting tog - Graphics to paint tow - Width to paint toh - Height to paint toargs - Arguments supplied to paint
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c)
- Specified by:
getBorderInsets in interface javax.swing.border.Border
isBorderOpaque
public boolean isBorderOpaque()
- Specified by:
isBorderOpaque in interface javax.swing.border.Border
getVisualMargin
public java.awt.Insets getVisualMargin(java.awt.Component c)
- Specified by:
getVisualMargin in interface VisualMargin