jas.util.border
Class ShadowBorder

java.lang.Object
  extended by javax.swing.border.AbstractBorder
      extended by jas.util.border.ShadowBorder
All Implemented Interfaces:
Serializable, Border

public class ShadowBorder
extends AbstractBorder

Draws a drop shadow border. Designed to be used as part of a compound border in combination with a line border.

See Also:
Serialized Form

Field Summary
 int NORTHEAST
           
 int NORTHWEST
           
 int SOUTHEAST
           
 int SOUTHWEST
           
 
Constructor Summary
ShadowBorder()
          Creates a ShadowBorder with default properties
ShadowBorder(Color c, int orientation, int size)
          Creates a ShadowBorder
 
Method Summary
static ShadowBorder createShadowBorder()
           
 Insets getBorderInsets(Component c)
           
 Insets getBorderInsets(Component c, Insets i)
           
 void paintBorder(Component comp, Graphics g, int x, int y, int width, int height)
           
 
Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORTHEAST

public final int NORTHEAST
See Also:
Constant Field Values

NORTHWEST

public final int NORTHWEST
See Also:
Constant Field Values

SOUTHEAST

public final int SOUTHEAST
See Also:
Constant Field Values

SOUTHWEST

public final int SOUTHWEST
See Also:
Constant Field Values
Constructor Detail

ShadowBorder

public ShadowBorder()
Creates a ShadowBorder with default properties


ShadowBorder

public ShadowBorder(Color c,
                    int orientation,
                    int size)
Creates a ShadowBorder

Parameters:
c - The color for the shadow. If null the border will be drawn using a darker version of the components background color.
orientation - One of NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST
size - The size of the shadow in pixels
Method Detail

createShadowBorder

public static ShadowBorder createShadowBorder()

paintBorder

public void paintBorder(Component comp,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Specified by:
paintBorder in interface Border
Overrides:
paintBorder in class AbstractBorder

getBorderInsets

public Insets getBorderInsets(Component c)
Specified by:
getBorderInsets in interface Border
Overrides:
getBorderInsets in class AbstractBorder

getBorderInsets

public Insets getBorderInsets(Component c,
                              Insets i)
Overrides:
getBorderInsets in class AbstractBorder


Copyright © 2000-2009 FreeHEP. All Rights Reserved.