com.sas.swing.visuals
Class BaseBorder

com.sas.swing.visuals.BaseBorder
All Implemented Interfaces:
com.sas.lang.StringDataInterface, java.io.Serializable, javax.swing.border.Border

public class BaseBorder
implements com.sas.lang.StringDataInterface

BaseBorder is a subclass of AbstractBorder capable of drawing several different styles of borders. Those styles include: BEZEL, SIMPLE, EMBOSS, and BUTTON. Each of these border styles can be drawn using either the RAISED or LOWERED lightSources. Text can also be displayed on the top area of all of the borders.

Notes:


See Also:
Border, Serialized Form

Field Summary
static int ALL_SIDES
          All sides flags On (combination of com.sas.geometry.Orientations TOP,BOTTOM,LEFT, and RIGHT flags
protected  java.awt.Color baseColorJ
          color value for the base color of the border
static int BEZEL
          A BEZEL style border, also the DEFAULT border for the BaseBorder class
static int BOTTOM_LEFT
          Bottom/left lightSource
static int BOTTOM_RIGHT
          Bottom/right lightSource
static int BUTTON
          A BUTTON style border, uses the java.awt.SystemColor class control colors
static int CENTER
          Text CENTER alignment
static int DEFAULT
          Default border style shown
static int EMBOSS
          A EMBOSS style border
static int LEFT
          Text LEFT alignment
protected  int lightSource
          int value (TOP_LEFT ) representing the light source, derived from com.sas.geometry.CornerOrientation
static int LOWERED
          Lowered border lightSource
static int NONE
          No border style shown
static int RAISED
          Raised border lightSource
static java.lang.String RB_KEY
           
static int RIGHT
          Text RIGHT alignment
static int SIMPLE
          A SIMPLE style single color border
protected  int style
          int value representing the style of the border intially set to NONE Derived from com.sas.geometry.Orientations
static int TOP_LEFT
          Top/left lightSource
static int TOP_RIGHT
          Top/right lightSource
 
Constructor Summary
BaseBorder()
          Default Constructor.
BaseBorder(int style)
          Constructor to create a BaseBorder with the specified style.
BaseBorder(int style, int ltSrc)
          Constructor to create a BaseBorder with the specified style and lightSource.
BaseBorder(int style, int ltSrc, int width)
          Constructor to create a BaseBorder with the specified style, lightSource and width.
BaseBorder(int style, int ltSrc, int width, java.awt.Color base)
          Constructor to create a BaseBorder with the specified style, lightSource, width, and base color.
BaseBorder(int style, int ltSrc, int width, java.awt.Color base, java.awt.Color highlight, java.awt.Color shadow)
          Constructor to create a BaseBorder with the specified style, lightSource, width, base color, highlight color, and shadow color.
BaseBorder(int style, int ltSrc, int width, java.awt.Color base, java.awt.Color highlight, java.awt.Color shadow, java.lang.String txt, int align, int margin, java.awt.Font f)
          Constructor to create a BaseBorder with the specified style, lightSource, width, base color, highlight color, and shadow color.
 
Method Summary
static void drawBezel(java.awt.Graphics g, int x, int y, int width, int height, java.awt.Color top, java.awt.Color left, java.awt.Color bottom, java.awt.Color right, int borderWidth, int sides)
          Convenience method for drawing a bezel with the specified colors and border width.
static void drawBezel(java.awt.Graphics g, int x, int y, int width, int height, java.awt.Color topLeft, java.awt.Color bottomRight, int borderWidth)
          Convenience method for drawing a bezel with the specified colors and border width.
static void drawEmboss(java.awt.Graphics g, int x, int y, int width, int height, java.awt.Color top, java.awt.Color bottom, int borderWidth)
          Convenience method for drawing an embossed border with the specified top and bottom colors and border width.
static void drawEmboss(java.awt.Graphics g, int x, int y, int width, int height, java.awt.Color top, java.awt.Color bottom, int borderWidth, int sides)
          Convenience method for drawing an embossed border with the specified top and bottom colors and border width.
 void drawInRect(java.awt.Component comp, java.awt.Graphics g, int x, int y, int width, int height)
          Draw the Border within the specified rectangle on the specified component.
 void drawInRect(java.awt.Graphics g, int x, int y, int width, int height)
          Draw the Border within the specified rectangle.
 void drawInRect(java.awt.Graphics g, java.awt.Rectangle rect)
          Draws the Border within the specified rectangle Calls the abstract version of drawInRect() with null for the component
 void drawInRect(java.awt.Graphics g, java.awt.Rectangle rect, int lSource)
          Convenience method to draw the Border within the specified rectangle with the specified lightSource.
 boolean equals(java.lang.Object item)
          Check if an object is equal to this BaseBorder.
 void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
          Reports a bound property change.
protected  void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          Supports reporting bound property changes.
 java.awt.Color getBackgroundColor()
          Get the background Color used for this BaseBorder when text is drawn.
 java.awt.Color getBaseColor()
          Gets the base color
 java.awt.Insets getBorderInsets(java.awt.Component comp)
          Get the Insets of the Border on the specified component.
 int getBorderWidth()
          Get the width of the BaseBorder
 java.awt.Component getComponent()
          Get the component the border is drawn on.
static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
          Returns information used by the com.sas.beans.Introspector to augment the automatically introspected information about this BaseBorder.
 java.awt.Font getFont()
          Get the font used to display the border text.
 java.awt.Color getForegroundColor()
          Get the foreground Color used for this BaseBorder when text is drawn.
 java.awt.Color getHighlightColor()
          Get the highlight Color used for this BaseBorder.
 java.awt.Insets getInsets()
          Gets the Insets of this Border.
 int getLightSource()
          Gets the Light Source of the Border.
 java.awt.Color getShadowColor()
          Get the shadow Color used for this BaseBorder.
 int getSidesPainted()
          Get the ORed bit flags indicating which sides will be painted by the border.
 int getStyle()
          Gets the style of the Border.
 java.lang.String getText()
          Get the text to be displayed in the border.
 int getTextAlignment()
          Get the alignment of the text on the top line of the border: LEFT, RIGHT, or CENTER.
 int getTextGap()
          Get the gap between the text and the border line.
 int getTextMargin()
          Get the pixel margin for the text when it is aligned to the LEFT or the RIGHT side.
 int hashCode()
           
 void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
          Paint the border on the given component.
static void paintBorder(java.awt.Graphics g, int x, int y, int width, int height, java.awt.Color highlight, java.awt.Color shadow, int style, int bWidth, int lSource, int sides)
          Paint the border given all the major parameters to describe the border.
protected  java.lang.String paramString()
          Used in the toString() method
 void setBackgroundColor(java.awt.Color c)
          Set the background Color for this BaseBorder, used as background for the text.
 void setBaseColor(java.awt.Color c)
          Set the base Color for this BaseBorder.
 void setBorderWidth(int width)
          Set the border width for this BaseBorder.
 void setComponent(java.awt.Component comp)
          Set the component used to find the backgroundColor, foregroundColor, or font if they are not set.
 void setFont(java.awt.Font f)
          Set the font to be used to display the text on the border.
 void setForegroundColor(java.awt.Color c)
          Set the foreground Color for this BaseBorder, used as foreground for the text.
 void setHighlightColor(java.awt.Color c)
          Set the highlight Color for this BaseBorder.
 void setLightSource(int ltSrc)
          Sets the type of the Border.
 void setShadowColor(java.awt.Color c)
          Set the shadow Color for this BaseBorder.
 void setSidesPainted(int sides)
          Set the ORed bit flags indicating which sides to paint.
 void setStyle(int s)
          Sets the style of the Border.
 void setText(java.lang.String txt)
          Set the text to be displayed on the top area of the border.
 void setTextAlignment(int a)
          Set the text alignment to CENTER, LEFT, or RIGHT for display on the top area of the border.
 void setTextGap(int g)
          Set the gap between the text and the border line.
 void setTextMargin(int m)
          Set the margin between the edge of the border the text is aligned to and the text when the alignment is LEFT or RIGHT.
 java.lang.String toString()
          Returns a string with all this BaseBorder information, inccluding style, alignment, and entire border structure.
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values

baseColorJ

protected java.awt.Color baseColorJ
color value for the base color of the border


lightSource

protected int lightSource
int value (TOP_LEFT ) representing the light source, derived from com.sas.geometry.CornerOrientation


style

protected int style
int value representing the style of the border intially set to NONE Derived from com.sas.geometry.Orientations


CENTER

public static final int CENTER
Text CENTER alignment

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
Text RIGHT alignment

See Also:
Constant Field Values

LEFT

public static final int LEFT
Text LEFT alignment

See Also:
Constant Field Values

ALL_SIDES

public static final int ALL_SIDES
All sides flags On (combination of com.sas.geometry.Orientations TOP,BOTTOM,LEFT, and RIGHT flags

See Also:
Constant Field Values

BEZEL

public static final int BEZEL
A BEZEL style border, also the DEFAULT border for the BaseBorder class

See Also:
Constant Field Values

SIMPLE

public static final int SIMPLE
A SIMPLE style single color border

See Also:
Constant Field Values

EMBOSS

public static final int EMBOSS
A EMBOSS style border

See Also:
Constant Field Values

BUTTON

public static final int BUTTON
A BUTTON style border, uses the java.awt.SystemColor class control colors

See Also:
Constant Field Values

NONE

public static final int NONE
No border style shown

See Also:
Constant Field Values

DEFAULT

public static final int DEFAULT
Default border style shown

See Also:
Constant Field Values

RAISED

public static final int RAISED
Raised border lightSource

See Also:
Constant Field Values

LOWERED

public static final int LOWERED
Lowered border lightSource

See Also:
Constant Field Values

TOP_LEFT

public static final int TOP_LEFT
Top/left lightSource

See Also:
Constant Field Values

TOP_RIGHT

public static final int TOP_RIGHT
Top/right lightSource

See Also:
Constant Field Values

BOTTOM_RIGHT

public static final int BOTTOM_RIGHT
Bottom/right lightSource

See Also:
Constant Field Values

BOTTOM_LEFT

public static final int BOTTOM_LEFT
Bottom/left lightSource

See Also:
Constant Field Values
Constructor Detail

BaseBorder

public BaseBorder()
Default Constructor. Uses the BorderInterface.DEFAULT style, BorderInterface.RAISED lightSource, and 2 for the default borderWidth


BaseBorder

public BaseBorder(int style)
Constructor to create a BaseBorder with the specified style. Uses the BorderInterface.RAISED lightSource and 2 for the default borderWidth.

Parameters:
style - the style border to be drawn

BaseBorder

public BaseBorder(int style,
                  int ltSrc)
Constructor to create a BaseBorder with the specified style and lightSource. Uses 2 for the default borderWidth.

Parameters:
style - the style border to be drawn
ltSrc - the lightSource to draw the border with

BaseBorder

public BaseBorder(int style,
                  int ltSrc,
                  int width)
Constructor to create a BaseBorder with the specified style, lightSource and width. Border colors will be from the java.awt.SystemColor object.

Parameters:
style - the style border to be drawn
ltSrc - the lightSource to draw the border with
width - border width

BaseBorder

public BaseBorder(int style,
                  int ltSrc,
                  int width,
                  java.awt.Color base)
Constructor to create a BaseBorder with the specified style, lightSource, width, and base color. The Border colors will be created by using the brighter() and darker() methods on the base color.

Parameters:
style - the style border to be drawn
ltSrc - the lightSource to draw the border with
width - border width
base - base color for highlight and shadow colors of the border

BaseBorder

public BaseBorder(int style,
                  int ltSrc,
                  int width,
                  java.awt.Color base,
                  java.awt.Color highlight,
                  java.awt.Color shadow)
Constructor to create a BaseBorder with the specified style, lightSource, width, base color, highlight color, and shadow color.

Parameters:
style - the style border to be drawn
ltSrc - the lightSource to draw the border with
width - border width
base - color for when the simple style is used
highlight - the top/left color when the border is RAISED; the bottom/right color when the border is LOWERED.
shadow - the top/left color when the border is LOWERED; the bottom/right color when the border is RAISED.

BaseBorder

public BaseBorder(int style,
                  int ltSrc,
                  int width,
                  java.awt.Color base,
                  java.awt.Color highlight,
                  java.awt.Color shadow,
                  java.lang.String txt,
                  int align,
                  int margin,
                  java.awt.Font f)
Constructor to create a BaseBorder with the specified style, lightSource, width, base color, highlight color, and shadow color.

Parameters:
style - the style border to be drawn
ltSrc - the lightSource to draw the border with
width - border width
base - color for when the simple style is used
highlight - the top/left color when the border is RAISED; the bottom/right color when the border is LOWERED.
shadow - the top/left color when the border is LOWERED; the bottom/right color when the border is RAISED.
Method Detail

getExtendedBeanInfo

public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
Returns information used by the com.sas.beans.Introspector to augment the automatically introspected information about this BaseBorder.

Returns:
the ExtendedBeanInfo for this class

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  java.lang.Object oldValue,
                                  java.lang.Object newValue)
Supports reporting bound property changes. If oldValue and newValue are not equal and the PropertyChangeEvent listener list isn't empty, then fire a PropertyChange event to each listener. This method has an overloaded method for each primitive type. For example, here's how to write a bound property set method whose value is an int:
 public void setFoo(int newValue) {
     int oldValue = foo;
     foo = newValue;
     firePropertyChange("foo", oldValue, newValue);
 }
 

Parameters:
propertyName - the programmatic name of the property that was changed
oldValue - the old value of the property
newValue - the new value of the property
See Also:
PropertyChangeSupport

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               int oldValue,
                               int newValue)
Reports a bound property change.

See Also:
firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

getSidesPainted

public int getSidesPainted()
Get the ORed bit flags indicating which sides will be painted by the border.

Returns:
the ORed bit flags for the sides that will be painted.

setSidesPainted

public void setSidesPainted(int sides)
Set the ORed bit flags indicating which sides to paint.

Parameters:
sides - the ORed bit flags of the sides that will be painted.

drawBezel

public static void drawBezel(java.awt.Graphics g,
                             int x,
                             int y,
                             int width,
                             int height,
                             java.awt.Color topLeft,
                             java.awt.Color bottomRight,
                             int borderWidth)
Convenience method for drawing a bezel with the specified colors and border width.

Parameters:
g - the Graphics context
x - the x position of the border rectangle
y - the y position of the border rectangle
width - the width of the border rectangle
height - the height of the border rectangle
topLeft - the color used on the top and left sides
bottomRight - the color used on the bottom and right sides
borderWidth - the width of the bezel sides.

drawBezel

public static void drawBezel(java.awt.Graphics g,
                             int x,
                             int y,
                             int width,
                             int height,
                             java.awt.Color top,
                             java.awt.Color left,
                             java.awt.Color bottom,
                             java.awt.Color right,
                             int borderWidth,
                             int sides)
Convenience method for drawing a bezel with the specified colors and border width.

Parameters:
g - the Graphics context
x - the x position of the border rectangle
y - the y position of the border rectangle
width - the width of the border rectangle
height - the height of the border rectangle
top - the color used on the top sides
left - the color used on the left sides
bottom - the color used on the bottom sides
right - the color used on the right sides
borderWidth - the width of the bezel sides.
sides - the sides to be drawn.

drawEmboss

public static void drawEmboss(java.awt.Graphics g,
                              int x,
                              int y,
                              int width,
                              int height,
                              java.awt.Color top,
                              java.awt.Color bottom,
                              int borderWidth)
Convenience method for drawing an embossed border with the specified top and bottom colors and border width.

Parameters:
g - the Graphics context
x - the x position of the border rectangle
y - the y position of the border rectangle
width - the width of the border rectangle
height - the height of the border rectangle
top - the color used on the top part of the emboss
bottom - the color used on the bottom part of the emboss
borderWidth - the width of the bezel sides.

drawEmboss

public static void drawEmboss(java.awt.Graphics g,
                              int x,
                              int y,
                              int width,
                              int height,
                              java.awt.Color top,
                              java.awt.Color bottom,
                              int borderWidth,
                              int sides)
Convenience method for drawing an embossed border with the specified top and bottom colors and border width.

Parameters:
g - the Graphics context
x - the x position of the border rectangle
y - the y position of the border rectangle
width - the width of the border rectangle
height - the height of the border rectangle
top - the color used on the top part of the emboss
bottom - the color used on the bottom part of the emboss
borderWidth - the width of the bezel sides.
sides - the sides to be drawn.

drawInRect

public void drawInRect(java.awt.Graphics g,
                       java.awt.Rectangle rect)
Draws the Border within the specified rectangle Calls the abstract version of drawInRect() with null for the component

Parameters:
g - the Graphics context
rect - the rectangle to draw the border in

drawInRect

public void drawInRect(java.awt.Graphics g,
                       java.awt.Rectangle rect,
                       int lSource)
Convenience method to draw the Border within the specified rectangle with the specified lightSource. Calls the abstract version of drawInRect() with null for the component

Parameters:
g - the Graphics context
rect - the rectangle to draw the Border in
lSource - the lightSource the Border should use

drawInRect

public void drawInRect(java.awt.Graphics g,
                       int x,
                       int y,
                       int width,
                       int height)
Draw the Border within the specified rectangle. Calls the abstract version of drawInRect() with null for the component

Parameters:
g - the Graphics context
x - the x position of the border rectangle
y - the y position of the border rectangle
width - the width of the border rectangle
height - the height of the border rectangle

drawInRect

public void drawInRect(java.awt.Component comp,
                       java.awt.Graphics g,
                       int x,
                       int y,
                       int width,
                       int height)
Draw the Border within the specified rectangle on the specified component.

Parameters:
comp - the java.awt.Component to draw the border on, can be null
g - the Graphics context
x - the x position of the border rectangle
y - the y position of the border rectangle
width - the width of the border rectangle
height - the height of the border rectangle
See Also:
BorderInterface

getBorderWidth

public int getBorderWidth()
Get the width of the BaseBorder

Returns:
int value of the border width
See Also:
setBorderWidth(int)

getBaseColor

public java.awt.Color getBaseColor()
Gets the base color

Returns:
color of the border

getLightSource

public int getLightSource()
Gets the Light Source of the Border.

Returns:
one of the lightSource values from com.sas.visuals.BorderInterface
See Also:
BorderInterface

getStyle

public int getStyle()
Gets the style of the Border.

Returns:
NONE or DEFAULT or some id set by a subclass

getInsets

public java.awt.Insets getInsets()
Gets the Insets of this Border. Calls the abstract version of getInsets() with null for the component

Returns:
the Insets of the Border which always returns null.

getComponent

public java.awt.Component getComponent()
Get the component the border is drawn on. This is used only to find the font if one is not set.

Returns:
the component the border is drawn on
See Also:
setComponent(java.awt.Component)

getFont

public java.awt.Font getFont()
Get the font used to display the border text. Font may be null, in which case the border text will use the current font from the component passed in to the drawInRect() method.

Returns:
the font used in the border text
See Also:
setFont(java.awt.Font)

getBorderInsets

public java.awt.Insets getBorderInsets(java.awt.Component comp)
Get the Insets of the Border on the specified component.

Specified by:
getBorderInsets in interface javax.swing.border.Border
Overrides:
getBorderInsets in class javax.swing.border.AbstractBorder
Parameters:
comp - the component to draw the border on, can be null.
Returns:
the Insets of the Border.

getText

public java.lang.String getText()
Get the text to be displayed in the border.

Specified by:
getText in interface com.sas.lang.StringDataInterface
Returns:
the text that is displayed in the border
See Also:
setText(java.lang.String)

getTextAlignment

public int getTextAlignment()
Get the alignment of the text on the top line of the border: LEFT, RIGHT, or CENTER.

Returns:
the int value representing the orientation of text on the border
See Also:
setTextAlignment(int), Orientations

getTextGap

public int getTextGap()
Get the gap between the text and the border line.

Returns:
gap at the start and end of the text where the border is not drawn.
See Also:
setTextGap(int)

getTextMargin

public int getTextMargin()
Get the pixel margin for the text when it is aligned to the LEFT or the RIGHT side.

Returns:
the int value ot the text margin
See Also:
setTextMargin(int)

getBackgroundColor

public java.awt.Color getBackgroundColor()
Get the background Color used for this BaseBorder when text is drawn.

Returns:
the background color of the text
See Also:
setBackgroundColor(java.awt.Color)

getForegroundColor

public java.awt.Color getForegroundColor()
Get the foreground Color used for this BaseBorder when text is drawn.

Returns:
the foreground color of the text
See Also:
setForegroundColor(java.awt.Color)

getHighlightColor

public java.awt.Color getHighlightColor()
Get the highlight Color used for this BaseBorder.

Returns:
the highlight color of the base border
See Also:
setHighlightColor(java.awt.Color)

getShadowColor

public java.awt.Color getShadowColor()
Get the shadow Color used for this BaseBorder.

Returns:
the shadow color for this BaseBorder
See Also:
setShadowColor(java.awt.Color)

paintBorder

public void paintBorder(java.awt.Component c,
                        java.awt.Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paint the border on the given component.

Specified by:
paintBorder in interface javax.swing.border.Border
Overrides:
paintBorder in class javax.swing.border.AbstractBorder
Parameters:
g - the Graphics context
x - the x position of the border
y - the y position of the border
width - the width of the border
height - the height of the border

paintBorder

public static void paintBorder(java.awt.Graphics g,
                               int x,
                               int y,
                               int width,
                               int height,
                               java.awt.Color highlight,
                               java.awt.Color shadow,
                               int style,
                               int bWidth,
                               int lSource,
                               int sides)
Paint the border given all the major parameters to describe the border.

Parameters:
g - the Graphics context
x - the x position of the border
y - the y position of the border
width - the width of the border
height - the height of the border
highlight - the highlight color of the border
shadow - the shadow color of the border
style - the style of the border
bWidth - the border width of the border
lSource - the lightSource of the border
sides - the sides to be drawn on the border NOT IMPLEMENTED

setBorderWidth

public void setBorderWidth(int width)
Set the border width for this BaseBorder.

Parameters:
width - desired width in pixels
See Also:
getBorderWidth()

setStyle

public void setStyle(int s)
Sets the style of the Border.

Parameters:
s - NONE or DEFAULT or some id set by a subclass

setLightSource

public void setLightSource(int ltSrc)
Sets the type of the Border.

Parameters:
ltSrc - one of the lightSource values from com.sas.visuals.BorderInterface
See Also:
BorderInterface

setComponent

public void setComponent(java.awt.Component comp)
Set the component used to find the backgroundColor, foregroundColor, or font if they are not set.

Parameters:
comp - the component the border is to be drawn on
See Also:
getComponent()

setFont

public void setFont(java.awt.Font f)
Set the font to be used to display the text on the border. normal size. If the font is set to null, the font from the component passed to drawInRect() will be used. If that component is null the font from the component property will be used.

Parameters:
f - the font that the text is to be displayed in
See Also:
getFont()

setText

public void setText(java.lang.String txt)
Set the text to be displayed on the top area of the border.

Specified by:
setText in interface com.sas.lang.StringDataInterface
Parameters:
txt - text to be displayed on this BaseBorder
See Also:
getText()

setTextAlignment

public void setTextAlignment(int a)
Set the text alignment to CENTER, LEFT, or RIGHT for display on the top area of the border.

Parameters:
a - the int value CENTER, LEFT, or RIGHT to set the text alignment on border
See Also:
getTextAlignment()

setTextGap

public void setTextGap(int g)
Set the gap between the text and the border line.

Parameters:
g - the gap at the start and end of the text where the border is not drawn.
See Also:
getTextGap()

setTextMargin

public void setTextMargin(int m)
Set the margin between the edge of the border the text is aligned to and the text when the alignment is LEFT or RIGHT.

Parameters:
m - the desired int value in pixels for the border width
See Also:
getTextMargin()

setBackgroundColor

public void setBackgroundColor(java.awt.Color c)
Set the background Color for this BaseBorder, used as background for the text. If the backgroundColor is set to null, the backgroundColor from the component passed to drawInRect() will be used. If that component is null the backgroundColor from the component property will be used.

Parameters:
c - color to set background with
See Also:
getBackgroundColor()

setForegroundColor

public void setForegroundColor(java.awt.Color c)
Set the foreground Color for this BaseBorder, used as foreground for the text. If the foregroundColor is set to null, the foregroundColor from the component passed to drawInRect() will be used. If that component is null the foregroundColor from the component property will be used.

Parameters:
c - color to set the foreground with
See Also:
getForegroundColor()

setBaseColor

public void setBaseColor(java.awt.Color c)
Set the base Color for this BaseBorder. This will also set the highlightColor to baseColor.brighter() and the shadowColor to baseColor.darker().

Parameters:
c - base color for this BaseBorder
See Also:
getBaseColor()

setHighlightColor

public void setHighlightColor(java.awt.Color c)
Set the highlight Color for this BaseBorder. The use of the highlight color depends on the lightSource for this BaseBorder.

Parameters:
c - color represent the highlight color of the light source
See Also:
getHighlightColor()

setShadowColor

public void setShadowColor(java.awt.Color c)
Set the shadow Color for this BaseBorder. The use of the shadow color depends on the lightSource for this BaseBorder.

Parameters:
c - color of the shadow color of the BaseBorder
See Also:
getShadowColor()

paramString

protected java.lang.String paramString()
Used in the toString() method

See Also:
toString()

toString

public java.lang.String toString()
Returns a string with all this BaseBorder information, inccluding style, alignment, and entire border structure.

Overrides:
toString in class java.lang.Object
Returns:
string with all this BaseBorder information

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object item)
Check if an object is equal to this BaseBorder. All the properties of the BaseBorder are checked for equality except the component property. The component property will be different for almost all BaseBorder objects and doesn't change how the border is painted so it isn't checked. The component is now passed into the drawInRect() method so the property isn't needed.

Overrides:
equals in class java.lang.Object



Copyright © 2009 SAS Institute Inc. All Rights Reserved.