JIDE 3.5.15

com.jidesoft.tooltip.shadows
Class PerspectiveShadow

java.lang.Object
  extended by com.jidesoft.tooltip.shadows.PerspectiveShadow
All Implemented Interfaces:
ShadowStyle
Direct Known Subclasses:
LeftBottomBackward, LeftBottomForward, RightBottomBackward, RightBottomForward

public abstract class PerspectiveShadow
extends Object
implements ShadowStyle

Perspective shadow is shadow which has perspective casting effect.


Field Summary
protected  double _xRatio
          The shadow shearness on the x-axis direction.
protected  double _yRatio
          The shadow shearness on the y-axis direction.
 
Constructor Summary
PerspectiveShadow()
          Creates a new instance of LeftBottomShadow
 
Method Summary
 BufferedImage createShadow(BufferedImage image, BalloonTip balloonTip)
          Create shadow image using the background image of the balloon tip.
 Dimension getShadowSize(Dimension size)
          Get the size of shadow according to the balloon size.
 double getXRatio()
           
 double getYRatio()
           
 void setXRatio(double xRatio)
           
 void setYRatio(double yRatio)
           
protected abstract  Point translatePixel(int x, int y, int w, int h)
           
 
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

_yRatio

protected double _yRatio
The shadow shearness on the y-axis direction.


_xRatio

protected double _xRatio
The shadow shearness on the x-axis direction.

Constructor Detail

PerspectiveShadow

public PerspectiveShadow()
Creates a new instance of LeftBottomShadow

Method Detail

createShadow

public BufferedImage createShadow(BufferedImage image,
                                  BalloonTip balloonTip)
Description copied from interface: ShadowStyle
Create shadow image using the background image of the balloon tip.

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

translatePixel

protected abstract Point translatePixel(int x,
                                        int y,
                                        int w,
                                        int h)

getYRatio

public double getYRatio()

setYRatio

public void setYRatio(double yRatio)

getXRatio

public double getXRatio()

setXRatio

public void setXRatio(double xRatio)

JIDE 3.5.15