|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.visuals.Border
public abstract class Border
Border is an abstract class to draw borders around components.
There are two abstract methods that need to be overridden and then the
Border can be used by components that support a border property.
A style can be set to make changes to borders, without having to write a class
for each type of Border.
Notes:
BaseBorder,
BorderInterface,
Serialized Form| Field Summary | |
|---|---|
protected Color |
baseColor
not used |
protected java.awt.Color |
baseColorJ
color value for the base color of the border |
protected int |
borderWidth
int value representing the width of the border |
protected int |
lightSource
int value (TOP_LEFT ) representing the light source, derived from com.sas.visuals.BorderInterface |
static java.lang.String |
RB_KEY
|
protected int |
style
int value representing the style of the border intially set to NONE Derived from com.sas.geometry.Orientations |
| Fields inherited from interface com.sas.visuals.BorderInterface |
|---|
BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, LOWERED, NONE, RAISED, TOP_LEFT, TOP_RIGHT |
| Constructor Summary | |
|---|---|
Border()
Default Constructor |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Returns a Border clone of the original Border component. |
abstract 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 object)
|
java.awt.Color |
getBaseColor()
Gets the base color |
int |
getBorderWidth()
Gets the border width. |
int |
getBottomMargin()
Gets the width of the Border's bottom side. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Returns information used by the com.sas.beans.Introspector to
augment the automatically introspected information about this Border. |
java.awt.Insets |
getInsets()
Gets the Insets of this Border. |
abstract java.awt.Insets |
getInsets(java.awt.Component comp)
Gets the Insets of the Border on the specified component. |
java.awt.Rectangle |
getInteriorBounds(int x,
int y,
int width,
int height)
Gets the Border's interior using the given rectangle. |
java.awt.Rectangle |
getInteriorBounds(java.awt.Rectangle exterior)
Gets the Border's interior bounds using the given rectangle. |
int |
getLeftMargin()
Gets the width of the Border's left side. |
int |
getLightSource()
Gets the Light Source of the Border. |
int |
getRightMargin()
Gets the width of the Border's right side. |
int |
getStyle()
Gets the style of the Border. |
int |
getTopMargin()
Gets the width of the Border's top side. |
int |
hashCode()
|
protected java.lang.String |
paramString()
Used in the toString method |
void |
setBaseColor(java.awt.Color c)
Sets the base color. |
void |
setBorderWidth(int width)
Sets the border width. |
void |
setLightSource(int ltSrc)
Sets the type of the Border. |
void |
setStyle(int s)
Sets the style of the Border. |
java.lang.String |
toString()
Returns the border information with insets |
| Field Detail |
|---|
public static final java.lang.String RB_KEY
protected int lightSource
protected int style
protected int borderWidth
protected Color baseColor
protected java.awt.Color baseColorJ
| Constructor Detail |
|---|
public Border()
| Method Detail |
|---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
com.sas.beans.Introspector to
augment the automatically introspected information about this Border.
public void drawInRect(java.awt.Graphics g,
java.awt.Rectangle rect)
g - the Graphics contextrect - the rectangle to draw the border in
public void drawInRect(java.awt.Graphics g,
java.awt.Rectangle rect,
int lSource)
g - the Graphics contextrect - the rectangle to draw the Border inlSource - the lightSource the Border should use
public void drawInRect(java.awt.Graphics g,
int x,
int y,
int width,
int height)
drawInRect in interface BorderInterfaceg - the Graphics contextx - the x position of the border rectangley - the y position of the border rectanglewidth - the width of the border rectangleheight - the height of the border rectangle
public abstract void drawInRect(java.awt.Component comp,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
drawInRect in interface BorderInterfacecomp - the java.awt.Component to draw the border on, can be nullg - the Graphics contextx - the x position of the border rectangley - the y position of the border rectanglewidth - the width of the border rectangleheight - the height of the border rectangleBorderInterfacepublic java.awt.Color getBaseColor()
public int getBorderWidth()
getBorderWidth in interface BorderInterfacepublic java.awt.Insets getInsets()
getInsets in interface BorderInterfacenull.public abstract java.awt.Insets getInsets(java.awt.Component comp)
getInsets in interface BorderInterfacecomp - the component to draw the border on, can be null.
public java.awt.Rectangle getInteriorBounds(java.awt.Rectangle exterior)
exterior - the exterior bounds of the border.
public java.awt.Rectangle getInteriorBounds(int x,
int y,
int width,
int height)
x - the x position of the exterior rectangley - the y position of the exterior rectanglewidth - the width of the exterior rectangleheight - the height of the exterior rectangle
public int getLightSource()
getLightSource in interface BorderInterfaceBorderInterfacepublic int getStyle()
getStyle in interface BorderInterfacepublic int getLeftMargin()
public int getBottomMargin()
public int getRightMargin()
public int getTopMargin()
public void setBaseColor(java.awt.Color c)
c - the desired border colorpublic void setBorderWidth(int width)
setBorderWidth in interface BorderInterfacewidth - the desired border widthpublic void setStyle(int s)
setStyle in interface BorderInterfaces - NONE or DEFAULT or some id set by a subclasspublic void setLightSource(int ltSrc)
setLightSource in interface BorderInterfaceltSrc - one of the lightSource values from com.sas.visuals.BorderInterfaceBorderInterfaceprotected java.lang.String paramString()
toString()public java.lang.String toString()
toString in class java.lang.Object
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface com.sas.PublicClonableclone in class Componentjava.lang.CloneNotSupportedException - if it component cannot be cloned.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Object
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||