JIDE 3.5.15

com.jidesoft.tooltip.shadows
Class DropShadow

java.lang.Object
  extended by com.jidesoft.tooltip.shadows.DropShadow
All Implemented Interfaces:
ShadowStyle
Direct Known Subclasses:
LeftBottomDrop, LeftTopDrop, RightBottomDrop, RightTopDrop

public abstract class DropShadow
extends Object
implements ShadowStyle

Drop shadow is a shadow style which does not have perspective effect. It casts the shadow to a parallel plain.


Field Summary
protected  double _scale
          Scale of the shadow, relative to the balloon size.
protected  int _xOffset
          The shadow shearness on the x-axis direction.
protected  int _yOffset
          The shadow shearness on the y-axis direction.
 
Constructor Summary
DropShadow()
          Creates a new instance of LeftBottomShadow
 
Method Summary
 BufferedImage createShadow(BufferedImage image, BalloonTip balloonTip)
          Creating the shadow image.
 double getScale()
           
 Dimension getShadowSize(Dimension size)
          Get the size of shadow according to the balloon size.
 int getXOffset()
           
 int getYOffset()
           
 void setScale(double scale)
           
 void setXOffset(int xOffset)
           
 void setYOffset(int yOffset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jidesoft.tooltip.ShadowStyle
layout
 

Field Detail

_yOffset

protected int _yOffset
The shadow shearness on the y-axis direction.


_xOffset

protected int _xOffset
The shadow shearness on the x-axis direction.


_scale

protected double _scale
Scale of the shadow, relative to the balloon size.

Constructor Detail

DropShadow

public DropShadow()
Creates a new instance of LeftBottomShadow

Method Detail

createShadow

public BufferedImage createShadow(BufferedImage image,
                                  BalloonTip balloonTip)
Creating the shadow image. Darken specific area including the inner of the tip and the egdes.

Specified by:
createShadow in interface ShadowStyle
Parameters:
image - the background image of the balloon tip
balloonTip - the balloon tip.
Returns:
the shadow image of the balloon tip.

getShadowSize

public Dimension getShadowSize(Dimension size)
Description copied from interface: ShadowStyle
Get the size of shadow according to the balloon size.

Specified by:
getShadowSize in interface ShadowStyle
Parameters:
size - the balloon size.
Returns:
the shadow size

getYOffset

public int getYOffset()

setYOffset

public void setYOffset(int yOffset)

getXOffset

public int getXOffset()

setXOffset

public void setXOffset(int xOffset)

getScale

public double getScale()

setScale

public void setScale(double scale)

JIDE 3.5.15