Chart FX 7 for Java Server

com.softwarefx.chartfx.server.annotation
Class AnnotationBalloon

java.lang.Object
  extended by com.softwarefx.chartfx.server.annotation.AnnotationObject
      extended by com.softwarefx.chartfx.server.annotation.AnnotationText
          extended by com.softwarefx.chartfx.server.annotation.AnnotationBalloon

public 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:

com.softwarefx.chartfx.server.annotation.Annotations annot = new com.softwarefx.chartfx.server.annotation.Annotations();
com.softwarefx.chartfx.server.annotation.AnnotationBalloon balloon = new com.softwarefx.chartfx.server.annotation.AnnotationBalloon();
balloon.setArrowY(3);
balloon.setArrowX(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(-80);
balloon.attach(1.6, 70);
annot.getList().add(balloon);
chart1.getExtensions().add(annot);

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
 AdjustableArrowCap getArrowCap()
          Gets the ArrowCap.
 int getArrowX()
          Gets the ArrowX.
 int getArrowY()
          Gets the ArrowY.
 int getCornerRadius()
          Gets the CornerRadius.
 int getShadow()
          Gets the Shadow.
 BalloonTailCorner getTailCorner()
          Gets the TailCorner.
 int getTailFactor()
          Gets the TailFactor.
 boolean isUseArrow()
          Gets the UseArrow.
 void setArrowCap(AdjustableArrowCap value)
          Allows you to control the arrow head height, width and style when used with the annotation balloon object.
 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 setCornerRadius(int value)
          Used to set the corner radius for a selected balloon annotation object.
 void setShadow(int value)
          Allows you to set a shadow for balloon annotation object.
 void setTailCorner(BalloonTailCorner value)
          Sets the corner of the balloon the tip or arrow.
 void setTailFactor(int value)
          Used to get or set the annotation balloon tip size.
 void setUseArrow(boolean value)
          Instructs Chart FX to use an arrow instead of the balloon tip.
 
Methods inherited from class com.softwarefx.chartfx.server.annotation.AnnotationText
getAlign, getFont, getLineAlignment, getOrientation, getText, getTextColor, isClip, isWordWrap, setAlign, setClip, setFont, setLineAlignment, setOrientation, setText, setTextColor, setWordWrap, sizeToFit
 
Methods inherited from class com.softwarefx.chartfx.server.annotation.AnnotationObject
attach, attach, attach, detach, dispose, flip, getAnchor, getBorder, getColor, getHeight, getLeft, getLink, getObjectBounds, getPattern, getTag, getTop, getWidth, isAllowModify, isAllowMove, isPaintBefore, isPlotAreaOnly, isVisible, refresh, rotate, setAllowModify, setAllowMove, setAnchor, setBorder, setColor, setHeight, setLeft, setObjectBounds, setPaintBefore, setPattern, setPlotAreaOnly, setTag, setTop, setVisible, setWidth
 
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 AdjustableArrowCap getArrowCap()

Gets the ArrowCap. For more detail see setArrowCap(com.softwarefx.AdjustableArrowCap).


getArrowX

public int getArrowX()

Gets the ArrowX. For more detail see setArrowX(int).


getArrowY

public int getArrowY()

Gets the ArrowY. For more detail see setArrowY(int).


getCornerRadius

public int getCornerRadius()

Gets the CornerRadius. For more detail see setCornerRadius(int).


getShadow

public int getShadow()

Gets the Shadow. For more detail see setShadow(int).


getTailCorner

public BalloonTailCorner getTailCorner()

Gets the TailCorner. For more detail see setTailCorner(com.softwarefx.chartfx.server.annotation.BalloonTailCorner).


getTailFactor

public int getTailFactor()

Gets the TailFactor. For more detail see setTailFactor(int).


isUseArrow

public boolean isUseArrow()

Gets the UseArrow. For more detail see setUseArrow(boolean).


setArrowCap

public void setArrowCap(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.

  • For more information regarding the AdjustableArrowCap type, please refer to the Java API Documentation.

  • See Also:
    AnnotationArrow.setEndCap(com.softwarefx.AdjustableArrowCap), AnnotationArrow.setStartCap(com.softwarefx.AdjustableArrowCap), setUseArrow(boolean), AnnotationArrow

    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(com.softwarefx.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(com.softwarefx.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(com.softwarefx.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(com.softwarefx.AdjustableArrowCap), AnnotationObject.setWidth(int), AnnotationObject.setHeight(int), AnnotationObject

    setCornerRadius

    public void setCornerRadius(int value)

    Used to set the corner 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(double, 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(double, 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(BalloonTailCorner value)

    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 setTailFactor(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:
    setTailFactor(int), setUseArrow(boolean), AnnotationObject

    setTailFactor

    public void setTailFactor(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 sets the balloon tip size in units of pixels.

  • You can control which corner of the balloon object will have the tip with the setTailCorner(com.softwarefx.chartfx.server.annotation.BalloonTailCorner) property.

  • The setUseArrow(boolean) property is used to instruct Chart FX to use an arrow instead of the default balloon tip.

  • See Also:
    setTailCorner(com.softwarefx.chartfx.server.annotation.BalloonTailCorner), 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(com.softwarefx.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(com.softwarefx.AdjustableArrowCap), AnnotationObject

    http://www.softwarefx.com

    2008 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.