edu.brook.ascape.util
Class ShadowBorder
java.lang.Object
|
+--javax.swing.border.AbstractBorder
|
+--javax.swing.border.BevelBorder
|
+--edu.brook.ascape.util.ShadowBorder
- public class ShadowBorder
- extends javax.swing.border.BevelBorder
A class which implements a shadow border, or BevelBorder of thickness 1. Copied from sun's BevelBorder.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is appropriate
for short term storage or RMI between applications running the same
version of Swing. A future release of Swing will provide support for
long term persistence.
- Version:
- 1.2 7/16/99
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.border.BevelBorder |
bevelType,
highlightInner,
highlightOuter,
LOWERED,
RAISED,
shadowInner,
shadowOuter |
|
Constructor Summary |
ShadowBorder(int bevelType)
Creates a bevel border with the specified type and whose
colors will be derived from the background color of the
component passed into the paintBorder method. |
ShadowBorder(int bevelType,
java.awt.Color highlight,
java.awt.Color shadow)
Creates a bevel border with the specified type, highlight and
shadow colors. |
ShadowBorder(int bevelType,
java.awt.Color highlightOuter,
java.awt.Color highlightInner,
java.awt.Color shadowOuter,
java.awt.Color shadowInner)
Creates a bevel border with the specified type, highlight
shadow colors. |
|
Method Summary |
java.awt.Insets |
getBorderInsets(java.awt.Component c)
Returns the insets of the border. |
java.awt.Insets |
getBorderInsets(java.awt.Component c,
java.awt.Insets insets)
Reinitialize the insets parameter with this Border's current Insets. |
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paints the border for the specified component with the specified
position and size. |
protected void |
paintLoweredBevel(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
|
protected void |
paintRaisedBevel(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
|
| Methods inherited from class javax.swing.border.BevelBorder |
getBevelType,
getHighlightInnerColor,
getHighlightOuterColor,
getShadowInnerColor,
getShadowOuterColor,
isBorderOpaque |
| Methods inherited from class javax.swing.border.AbstractBorder |
getInteriorRectangle,
getInteriorRectangle |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ShadowBorder
public ShadowBorder(int bevelType)
- Creates a bevel border with the specified type and whose
colors will be derived from the background color of the
component passed into the paintBorder method.
- Parameters:
bevelType - the type of bevel for the border
ShadowBorder
public ShadowBorder(int bevelType,
java.awt.Color highlight,
java.awt.Color shadow)
- Creates a bevel border with the specified type, highlight and
shadow colors.
- Parameters:
bevelType - the type of bevel for the borderhighlight - the color to use for the bevel highlightshadow - the color to use for the bevel shadow
ShadowBorder
public ShadowBorder(int bevelType,
java.awt.Color highlightOuter,
java.awt.Color highlightInner,
java.awt.Color shadowOuter,
java.awt.Color shadowInner)
- Creates a bevel border with the specified type, highlight
shadow colors.
- Parameters:
bevelType - the type of bevel for the borderhighlightOuter - the color to use for the bevel outer highlighthighlightInner - the color to use for the bevel inner highlightshadowOuter - the color to use for the bevel outer shadowshadowInner - the color to use for the bevel inner shadow
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c)
- Returns the insets of the border.
- Parameters:
c - the component for which this border insets value applies- Overrides:
- getBorderInsets in class javax.swing.border.BevelBorder
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c,
java.awt.Insets insets)
- Reinitialize the insets parameter with this Border's current Insets.
- Parameters:
c - the component for which this border insets value appliesinsets - the object to be reinitialized- Overrides:
- getBorderInsets in class javax.swing.border.BevelBorder
paintBorder
public void paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
- Paints the border for the specified component with the specified
position and size.
- Parameters:
c - the component for which this border is being paintedg - the paint graphicsx - the x position of the painted bordery - the y position of the painted borderwidth - the width of the painted borderheight - the height of the painted border- Overrides:
- paintBorder in class javax.swing.border.BevelBorder
paintRaisedBevel
protected void paintRaisedBevel(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
- Overrides:
- paintRaisedBevel in class javax.swing.border.BevelBorder
paintLoweredBevel
protected void paintLoweredBevel(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
- Overrides:
- paintLoweredBevel in class javax.swing.border.BevelBorder