|
Chart FX for Java 6.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SoftwareFX.ChartFX.Annotation.AnnotationObject SoftwareFX.ChartFX.Annotation.AnnotationText SoftwareFX.ChartFX.Annotation.AnnotationBalloon
public final class AnnotationBalloon
Provides access to the AnnotationBalloon object.
The AnnotationBalloon Class enables you to add balloon objects in your charts. Balloon objects are like a Text objects, but the text is enclosed in a balloon type shape.
Below is an example of an annotation balloon object:
SoftwareFX.ChartFX.Annotation.AnnotationX annot = new SoftwareFX.ChartFX.Annotation.AnnotationX();
SoftwareFX.ChartFX.Annotation.AnnotationBalloon balloon = new SoftwareFX.ChartFX.Annotation.AnnotationBalloon();
annot.getList().add(balloon);
chart1.getExtensions().add(annot);
balloon.setTailCorner(3);
balloon.setArrowFactor(15);
balloon.getBorder().setColor(java.awt.Color.RED);
balloon.getBorder().setWidth(2);
balloon.setColor(java.awt.Color.WHITE);
balloon.setText("Balloon Text");
balloon.setHeight(70);
balloon.setWidth(-70);
balloon.attach(1.6, 70);
Note: Remember you can assign negative values to both the Width and Height properties. This will allow you to set the appropriate orientation to the balloon and the balloon tip.
Constructor Summary | |
---|---|
AnnotationBalloon()
|
Method Summary | |
---|---|
SoftwareFX.ChartFX.AdjustableArrowCap |
getArrowCap()
Gets the ArrowCap. |
int |
getArrowFactor()
Gets the ArrowFactor. |
int |
getArrowX()
Gets the ArrowX. |
int |
getArrowY()
Gets the ArrowY. |
int |
getRadius()
Gets the Radius. |
int |
getShadow()
Gets the Shadow. |
int |
getTailCorner()
Gets the TailCorner. |
boolean |
isUseArrow()
Gets the UseArrow. |
void |
setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap value)
Allows you to control the arrow head height, width and style when used with the annotation balloon object. |
void |
setArrowFactor(int value)
Used to get or set the annotation balloon tip size. |
void |
setArrowX(int value)
Sets the X coordinate value for the balloon tip when set to be an arrow. |
void |
setArrowY(int value)
Sets the Y coordinate value for the balloon tip when set to be an arrow. |
void |
setRadius(int value)
Used to set the radius for a selected balloon annotation object. |
void |
setShadow(int value)
Allows you to set a shadow for balloon annotation object. |
void |
setTailCorner(int value)
Gets or sets the corner of the balloon the tip or arrow. |
void |
setUseArrow(boolean value)
Instructs Chart FX to use an arrow instead of the balloon tip. |
Methods inherited from class SoftwareFX.ChartFX.Annotation.AnnotationText |
---|
getAlign, getFont, getLineAlignment, getOrientation, getText, getTextColor, isWordWrap, setAlign, setFont, setLineAlignment, setOrientation, setText, setTextColor, setWordWrap, sizeToFit |
Methods inherited from class SoftwareFX.ChartFX.Annotation.AnnotationObject |
---|
attach, attach, attach, detach, flip, getAnchor, getBorder, getColor, getHeight, getLeft, getLink, getObjectBounds, getPattern, getTag, getTop, getURL, getURLTarget, getWidth, isAllowModify, isAllowMove, isDrawingArea, isPaintBefore, isVisible, refresh, rotate, setAllowModify, setAllowMove, setAnchor, setBorder, setColor, setDrawingArea, setHeight, setLeft, setObjectBounds, setPaintBefore, setPattern, setTag, setTop, setURL, setURLTarget, setVisible, setWidth |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationBalloon()
Method Detail |
---|
public SoftwareFX.ChartFX.AdjustableArrowCap getArrowCap()
Gets the ArrowCap. For more detail see setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap)
.
public int getArrowFactor()
Gets the ArrowFactor. For more detail see setArrowFactor(int)
.
public int getArrowX()
Gets the ArrowX. For more detail see setArrowX(int)
.
public int getArrowY()
Gets the ArrowY. For more detail see setArrowY(int)
.
public int getRadius()
Gets the Radius. For more detail see setRadius(int)
.
public int getShadow()
Gets the Shadow. For more detail see setShadow(int)
.
public int getTailCorner()
Gets the TailCorner. For more detail see setTailCorner(int)
.
public boolean isUseArrow()
Gets the UseArrow. For more detail see setUseArrow(boolean)
.
public void setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap value)
Allows you to control the arrow head height, width and style when used with the annotation balloon object.
The setUseArrow(boolean)
property instruct Chart FX use an arrow shape as the pointer for a selected annotation balloon object.
AnnotationArrow.setEndCap(SoftwareFX.ChartFX.AdjustableArrowCap)
,
AnnotationArrow.setStartCap(SoftwareFX.ChartFX.AdjustableArrowCap)
,
setUseArrow(boolean)
,
AnnotationArrow
public void setArrowFactor(int value)
Used to get or set the annotation balloon tip size.
The balloon tip is the small marker located at one of the corners of the balloon object which helps the user understand what the balloon object is referring.
This property is used to calculate the length in pixels of the balloon tip.
The calculation first determines the diagonal length of the balloon based on the specified AnnotationObject.setHeight(int)
and AnnotationObject.setWidth(int)
then divides that length value by the setArrowFactor(int)
.
For example, if the Height and Width were both set to 70, then based on Pythagorean logic the diagonal length of the balloon is also 70. If an ArrowFactor of 2 is specified, then the tip will show as 1/2 the length of the balloon (35 pixels). If 10 were specified, then the length of the tip would be 1/10 of the diagonal length (7 pixels).
You can control which corner of the balloon object will have the tip with the setTailCorner(int)
property.
The setUseArrow(boolean)
property is used to instruct Chart FX to use an arrow instead of the default balloon tip.
setTailCorner(int)
,
setUseArrow(boolean)
,
AnnotationObject
public void setArrowX(int value)
Sets the X coordinate value for the balloon tip when set to be an arrow.
To set the balloon tip to be an arrow, you will need to set the setUseArrow(boolean)
property.
The Y coordinate value for the balloon tip arrow can be set using the setArrowY(int)
property.
The setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap)
property may be used to customize the head of the arrow object.
Please remember you to set the AnnotationObject.setWidth(int)
and AnnotationObject.setHeight(int)
properties to change size of the annotation object. If you do not set the size of the annotation object, it will not appear in the chart area.
setArrowY(int)
,
setUseArrow(boolean)
,
setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap)
,
AnnotationObject.setWidth(int)
,
AnnotationObject.setHeight(int)
,
AnnotationObject
public void setArrowY(int value)
Sets the Y coordinate value for the balloon tip when set to be an arrow.
To set the balloon tip to be an arrow, you will need to set the setUseArrow(boolean)
property.
The X coordinate value for the balloon tip arrow can be set using the setArrowX(int)
property.
The setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap)
property may be used to customize the head of the arrow object.
Please remember you to set the AnnotationObject.setWidth(int)
and AnnotationObject.setHeight(int)
properties to change size of the annotation object. If you do not set the size of the annotation object, it will not appear in the chart area.
setArrowX(int)
,
setUseArrow(boolean)
,
setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap)
,
AnnotationObject.setWidth(int)
,
AnnotationObject.setHeight(int)
,
AnnotationObject
public void setRadius(int value)
Used to set the radius for a selected balloon annotation object.
The greater value you set to this property, the more the balloon annotation object begins to look like a circle. Setting a radius value greater than 5 makes the balloon object appear more round in shape.
Please remember you can set the AnnotationObject.setWidth(int)
and AnnotationObject.setHeight(int)
properties to change size of the annotation object. If you do not set the size of the annotation object, it will not appear in the chart area.
The AnnotationObject.attach(int, double, int, double)
method may be used to set the location in the chart for annotation objects.
AnnotationObject.setHeight(int)
,
AnnotationObject.setWidth(int)
,
AnnotationObject.attach(int, double, int, double)
,
AnnotationObject
public void setShadow(int value)
Allows you to set a shadow for balloon annotation object.
This property is set using an integer value. When the Shadow property is set to zero (0), no shadow is applied to the balloon annotation object. When the Shadow property is set to a value greater that one (1), the shadow will be greater than the default.
The larger the configured value, the higher the balloon annotation object appears to be lifted off the chart (showing a larger shadow).
Please remember you to set the AnnotationObject.setWidth(int)
and AnnotationObject.setHeight(int)
properties to change size of the annotation object. If you do not set the size of the annotation object, it will not appear in the chart area.
AnnotationObject.setWidth(int)
,
AnnotationObject.setHeight(int)
,
AnnotationObject
public void setTailCorner(int value)
Gets or sets the corner of the balloon the tip or arrow.
The TailCorner property is set using an integer value. The supported configurations are listed below:
0 = Top right corner
1 = Top left corner
2 = Bottom right corner
3 = Bottom left corner
You may use the setArrowFactor(int)
property to adjust the size of the balloon tip. This setting is measured in pixel units.
The setUseArrow(boolean)
property allows you to set an arrow or tip object for the balloon corner.
Please remember you to set the AnnotationObject.setWidth(int)
and AnnotationObject.setHeight(int)
properties to change size of the annotation object. If you do not set the size of the annotation object, it will not appear in the chart area.
setArrowFactor(int)
,
setUseArrow(boolean)
,
AnnotationObject
public void setUseArrow(boolean value)
Instructs Chart FX to use an arrow instead of the balloon tip.
The balloon tip is not the most persuasive tool when displaying a balloon. You can use this property to change the standard balloon tip into an arrow object.
You can use the setArrowX(int)
and setArrowY(int)
properties to configure X and Y chart coordinates for the head of the arrow to be placed.
The setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap)
property may be used to customize the head of the arrow object.
Please remember you to set the AnnotationObject.setWidth(int)
and AnnotationObject.setHeight(int)
properties to change size of the annotation object. If you do not set the size of the annotation object, it will not appear in the chart area.
setArrowX(int)
,
setArrowY(int)
,
setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap)
,
AnnotationObject
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |