Quaqua 8.0 2011-10-02

ch.randelshofer.quaqua
Class QuaquaSquareButtonBorder

java.lang.Object
  extended by ch.randelshofer.quaqua.util.CachedPainter
      extended by ch.randelshofer.quaqua.QuaquaSquareButtonBorder
All Implemented Interfaces:
javax.swing.border.Border

public class QuaquaSquareButtonBorder
extends CachedPainter
implements javax.swing.border.Border

QuaquaSquareButtonBorder.

Version:
$Id: QuaquaSquareButtonBorder.java 426 2011-08-06 09:35:43Z wrandelshofer $
Author:
Werner Randelshofer

Constructor Summary
QuaquaSquareButtonBorder()
          Creates a new instance of QuaquaSquareButtonBorder
 
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)
           
 boolean isBorderOpaque()
           
 void paintBorder(java.awt.Component c, java.awt.Graphics gr, int x, int y, int width, int height)
           
protected  void paintToImage(java.awt.Component c, java.awt.Graphics gr, int width, int height, java.lang.Object args)
          Paints the representation to cache to the supplied Graphics.
 
Methods inherited from class ch.randelshofer.quaqua.util.CachedPainter
getMaxCachedImageSize, paint, paintImage, paintToImage, setMaxCachedImageSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuaquaSquareButtonBorder

public QuaquaSquareButtonBorder()
Creates a new instance of QuaquaSquareButtonBorder

Method Detail

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

createImage

protected java.awt.Image createImage(java.awt.Component c,
                                     int w,
                                     int h,
                                     java.awt.GraphicsConfiguration config)
Creates the image to cache. This returns a translucent image.

Overrides:
createImage in class CachedPainter
Parameters:
c - Component painting to
w - Width of image to create
h - Height to image to create
config - GraphicsConfiguration that will be rendered to, this may be null.

paintBorder

public void paintBorder(java.awt.Component c,
                        java.awt.Graphics gr,
                        int x,
                        int y,
                        int width,
                        int height)
Specified by:
paintBorder in interface javax.swing.border.Border

paintToImage

protected void paintToImage(java.awt.Component c,
                            java.awt.Graphics gr,
                            int width,
                            int height,
                            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 to
gr - Graphics to paint to
width - Width to paint to
height - Height to paint to
args - Arguments supplied to paint

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.