Chart FX for Java 6.5

SoftwareFX.ChartFX.Annotation
Class AnnotationPicture

java.lang.Object
  extended by SoftwareFX.ChartFX.Annotation.AnnotationObject
      extended by SoftwareFX.ChartFX.Annotation.AnnotationPicture

public final class AnnotationPicture
extends AnnotationObject

Provides access to the AnnotationPicture object.

The AnnotationPicture class allows you to add annotation picture objects to your charting applications. The supported members allow you to configure your custom images and select the rendering style (original, stretch and tile).

Below is an example of an annotation picture object:

SoftwareFX.ChartFX.Annotation.AnnotationX annot = new SoftwareFX.ChartFX.Annotation.AnnotationX();
chart1.getExtensions().add(annot);
SoftwareFX.ChartFX.Annotation.AnnotationPicture pict = new SoftwareFX.ChartFX.Annotation.AnnotationPicture();
annot.getList().add(pict);
pict.setPicture(java.awt.Toolkit.getDefaultToolkit().getImage(application.getRealPath("/") + "cfx_logo_small.jpg"));
pict.setHeight(50);
pict.setWidth(50);
pict.setLeft(390);
pict.setTop(10);
pict.setColor(new java.awt.Color(0,0,0,0));
pict.getBorder().setColor(new java.awt.Color(0,0,0,0));
pict.setMode(SoftwareFX.ChartFX.Annotation.AnnImageMode.ORIGINAL);


Constructor Summary
AnnotationPicture()
           
AnnotationPicture(java.awt.Image pic)
           
 
Method Summary
 int getMode()
          Gets the Mode.
 java.awt.Image getPicture()
          Gets the Picture.
 void setMode(int value)
          Sets the rendering style for the image used as the annotation picture.
 void setPicture(java.awt.Image value)
          Allows you to set the image for an annotation picture object.
 void sizeToFit()
          Instructs Chart FX to resize a selected annotation picture object to fit the configured image.
 
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

AnnotationPicture

public AnnotationPicture()

AnnotationPicture

public AnnotationPicture(java.awt.Image pic)
Method Detail

getMode

public int getMode()

Gets the Mode. For more detail see setMode(int).


getPicture

public java.awt.Image getPicture()

Gets the Picture. For more detail see setPicture(java.awt.Image).


setMode

public void setMode(int value)

Sets the rendering style for the image used as the annotation picture.

Values:
AnnImageMode : Annotation image modes.
ValueDescription
AnnImageMode.ORIGINALUses the image in the original size for the annotation picture object.
AnnImageMode.STRETCHStretches the picture to fit in the annotation picture object bounds.
AnnImageMode.TILETiles the image set for an annotation picture object.

Remarks:
  • Use the setPicture(java.awt.Image) property to set the image to be used for the annotation picture object.

  • See Also:
    setPicture(java.awt.Image)

    setPicture

    public void setPicture(java.awt.Image value)

    Allows you to set the image for an annotation picture object.

    Remarks:
  • The setMode(int) property allows you to set the image mode for the annotation picture. The mode enumerations are Original, Tile and Stretch.

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

  • You may also AnnotationObject.attach(int, double, int, double) the annotation picture to the chart using the supported method.

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

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

    sizeToFit

    public void sizeToFit()

    Instructs Chart FX to resize a selected annotation picture object to fit the configured image.

    Remarks:
  • The setMode(int) property allows you to set the style for the image displayed to Tile, Stretch or Original for the picture object.

  • You can set the image for the annotation picture object using the setPicture(java.awt.Image) property.

  • See Also:
    setMode(int), setPicture(java.awt.Image), AnnotationX, AnnotationObject

    http://www.softwarefx.com

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