ilog.views.maps.geometry
Class IlvMapText

java.lang.Object
  extended by ilog.views.maps.IlvMapGeometry
      extended by ilog.views.maps.geometry.IlvMapText

public class IlvMapText
extends IlvMapGeometry

This class defines a georeferenced text. A georeferenced text is composed of a String containing the text to display, and an anchor point.
The position of the text from the anchor point is dependent of the interpretation made by the renderer. For instance, IlvDefaultTextRenderer interprets the anchor point as the center of the label corresponding to the IlvMapText.

Since:
ILOG JViews 3.0
See Also:
IlvDefaultTextRenderer

Constructor Summary
IlvMapText()
          Initializes an instance of text, with no label.
IlvMapText(IlvCoordinate p, String text)
          Initializes an instance of text.
IlvMapText(IlvRect rect, String text)
          Initializes an instance of text using a rectangular anchor.
 
Method Summary
 Rectangle2D getBounds(Rectangle2D result)
          Returns the bounds of this IlvMapGeometry
 IlvCoordinate getPoint()
          Returns the anchor point of the text
 IlvRect getRectangle()
          Returns the anchor rectangle of the text.
 String getText()
          Returns the value of the text
 void setPoint(IlvCoordinate point)
          Sets the position of the text.
 void setRectangle(IlvRect rect)
          Sets the rectangle anchor of the text.
 void setText(String text)
          Sets the value of the text.
 String toString()
          Returns a string describing the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvMapText

public IlvMapText()
Initializes an instance of text, with no label.


IlvMapText

public IlvMapText(IlvCoordinate p,
                  String text)
Initializes an instance of text.

Parameters:
p - an anchor point for the text. This coordinate is not copied.
text - the value of the text.

IlvMapText

public IlvMapText(IlvRect rect,
                  String text)
Initializes an instance of text using a rectangular anchor.

Parameters:
rect - an anchor rectangle for the text. This IlvRect is not copied.
text - the value of the text.
Since:
JViews 5.0
Method Detail

getRectangle

public IlvRect getRectangle()
Returns the anchor rectangle of the text.

Since:
JViews 5.0

setRectangle

public void setRectangle(IlvRect rect)
Sets the rectangle anchor of the text.

Parameters:
rect - An anchor rectangle for the text. (The rectangle is not copied).
Since:
JViews 5.0

getPoint

public IlvCoordinate getPoint()
Returns the anchor point of the text


setPoint

public void setPoint(IlvCoordinate point)
Sets the position of the text.

Parameters:
point - An anchor point for the text. (The coordinate is not copied).

getText

public String getText()
Returns the value of the text


setText

public void setText(String text)
Sets the value of the text.

Parameters:
text - the value of the text.

toString

public String toString()
Returns a string describing the object.

Overrides:
toString in class Object

getBounds

public Rectangle2D getBounds(Rectangle2D result)
Returns the bounds of this IlvMapGeometry

Specified by:
getBounds in class IlvMapGeometry


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