|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.java.balloontip.positioners.BalloonTipPositioner
net.java.balloontip.positioners.BasicBalloonTipPositioner
public abstract class BasicBalloonTipPositioner
Provides common functionality for the positioner classes LeftAbovePositioner, LeftBelowPositioner, RightAbovePositioner and RightBelowPositioner
Field Summary | |
---|---|
protected float |
attachLocationX
|
protected float |
attachLocationY
|
protected boolean |
fixedAttachLocation
|
protected boolean |
flipX
|
protected boolean |
flipY
|
protected int |
hOffset
|
protected int |
minimumHorizontalOffset
|
protected boolean |
offsetCorrection
|
protected boolean |
orientationCorrection
|
protected int |
preferredHorizontalOffset
|
protected int |
preferredVerticalOffset
|
protected int |
x
|
protected int |
y
|
Fields inherited from class net.java.balloontip.positioners.BalloonTipPositioner |
---|
balloonTip |
Constructor Summary | |
---|---|
BasicBalloonTipPositioner(int hO,
int vO)
Constructor |
Method Summary | |
---|---|
protected void |
applyOffsetCorrection()
|
void |
determineAndSetLocation(java.awt.Rectangle attached)
Determine and set the current location of the balloon tip |
protected abstract void |
determineLocation(java.awt.Rectangle attached)
|
void |
enableFixedAttachLocation(boolean fixedAttachLocation)
Set whether the tip should have a fixed location |
void |
enableOffsetCorrection(boolean offsetCorrection)
Set offset correction |
void |
enableOrientationCorrection(boolean orientationCorrection)
Set orientation correction |
float |
getAttachLocationX()
Returns the percentage that determines the X-coordinate of the tip within the attached component (whereas 0.0 is the left side and 1.0 is the right side) |
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 |
getPreferredHorizontalOffset()
Retrieve the preferred horizontal offset |
int |
getPreferredVerticalOffset()
Retrieve the preferred vertical offset |
java.awt.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 |
isOffsetCorrected()
Is offset correction enabled? |
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 |
setPreferredHorizontalOffset(int preferredHorizontalOffset)
Set the preferred horizontal offset |
void |
setPreferredVerticalOffset(int preferredVerticalOffset)
Set the preferred horizontal offset |
Methods inherited from class net.java.balloontip.positioners.BalloonTipPositioner |
---|
finalize, getBalloonTip, setBalloonTip |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int x
protected int y
protected int hOffset
protected boolean flipX
protected boolean flipY
protected int preferredHorizontalOffset
protected int preferredVerticalOffset
protected int minimumHorizontalOffset
protected boolean offsetCorrection
protected boolean orientationCorrection
protected boolean fixedAttachLocation
protected float attachLocationX
protected float attachLocationY
Constructor Detail |
---|
public BasicBalloonTipPositioner(int hO, int vO)
hO
- Preferred horizontal offsetvO
- Preferred vertical offsetMethod Detail |
---|
protected void onStyleChange()
BalloonTipPositioner
onStyleChange
in class BalloonTipPositioner
public int getPreferredHorizontalOffset()
public void setPreferredHorizontalOffset(int preferredHorizontalOffset)
preferredHorizontalOffset
- public int getPreferredVerticalOffset()
public void setPreferredVerticalOffset(int preferredVerticalOffset)
preferredVerticalOffset
- public boolean isOffsetCorrected()
public void enableOffsetCorrection(boolean offsetCorrection)
offsetCorrection
- enabled if truepublic 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 getAttachLocationX()
public float getAttachLocationY()
public void setAttachLocation(float attachLocationX, float attachLocationY)
attachLocationX
- a number from 0.0 to 1.0 (whereas 0 is the left side; 1 is the right side)attachLocationY
- a number from 0.0 to 1.0 (whereas 0 is the top; 1 is the bottom)public java.awt.Point getTipLocation()
BalloonTipPositioner
getTipLocation
in class BalloonTipPositioner
protected void applyOffsetCorrection()
public void determineAndSetLocation(java.awt.Rectangle attached)
BalloonTipPositioner
determineAndSetLocation
in class BalloonTipPositioner
attached
- the balloon tip is attached to this rectangleprotected abstract void determineLocation(java.awt.Rectangle attached)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |