public class IlvDefaultDataAnnotation extends java.lang.Object implements IlvDataAnnotation
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)";
}
Modifier and Type | Property and Description |
---|---|
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. |
public java.lang.String class
IlvDefaultDataAnnotation
object that draws
an image with the specified position and offset.
class : "ilog.views.chart.graphic.IlvDefaultDataAnnotation(URL,position,offset)";
public javax.swing.Icon icon
icon : "@#imageIcon";
ImageIcon
for an example of implementing an icon.public int offset
offset : "2";
public int position
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.). |
public java.net.URL URL
URL : "url(spec)";
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.