ilog.views.chart.graphic
Class IlvDefaultDataAnnotation

ilog.views.chart.graphic.IlvDefaultDataAnnotation

public class IlvDefaultDataAnnotation

A default implementation of the IlvDataAnnotation interface that draws a Swing Icon.

This class references an object that implements the javax.swing.Icon interface, and draws it next to a display point.

The location of the annotation is computed according to a position relative to the display point with which it is associated. This position can take the following values, defined in javax.swing.SwingConstants: CENTER, NORTH, NORTH_EAST, EAST, SOUTH_EAST, SOUTH, SOUTH_WEST, WEST, NORTH_WEST.

When the position is different from CENTER, an offset in pixel can be specified between the annotation and the display point.

Note that the IlvDefaultDataAnnotation is immutable: changing either the icon, position or offset creates a new instance.

CSS example:

ilvDefaultDataAnnotation {
    class : "ilog.views.chart.graphic.IlvDefaultDataAnnotation(URL,position,offset)";
    icon : "@#imageIcon";
    offset : "2";
    position : "NORTH";
    URL : "url(spec)";
}


Property Summary
 java.lang.String class
          
Initializes a new IlvDefaultDataAnnotation object that draws an image with the specified position and offset.
 javax.swing.Icon icon
          
Creates a copy of this annotation, with the specified icon.
 int offset
          
Sets the offset between the annotation and the display point.
 int position
          
Sets the position of the annotation relative to the display point.
 java.net.URL URL
          
Sets the URL of the drawn image.
 

Property Detail

class

public java.lang.String class

Initializes a new IlvDefaultDataAnnotation object that draws an image with the specified position and offset.

CSS example:     class : "ilog.views.chart.graphic.IlvDefaultDataAnnotation(URL,position,offset)";


icon

public javax.swing.Icon icon

Creates a copy of this annotation, with the specified icon.

CSS example:     icon : "@#imageIcon";

See implementing class ImageIcon for an example of implementing an icon.


offset

public int offset

Sets the offset between the annotation and the display point.

CSS example:     offset : "2";


position

public int position

Sets the position of the annotation relative to the display point.

CSS example:     position : "NORTH";

Allowed values:
NORTH    Compass-direction North (up).
NORTH_WEST    Compass-direction north west (upper left).
WEST    Compass-direction west (left).
SOUTH_WEST    Compass-direction south-west (lower left).
SOUTH    Compass-direction south (down).
SOUTH_EAST    Compass-direction south-east (lower right).
EAST    Compass-direction east (right).
NORTH_EAST    Compass-direction north-east (upper right).
CENTER    The central position in an area. Used for both compass-direction constants (NORTH, etc.) and box-orientation constants (TOP, etc.).


URL

public java.net.URL URL

Sets the URL of the drawn image.

CSS example:     URL : "url(spec)";



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.