net.java.balloontip.positioners
Class BalloonTipPositioner

java.lang.Object
  extended by net.java.balloontip.positioners.BalloonTipPositioner
Direct Known Subclasses:
BasicBalloonTipPositioner, CenteredPositioner

public abstract class BalloonTipPositioner
extends java.lang.Object

A BalloonTipPositioner is used to determine the position of a BalloonTip Note: If you change a positioner's settings, the changes may not be visible until the balloon tip is redrawn.

Author:
Tim Molderez

Field Summary
protected  BalloonTip balloonTip
           
 
Constructor Summary
BalloonTipPositioner()
          Default constructor
 
Method Summary
abstract  void determineAndSetLocation(java.awt.Rectangle attached)
          Determine and set the current location of the balloon tip
protected  void finalize()
           
 BalloonTip getBalloonTip()
          Retrieve the balloon tip that uses this positioner
abstract  java.awt.Point getTipLocation()
          Find the current location of the balloon's tip, relative to the top-level container
protected abstract  void onStyleChange()
          This method is called whenever the balloon tip's style changes.
 void setBalloonTip(BalloonTip balloonTip)
          This method is meant only to be used by BalloonTip!
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

balloonTip

protected BalloonTip balloonTip
Constructor Detail

BalloonTipPositioner

public BalloonTipPositioner()
Default constructor

Method Detail

getBalloonTip

public final BalloonTip getBalloonTip()
Retrieve the balloon tip that uses this positioner

Returns:
The balloon tip that uses this positioner

setBalloonTip

public final void setBalloonTip(BalloonTip balloonTip)
This method is meant only to be used by BalloonTip! A BalloonTip must call this method at the end of its construction (or when it's swapping for a new BalloonTipPositioner).

Parameters:
balloonTip - the balloon tip

getTipLocation

public abstract java.awt.Point getTipLocation()
Find the current location of the balloon's tip, relative to the top-level container

Returns:
The location of the tip

determineAndSetLocation

public abstract void determineAndSetLocation(java.awt.Rectangle attached)
Determine and set the current location of the balloon tip

Parameters:
attached - the balloon tip is attached to this rectangle

onStyleChange

protected abstract void onStyleChange()
This method is called whenever the balloon tip's style changes. The positioner will ensure the new style is set up properly.


finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable


http://balloontip.java.net/