|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.ui.border.ShadowBorder
public final class ShadowBorder
A Border
that draws a drop shadow for a
component.
This border must be used on a transparent component.
TransparentBorderComponent
is a convenient
container you can use in conjunction with this class.
|-| growth |-| xOffset |-| xOffset +-------------------+ +-----------------+ | | | | | | | | |---+ +-----------------+
TransparentBorderComponent
Constructor Summary | |
---|---|
ShadowBorder()
Constructs a ShadowBorder with the following defaults: |
|
ShadowBorder(int arcSize,
int xOffset,
int yOffset,
int growth,
double shadeIntensity)
Constructs a ShadowBorder |
Method Summary | |
---|---|
int |
getArcSize()
Returns the size of the arc for the corners of the shadow rectangle. |
java.awt.Insets |
getBorderInsets(java.awt.Component c)
|
java.awt.Color |
getColor()
Returns the color of the shadow. |
int |
getGrowth()
Returns the number of pixels to grow the shadow rectangle both horizontally and vertically compared to the component rectangle. |
double |
getIntensity()
Returns the intensity of the shadow. |
int |
getXOffset()
Returns the number of pixels by which the shadow rectangle is shifted horizontally from the origin of the component rectangle. |
int |
getYOffset()
Returns the number of pixels by which the shadow rectangle is shifted vertically from the origin of the component rectangle. |
boolean |
isBorderOpaque()
|
void |
paintBorder(java.awt.Component c,
java.awt.Graphics gAWT,
int x,
int y,
int width,
int height)
|
void |
setArcSize(int arcSize)
Determines the size of the arc for the corners of the shadow rectangle. |
void |
setColor(java.awt.Color color)
Sets the color of the shadow. |
void |
setGrowth(int growth)
Sets the number of pixels to grow the shadow rectangle both horizontally and vertically compared to the component rectangle. |
void |
setIntensity(double intensity)
Sets the intensity of the shadow. |
void |
setXOffset(int offset)
Sets the number of pixels by which the shadow rectangle will be shifted horizontally from the origin of the component rectangle. |
void |
setYOffset(int offset)
Sets the number of pixels by which the shadow rectangle will be shifted vertically from the origin of the component rectangle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShadowBorder()
arcSize = 20 xOffset = 3 yOffset = 3 growth = 4 shadeIntensity = 1d
public ShadowBorder(int arcSize, int xOffset, int yOffset, int growth, double shadeIntensity)
arcSize
- the size of the arc for the rounded corners of the shadow
rectangle. Must be >= 0.xOffset
- the number of pixels to offset the shadow horizontally.yOffset
- the number of pixels to offset the shadow vertically.growth
- specifies a number of pixels by which the shadow area
should be enlarged both horizontally and vertically compared to the
component rectangle.shadeIntensity
- The intensity of the shade. A double value between
0.0 and 1.0.Method Detail |
---|
public void paintBorder(java.awt.Component c, java.awt.Graphics gAWT, int x, int y, int width, int height)
paintBorder
in interface javax.swing.border.Border
public java.awt.Insets getBorderInsets(java.awt.Component c)
getBorderInsets
in interface javax.swing.border.Border
public boolean isBorderOpaque()
isBorderOpaque
in interface javax.swing.border.Border
public void setXOffset(int offset)
offset
- The number of pixels by which the shadow is shifted
horizontally. A positive value indicates a shift to the right, a
negative value indicates a shift to the left.public int getXOffset()
public void setYOffset(int offset)
offset
- The number of pixels by which the shadow is shifted
vertically. A positive value indicates a shift down, a
negative value indicates a shift up.public int getYOffset()
public void setGrowth(int growth)
growth
- the number of pixels by which the shadow rectangle grows.
A positive value indicates growth, a negative value indicates that the
shadow rectangle is smaller than the component rectangle.public int getGrowth()
public void setArcSize(int arcSize)
arcSize
- The size of the arc that rounds off the corners. Must be
a positive integer or 0.
java.lang.IllegalArgumentException
- if arcSize is < 0.RoundRectangle2D}
public int getArcSize()
public void setIntensity(double intensity)
intensity
- a value between 0 and 1.
java.lang.IllegalArgumentException
- if intensity is not in the
range 0 to 1.public double getIntensity()
public java.awt.Color getColor()
black
.
public void setColor(java.awt.Color color)
black
.
color
- the color of the shadow. May be null.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |