|
JFreeChart 1.0.14-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.chart.util.DefaultShadowGenerator
public class DefaultShadowGenerator
A default implementation of the ShadowGenerator
interface, based on
code in a
blog
post by Romain Guy.
Constructor Summary | |
---|---|
DefaultShadowGenerator()
Creates a new instance with default attributes. |
|
DefaultShadowGenerator(int size,
Color color,
float opacity,
int distance,
double angle)
Creates a new instance with the specified attributes. |
Method Summary | |
---|---|
protected void |
applyShadow(BufferedImage image)
Applies a shadow to the image. |
int |
calculateOffsetX()
Calculates the x-offset for drawing the shadow image relative to the source. |
int |
calculateOffsetY()
Calculates the y-offset for drawing the shadow image relative to the source. |
BufferedImage |
createDropShadow(BufferedImage source)
Creates and returns an image containing the drop shadow for the specified source image. |
boolean |
equals(Object obj)
Tests this object for equality with an arbitrary object. |
double |
getAngle()
Returns the shadow offset angle (in radians). |
int |
getDistance()
Returns the shadow offset distance. |
Color |
getShadowColor()
Returns the shadow color. |
float |
getShadowOpacity()
Returns the shadow opacity. |
int |
getShadowSize()
Returns the shadow size. |
int |
hashCode()
Returns a hash code for this instance. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultShadowGenerator()
public DefaultShadowGenerator(int size, Color color, float opacity, int distance, double angle)
size
- the shadow size.color
- the shadow color.opacity
- the shadow opacity.distance
- the shadow offset distance.angle
- the shadow offset angle (in radians).Method Detail |
---|
public int getShadowSize()
public Color getShadowColor()
null
).public float getShadowOpacity()
public int getDistance()
public double getAngle()
public int calculateOffsetX()
calculateOffsetX
in interface ShadowGenerator
public int calculateOffsetY()
calculateOffsetY
in interface ShadowGenerator
public BufferedImage createDropShadow(BufferedImage source)
createDropShadow
in interface ShadowGenerator
source
- the source image.
protected void applyShadow(BufferedImage image)
image
- the image.public boolean equals(Object obj)
equals
in class Object
obj
- the object (null
permitted).
public int hashCode()
hashCode
in class Object
|
JFreeChart 1.0.14-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |