Quaqua 7.4.2 2011-07-05

ch.randelshofer.quaqua
Class QuaquaTextFieldBorder

java.lang.Object
  extended by javax.swing.border.AbstractBorder
      extended by ch.randelshofer.quaqua.VisualMargin
          extended by ch.randelshofer.quaqua.QuaquaTextFieldBorder
All Implemented Interfaces:
BackgroundBorder, java.io.Serializable, javax.swing.border.Border, javax.swing.plaf.UIResource
Direct Known Subclasses:
QuaquaTextFieldBorder.UIResource

public class QuaquaTextFieldBorder
extends VisualMargin
implements BackgroundBorder

QuaquaTextFieldBorder.

Version:
4.2 2008-10-02 Made imageInsets a parameter, instead of using hardcoded values.
4.1 2008-01-04 Don't draw focus border when component is disabled.
4.0 2007-07-26 Add support for client property "Quaqua.TextField.style" "search", "plain".
3.1 2007-04-12 Honour margin of JTextComponent.
3.0.1 2006-01-04 Non-editable text field border must be same as disabled text field border.
3.0 2005-12-08 Rewritten to create border images lazily and to not hardcode the URL to the border images.
2.0 2005-10-01 Turned into a background border.
1.3 2005-06-20 1.2 Changed border insets to achieve baseline alignment with other components.
1.2 2005-04-10 1.1.1 Alignemnt changed for small size text fields.
1.1 2005-03-27 1.1 Updated to take account of larger focus ring and of margins.
1.0 July 4, 2004 Created.
Author:
Werner Randelshofer
See Also:
Serialized Form

Nested Class Summary
static class QuaquaTextFieldBorder.UIResource
           
 
Constructor Summary
QuaquaTextFieldBorder(java.lang.String imagesLocation, java.awt.Insets imageInsets, java.lang.String searchImagesLocation, java.awt.Insets searchImageInsets, java.lang.String smallSearchImagesLocation, java.awt.Insets smallSearchImageInsets)
          Creates a new instance.
 
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, java.awt.Insets insets)
          Reinitializes the insets parameter with this Border's current Insets.
 boolean isBorderOpaque()
           
 void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
           
 
Methods inherited from class ch.randelshofer.quaqua.VisualMargin
getBorderInsets, getVisualMargin, getVisualMargin, setFixed, setPropertyName
 
Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.border.Border
getBorderInsets
 

Constructor Detail

QuaquaTextFieldBorder

public QuaquaTextFieldBorder(java.lang.String imagesLocation,
                             java.awt.Insets imageInsets,
                             java.lang.String searchImagesLocation,
                             java.awt.Insets searchImageInsets,
                             java.lang.String smallSearchImagesLocation,
                             java.awt.Insets smallSearchImageInsets)
Creates a new instance.

Method Detail

getBorderInsets

public java.awt.Insets getBorderInsets(java.awt.Component c,
                                       java.awt.Insets insets)
Description copied from class: VisualMargin
Reinitializes the insets parameter with this Border's current Insets.

Overrides:
getBorderInsets in class VisualMargin
Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized
Returns:
the insets object

isBorderOpaque

public boolean isBorderOpaque()
Specified by:
isBorderOpaque in interface javax.swing.border.Border
Overrides:
isBorderOpaque in class javax.swing.border.AbstractBorder

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
Overrides:
paintBorder in class javax.swing.border.AbstractBorder

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.