Chart FX for Java 6.2

SoftwareFX.ChartFX.Annotation
Class AnnotationBalloon

java.lang.Object
  extended bySoftwareFX.ChartFX.Annotation.AnnotationObject
      extended bySoftwareFX.ChartFX.Annotation.AnnotationText
          extended bySoftwareFX.ChartFX.Annotation.AnnotationBalloon

public final class AnnotationBalloon
extends AnnotationText

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()
          Allows you to control the arrow head height, width and style when used with the annotation balloon object.
 int getArrowFactor()
          Used to get or set the annotation balloon tip size.
 int getArrowX()
          Sets the X coordinate value for the balloon tip when set to be an arrow.
 int getArrowY()
          Sets the Y coordinate value for the balloon tip when set to be an arrow.
 int getRadius()
          Used to set the radius for a selected balloon annotation object.
 int getShadow()
          Allows you to set a shadow for balloon annotation object.
 int getTailCorner()
          Gets or sets the corner of the balloon the tip or arrow.
 boolean isUseArrow()
          Instructs Chart FX to use an arrow instead of the balloon tip.
 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
attach, attach, attach, detach, flip, getAlign, getAnchor, getBorder, getColor, getFont, getHeight, getLeft, getLineAlignment, getLink, getObjectBounds, getOrientation, getPattern, getTag, getText, getTextColor, getTop, getURL, getURLTarget, getWidth, isAllowModify, isAllowMove, isDrawingArea, isPaintBefore, isVisible, isWordWrap, refresh, rotate, setAlign, setAllowModify, setAllowMove, setAnchor, setBorder, setColor, setDrawingArea, setFont, setHeight, setLeft, setLineAlignment, setObjectBounds, setOrientation, setPaintBefore, setPattern, setTag, setText, setTextColor, setTop, setURL, setURLTarget, setVisible, setWidth, setWordWrap, sizeToFit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationBalloon

public AnnotationBalloon()
Method Detail

getArrowCap

public SoftwareFX.ChartFX.AdjustableArrowCap getArrowCap()

Allows you to control the arrow head height, width and style when used with the annotation balloon object.

Remarks:
  • The setUseArrow(boolean) property instruct Chart FX use an arrow shape as the pointer for a selected annotation balloon object.

  • See Also:
    AnnotationArrow.setEndCap(SoftwareFX.ChartFX.AdjustableArrowCap), AnnotationArrow.setStartCap(SoftwareFX.ChartFX.AdjustableArrowCap), setUseArrow(boolean), AnnotationArrow

    getArrowFactor

    public int getArrowFactor()

    Used to get or set the annotation balloon tip size.

    Remarks:
  • 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.

  • See Also:
    setTailCorner(int), setUseArrow(boolean), AnnotationObject

    getArrowX

    public int getArrowX()

    Sets the X coordinate value for the balloon tip when set to be an arrow.

    Remarks:
  • 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.

  • See Also:
    setArrowY(int), setUseArrow(boolean), setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap), AnnotationObject.setWidth(int), AnnotationObject.setHeight(int), AnnotationObject

    getArrowY

    public int getArrowY()

    Sets the Y coordinate value for the balloon tip when set to be an arrow.

    Remarks:
  • 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.

  • See Also:
    setArrowX(int), setUseArrow(boolean), setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap), AnnotationObject.setWidth(int), AnnotationObject.setHeight(int), AnnotationObject

    getRadius

    public int getRadius()

    Used to set the radius for a selected balloon annotation object.

    Remarks:
  • 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.

  • See Also:
    AnnotationObject.setHeight(int), AnnotationObject.setWidth(int), AnnotationObject.attach(int, double, int, double), AnnotationObject

    getShadow

    public int getShadow()

    Allows you to set a shadow for balloon annotation object.

    Remarks:
  • 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.

  • See Also:
    AnnotationObject.setWidth(int), AnnotationObject.setHeight(int), AnnotationObject

    getTailCorner

    public int getTailCorner()

    Gets or sets the corner of the balloon the tip or arrow.

    Remarks:
  • 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.

  • See Also:
    setArrowFactor(int), setUseArrow(boolean), AnnotationObject

    isUseArrow

    public boolean isUseArrow()

    Instructs Chart FX to use an arrow instead of the balloon tip.

    Remarks:
  • 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.

  • See Also:
    setArrowX(int), setArrowY(int), setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap), AnnotationObject

    setArrowCap

    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.

    Remarks:
  • The setUseArrow(boolean) property instruct Chart FX use an arrow shape as the pointer for a selected annotation balloon object.

  • See Also:
    AnnotationArrow.setEndCap(SoftwareFX.ChartFX.AdjustableArrowCap), AnnotationArrow.setStartCap(SoftwareFX.ChartFX.AdjustableArrowCap), setUseArrow(boolean), AnnotationArrow

    setArrowFactor

    public void setArrowFactor(int value)

    Used to get or set the annotation balloon tip size.

    Remarks:
  • 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.

  • See Also:
    setTailCorner(int), setUseArrow(boolean), AnnotationObject

    setArrowX

    public void setArrowX(int value)

    Sets the X coordinate value for the balloon tip when set to be an arrow.

    Remarks:
  • 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.

  • See Also:
    setArrowY(int), setUseArrow(boolean), setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap), AnnotationObject.setWidth(int), AnnotationObject.setHeight(int), AnnotationObject

    setArrowY

    public void setArrowY(int value)

    Sets the Y coordinate value for the balloon tip when set to be an arrow.

    Remarks:
  • 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.

  • See Also:
    setArrowX(int), setUseArrow(boolean), setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap), AnnotationObject.setWidth(int), AnnotationObject.setHeight(int), AnnotationObject

    setRadius

    public void setRadius(int value)

    Used to set the radius for a selected balloon annotation object.

    Remarks:
  • 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.

  • See Also:
    AnnotationObject.setHeight(int), AnnotationObject.setWidth(int), AnnotationObject.attach(int, double, int, double), AnnotationObject

    setShadow

    public void setShadow(int value)

    Allows you to set a shadow for balloon annotation object.

    Remarks:
  • 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.

  • See Also:
    AnnotationObject.setWidth(int), AnnotationObject.setHeight(int), AnnotationObject

    setTailCorner

    public void setTailCorner(int value)

    Gets or sets the corner of the balloon the tip or arrow.

    Remarks:
  • 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.

  • See Also:
    setArrowFactor(int), setUseArrow(boolean), AnnotationObject

    setUseArrow

    public void setUseArrow(boolean value)

    Instructs Chart FX to use an arrow instead of the balloon tip.

    Remarks:
  • 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.

  • See Also:
    setArrowX(int), setArrowY(int), setArrowCap(SoftwareFX.ChartFX.AdjustableArrowCap), AnnotationObject

    http://www.softwarefx.com

    2005 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.