|
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.AnnotationPicture
public final class AnnotationPicture
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 |
---|
public AnnotationPicture()
public AnnotationPicture(java.awt.Image pic)
Method Detail |
---|
public int getMode()
Gets the Mode. For more detail see setMode(int)
.
public java.awt.Image getPicture()
Gets the Picture. For more detail see setPicture(java.awt.Image)
.
public void setMode(int value)
Sets the rendering style for the image used as the annotation picture.
AnnImageMode :
Annotation image modes.Value | Description |
---|---|
AnnImageMode.ORIGINAL | Uses the image in the original size for the annotation picture object. |
AnnImageMode.STRETCH | Stretches the picture to fit in the annotation picture object bounds. |
AnnImageMode.TILE | Tiles the image set for an annotation picture object. |
Use the setPicture(java.awt.Image)
property to set the image to be used for the annotation picture object.
setPicture(java.awt.Image)
public void setPicture(java.awt.Image value)
Allows you to set the image for an annotation picture object.
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.
setMode(int)
,
AnnotationObject.setWidth(int)
,
AnnotationObject.setHeight(int)
,
AnnotationObject.attach(int, double, int, double)
,
AnnotationObject
public void sizeToFit()
Instructs Chart FX to resize a selected annotation picture object to fit the configured image.
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.
setMode(int)
,
setPicture(java.awt.Image)
,
AnnotationX
,
AnnotationObject
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |