|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.tooltip.shapes.RoundedRectangularBalloonShape
public class RoundedRectangularBalloonShape
A balloon shape implemenation which implements the rounded rectangle as the balloon shape.
Field Summary | |
---|---|
protected double |
_arrowLeftRatio
The offset ratio of the sticking arrow to left side of the popup. |
protected double |
_arrowRightRatio
The offset ratio of the sticking arrow to right side of the popup. |
protected double |
_balloonSizeRatio
The size ratio that a balloon in the whole popup. |
protected int |
_cornerSize
The edge or corner size |
protected double |
_vertexPosition
The offset ratio of the sticking arrow's vertex relative to the left side of the popup. |
Constructor Summary | |
---|---|
RoundedRectangularBalloonShape()
|
Method Summary | |
---|---|
Shape |
createOutline(Dimension balloonSize,
Dimension contentSize)
Create the outline of the balloon. |
double |
getArrowLeftRatio()
Gets the ratio between the distance of the border to the arrow leading side and the whole balloon size. |
double |
getArrowRightRatio()
Gets the ratio between the distance of the border to the arrow trailing side and the whole balloon size. |
double |
getBalloonSizeRatio()
Gets the ratio between the balloon height and the balloon + arrow height. |
int |
getCornerSize()
Gets the corner size of the balloon area. |
static double |
getDistance(Point p,
Point leftVertex,
Point rightVertex,
Point topVertex,
int cornerSize,
boolean contained)
|
double |
getEdgeDistance(Point pixel,
BalloonTip balloonTip)
Caculate the distance of the specified pixel to the balloon tip egde. |
Point |
getHotSpot(Dimension balloonSize)
Gets the arrow vertex position. |
Insets |
getInsets(Dimension contentSize)
Get its insets arround the content component |
int |
getPosition()
Gets the balloon tip's position : TOP, RIGHT, BOTTOM, LEFT. |
protected int |
getRoundedCornerSize()
|
double |
getVertexPosition()
Gets the vertex horizontal or vertical position. |
void |
setArrowLeftRatio(double arrowLeftRatio)
Sets the ratio between the distance of the border to the arrow leading side and the whole balloon size. |
void |
setArrowRightRatio(double arrowRightRatio)
Sets the ratio between the distance of the border to the arrow trailing side and the whole balloon size. |
void |
setBalloonSizeRatio(double balloonSizeRatio)
Sets the ratio between the balloon height and the balloon + arrow height. |
void |
setCornerSize(int cornerSize)
Sets the corner size of the balloon area. |
void |
setPosition(int position)
Sets the balloon tip's position : TOP, RIGHT, BOTTOM, LEFT. |
void |
setVertexPosition(double vertexPosition)
Sets the vertex horizontal or vertical position. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int _cornerSize
protected double _balloonSizeRatio
protected double _arrowLeftRatio
protected double _arrowRightRatio
protected double _vertexPosition
Constructor Detail |
---|
public RoundedRectangularBalloonShape()
Method Detail |
---|
public Shape createOutline(Dimension balloonSize, Dimension contentSize)
createOutline
in interface BalloonShape
balloonSize
- the preferred size of the balloon.contentSize
- the preferred size of the content
protected int getRoundedCornerSize()
public Point getHotSpot(Dimension balloonSize)
BalloonShape
getHotSpot
in interface BalloonShape
balloonSize
- the preferred size of the balloon.
public Insets getInsets(Dimension contentSize)
getInsets
in interface BalloonShape
contentSize
- the preferred size of the content component.
public double getEdgeDistance(Point pixel, BalloonTip balloonTip)
getEdgeDistance
in interface BalloonShape
pixel
- current point in the balloon coordinate system.balloonTip
- the balloon tip.
public static double getDistance(Point p, Point leftVertex, Point rightVertex, Point topVertex, int cornerSize, boolean contained)
public int getCornerSize()
public void setCornerSize(int cornerSize)
cornerSize
- the corner size of the balloon area.public double getBalloonSizeRatio()
public void setBalloonSizeRatio(double balloonSizeRatio)
balloonSizeRatio
- a new ratio between the balloon height and the balloon + arrow
height.public double getArrowLeftRatio()
public void setArrowLeftRatio(double arrowLeftRatio)
arrowLeftRatio
- a new ratio between the distance of the left border to the arrow left
side and the whole balloon width, assuming the ballon position is TOP
or BOTTOM. If the position is LEFT, it will be the ratio between the
distance of the top border to the arrow top side and the whole balloon
height. If the position is RIGHT, it will be the ratio between the
distance of the bottom border to the arrow bottom side and the whole
balloon height.public double getArrowRightRatio()
public void setArrowRightRatio(double arrowRightRatio)
arrowRightRatio
- a new ratio between the distance of the right border to the arrow
right side and the whole balloon width, assuming the ballon position
is TOP or BOTTOM. If the position is LEFT, it will be the ratio
between the distance of the bottom border to the arrow bottom side and
the whole balloon height. If the position is RIGHT, it will be the
ratio between the distance of the top border to the arrow top side and
the whole balloon height.public double getVertexPosition()
public void setVertexPosition(double vertexPosition)
vertexPosition
- a new vertex horizontal position. 0 means the arrow horizontal position
is the same as the left border of the balloon. 1 means the same as the
right border. This is the case when the balloon position is TOP or
BOTTOM. If the position is LEFT, it is the vertex vertical position. 0
means the arrow vertical position is the same as the top border of the
balloon. 1 means the same as the bottom border. If the position is
RIGHT, it is the opposite vertex vertical position. 0 means the arrow
vertical position is the same as the bottom border of the balloon. 1
means the same as the top border.public void setPosition(int position)
position
- a new ratio balloon tip's position.public int getPosition()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |