Chart FX 7 for Java Server

com.softwarefx.chartfx.server.annotation
Class AnnotationPicture

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

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

chart1.getLegendBox().setVisible(true);
javax.swing.ImageIcon ico = new javax.swing.ImageIcon(application.getRealPath("/") + "/data/cfx_logo_small.jpg");
java.awt.Image img = ico.getImage();
com.softwarefx.chartfx.server.annotation.Annotations annot = new com.softwarefx.chartfx.server.annotation.Annotations();
chart1.getExtensions().add(annot);
com.softwarefx.chartfx.server.annotation.AnnotationPicture pict = new com.softwarefx.chartfx.server.annotation.AnnotationPicture();
annot.getList().add(pict);
pict.setPicture(img);
pict.setHeight(50);
pict.setWidth(50);
pict.setLeft(307);
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(com.softwarefx.chartfx.server.annotation.AnnImageMode.ORIGINAL);


Constructor Summary
AnnotationPicture()
           
AnnotationPicture(Image pic)
           
 
Method Summary
 AnnImageMode getMode()
          Gets the Mode.
 Image getPicture()
          Gets the Picture.
 void setMode(AnnImageMode value)
          Sets the rendering style for the image used as the annotation picture.
 void setPicture(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 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

AnnotationPicture

public AnnotationPicture()

AnnotationPicture

public AnnotationPicture(Image pic)
Method Detail

getMode

public AnnImageMode getMode()

Gets the Mode. For more detail see setMode(com.softwarefx.chartfx.server.annotation.AnnImageMode).


getPicture

public Image getPicture()

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


setMode

public void setMode(AnnImageMode value)

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

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(Image value)

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

    Remarks:
  • The setMode(com.softwarefx.chartfx.server.annotation.AnnImageMode) 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(double, 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(com.softwarefx.chartfx.server.annotation.AnnImageMode), AnnotationObject.setWidth(int), AnnotationObject.setHeight(int), AnnotationObject.attach(double, double), AnnotationObject

    sizeToFit

    public void sizeToFit()

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

    Remarks:
  • The setMode(com.softwarefx.chartfx.server.annotation.AnnImageMode) 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(com.softwarefx.chartfx.server.annotation.AnnImageMode), setPicture(java.awt.Image), Annotations, 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.