com.sas.visuals
Class TabBorder

com.sas.visuals.TabBorder
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.ComponentInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, com.sas.PublicClonable, com.sas.ViewInterface, BorderInterface, MultipleValueEventSourceInterface, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.lang.Cloneable, java.util.EventListener

public class TabBorder

TabBorder is a subclass of Border that draws a specific type of border for tabs. It has an orientation property that also affects how it is drawn.
Notes:


See Also:
BorderInterface, Serialized Form

Field Summary
static int BOTTOM
          BOTTOM Orientation value
protected  java.awt.Color darkShadowColor
           
protected  java.awt.Color highlightColor
           
static int LEFT
          LEFT Orientation value
protected  java.awt.Color lightHighlightColor
           
static int NONE
          NONE Orientation value
protected  int orientation
           
static int RIGHT
          RIGHT Orientation value
protected  java.awt.Color shadowColor
           
static int TOP
          TOP Orientation value
 
Fields inherited from class com.sas.visuals.Border
baseColor, baseColorJ, borderWidth, lightSource, RB_KEY, style
 
Fields inherited from interface com.sas.visuals.BorderInterface
BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, LOWERED, RAISED, TOP_LEFT, TOP_RIGHT
 
Constructor Summary
TabBorder()
          Default Constructor.
TabBorder(int orient)
          Constructor that sets the orientation.
 
Method Summary
 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.
 java.awt.Insets getInsets(java.awt.Component comp)
          Get the Insets of the Border on the specified component.
 int getOrientation()
          Get the orientation of the border.
 void setDarkShadowColor(java.awt.Color c)
          Set the darkShadow Color for this TabBorder.
 void setHighlightColor(java.awt.Color c)
          Set the highlight Color for this TabBorder.
 void setLightHighlightColor(java.awt.Color c)
          Set the highlight Color for this TabBorder.
 void setOrientation(int orient)
          Set the orientation of the border.
 void setShadowColor(java.awt.Color c)
          Set the shadow Color for this TabBorder.
 
Methods inherited from class com.sas.visuals.Border
clone, drawInRect, drawInRect, drawInRect, equals, getBaseColor, getBorderWidth, getBottomMargin, getExtendedBeanInfo, getInsets, getInteriorBounds, getInteriorBounds, getLeftMargin, getLightSource, getRightMargin, getStyle, getTopMargin, hashCode, paramString, setBaseColor, setBorderWidth, setLightSource, setStyle, toString
 

Field Detail

NONE

public static final int NONE
NONE Orientation value

See Also:
Constant Field Values

TOP

public static final int TOP
TOP Orientation value

See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
BOTTOM Orientation value

See Also:
Constant Field Values

LEFT

public static final int LEFT
LEFT Orientation value

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
RIGHT Orientation value

See Also:
Constant Field Values

orientation

protected int orientation

highlightColor

protected java.awt.Color highlightColor

lightHighlightColor

protected java.awt.Color lightHighlightColor

shadowColor

protected java.awt.Color shadowColor

darkShadowColor

protected java.awt.Color darkShadowColor
Constructor Detail

TabBorder

public TabBorder()
Default Constructor. Orientation is initially NONE.


TabBorder

public TabBorder(int orient)
Constructor that sets the orientation.

Parameters:
orient - the orientation of the border
Method Detail

getInsets

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

Specified by:
getInsets in interface BorderInterface
Specified by:
getInsets in class Border
Parameters:
comp - the component to draw the border on, can be null.
Returns:
the Insets of the Border.

getOrientation

public int getOrientation()
Get the orientation of the border.

Returns:
the orientation can be NONE, TOP, LEFT, BOTTOM, or RIGHT.

setOrientation

public void setOrientation(int orient)
Set the orientation of the border.

Parameters:
orient - the new orientation value one of: NONE, TOP, LEFT, BOTTOM, or RIGHT.

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.

Specified by:
drawInRect in interface BorderInterface
Specified by:
drawInRect in class Border
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

setLightHighlightColor

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


setDarkShadowColor

public void setDarkShadowColor(java.awt.Color c)
Set the darkShadow Color for this TabBorder. The use of the darkShadow color depends on the lightSource for this TabBorder.


setHighlightColor

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


setShadowColor

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.