Quaqua 5.4.1 2009-07-14

ch.randelshofer.quaqua.border
Class BackgroundBorderUIResource

java.lang.Object
  extended by ch.randelshofer.quaqua.border.BackgroundBorderUIResource
All Implemented Interfaces:
BackgroundBorder, javax.swing.border.Border, javax.swing.plaf.UIResource

public class BackgroundBorderUIResource
extends java.lang.Object
implements javax.swing.border.Border, BackgroundBorder, javax.swing.plaf.UIResource

A BackgroundBorderUIResource is used by the Quaqua Look And Feel to tag a BorderUIResource that has to be drawn on to the background of a JComponent.

It is used like a regular Border object, the BackgroundBorderUIResource works like an EmptyBorder. It just has insets, but draws nothing. Using the getBackgroundBorder method, one can retrieve the background border used to draw on the background of a JComponent.

Version:
$Id: BackgroundBorderUIResource.java 82 2009-06-11 08:57:33Z wrandelshofer $
Author:
Werner Randelshofer

Constructor Summary
BackgroundBorderUIResource(javax.swing.border.Border backgroundBorder)
          Creates an EmptyBorder which has the same insets as the specified background border.
 
Method Summary
 javax.swing.border.Border getBackgroundBorder()
          Returns the border that needs to be drawn onto the background.
 java.awt.Insets getBorderInsets(java.awt.Component c)
           
 boolean isBorderOpaque()
           
 void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackgroundBorderUIResource

public BackgroundBorderUIResource(javax.swing.border.Border backgroundBorder)
Creates an EmptyBorder which has the same insets as the specified background border.

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

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

getBackgroundBorder

public javax.swing.border.Border getBackgroundBorder()
Description copied from interface: BackgroundBorder
Returns the border that needs to be drawn onto the background.

Specified by:
getBackgroundBorder in interface BackgroundBorder

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