public class CenteredPositioner extends BalloonTipPositioner
| Modifier and Type | Field and Description |
|---|---|
protected float |
attachLocationY |
protected boolean |
fixedAttachLocation |
protected boolean |
flipY |
protected boolean |
orientationCorrection |
protected int |
preferredVerticalOffset |
protected int |
x |
protected int |
y |
balloonTip| Constructor and Description |
|---|
CenteredPositioner(int vO)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
determineAndSetLocation(Rectangle attached)
Determine and set the current location of the balloon tip
|
protected void |
determineLocation(Rectangle attached) |
void |
enableFixedAttachLocation(boolean fixedAttachLocation)
Set whether the tip should have a fixed location
|
void |
enableOrientationCorrection(boolean orientationCorrection)
Set orientation correction
|
float |
getAttachLocationY()
Returns the percentage that determines the Y-coordinate of the tip within the attached component
(whereas 0.0 is the top and 1.0 is the bottom)
|
int |
getPreferredVerticalOffset()
Retrieve the preferred vertical offset
|
Point |
getTipLocation()
Find the current location of the balloon's tip, relative to the top-level container
|
boolean |
isFixedAttachLocation()
Does the tip have a fixed location?
|
boolean |
isOrientationCorrected()
Is orientation correction enabled?
|
protected void |
onStyleChange()
This method is called whenever the balloon tip's style changes.
|
void |
setAttachLocation(float attachLocationX,
float attachLocationY)
Set where the tip should be located, relative to the component the balloon is attached to.
|
void |
setPreferredVerticalOffset(int preferredVerticalOffset)
Set the preferred horizontal offset
|
finalize, getBalloonTip, setBalloonTipprotected int x
protected int y
protected boolean flipY
protected int preferredVerticalOffset
protected boolean orientationCorrection
protected boolean fixedAttachLocation
protected float attachLocationY
public CenteredPositioner(int vO)
vO - preferred vertical offsetpublic int getPreferredVerticalOffset()
public void setPreferredVerticalOffset(int preferredVerticalOffset)
preferredVerticalOffset - preferred vertical offset (in pixels)public boolean isOrientationCorrected()
public void enableOrientationCorrection(boolean orientationCorrection)
orientationCorrection - enabled if truepublic boolean isFixedAttachLocation()
public void enableFixedAttachLocation(boolean fixedAttachLocation)
fixedAttachLocation - the tip has a fixed location if truepublic float getAttachLocationY()
public void setAttachLocation(float attachLocationX,
float attachLocationY)
attachLocationY - a number from 0.0 to 1.0 (whereas 0 is the top; 1 is the bottom)public Point getTipLocation()
BalloonTipPositionergetTipLocation in class BalloonTipPositionerpublic void determineAndSetLocation(Rectangle attached)
BalloonTipPositionerdetermineAndSetLocation in class BalloonTipPositionerattached - the rectangle to which the balloon tip attaches itselfprotected void determineLocation(Rectangle attached)
protected void onStyleChange()
BalloonTipPositioneronStyleChange in class BalloonTipPositioner