JIDE 3.5.15

com.jidesoft.tooltip.shapes
Class OvalShape

java.lang.Object
  extended by com.jidesoft.tooltip.shapes.OvalShape
All Implemented Interfaces:
BalloonShape

public class OvalShape
extends Object
implements BalloonShape

A balloon shape implementation, which is a simple ellipse.


Constructor Summary
OvalShape()
           
 
Method Summary
 Shape createOutline(Dimension balloonSize, Dimension contentSize)
          Create the ellipse outline.
 double getEdgeDistance(Point pixel, BalloonTip balloonTip)
          Get the edge distance
 Point getHotSpot(Dimension balloonSize)
          Gets the arrow vertex position.
 Insets getInsets(Dimension contentSize)
          Get the insets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OvalShape

public OvalShape()
Method Detail

createOutline

public Shape createOutline(Dimension balloonSize,
                           Dimension contentSize)
Create the ellipse outline.

Specified by:
createOutline in interface BalloonShape
Parameters:
balloonSize - the preferred size of the balloon.
contentSize - the preferred size of the content
Returns:
the balloon the shape

getHotSpot

public Point getHotSpot(Dimension balloonSize)
Description copied from interface: BalloonShape
Gets the arrow vertex position. BalloonTip has an arrow pointing out. The vertex should point to the place that needs the tooltip.

Specified by:
getHotSpot in interface BalloonShape
Parameters:
balloonSize - the preferred size of the balloon.
Returns:
the arrow vertex position.

getInsets

public Insets getInsets(Dimension contentSize)
Get the insets.

Specified by:
getInsets in interface BalloonShape
Parameters:
contentSize - the preferred size of the content component.
Returns:
the insets around the content component, including the outline shape.

getEdgeDistance

public double getEdgeDistance(Point pixel,
                              BalloonTip balloonTip)
Get the edge distance

Specified by:
getEdgeDistance in interface BalloonShape
Parameters:
pixel - current point in the balloon coordinate system.
balloonTip - the balloon tip.
Returns:
the closest or effective distance of the pixel to the balloon outline.

JIDE 3.5.15