Quaqua 8.0 2011-10-02

ch.randelshofer.quaqua.border
Class BackgroundBorderUIResource

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

public class BackgroundBorderUIResource
extends java.lang.Object
implements javax.swing.border.Border, BackgroundBorder, PressedCueBorder, 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 417 2011-08-04 07:32:38Z 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 hasPressedCue(javax.swing.JComponent c)
          Returns true, if this border has a visual cue for the pressed state of the button.
 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

hasPressedCue

public boolean hasPressedCue(javax.swing.JComponent c)
Description copied from interface: PressedCueBorder
Returns true, if this border has a visual cue for the pressed state of the button. If the border has no visual cue, then the ButtonUI has to provide it by some other means.

Specified by:
hasPressedCue in interface PressedCueBorder

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