ilog.views.maps.label
Class IlvMapLabelingLabel

java.lang.Object
  extended by ilog.views.maps.label.IlvMapLabelingLabel
Direct Known Subclasses:
IlvMapAreaLabel, IlvMapLineLabel, IlvMapPointLabel

public abstract class IlvMapLabelingLabel
extends Object

Abstract class defining the general behavior of a map label. It holds the text attribute itself as well as graphic style, and has a method to compute a position for this label and paint it on the view.

Since:
JViews 7.5

Constructor Summary
IlvMapLabelingLabel(String text, IlvMapLabelStyle labelStyle)
          Public constructor.
IlvMapLabelingLabel(String text, Image image, IlvMapLabelStyle labelStyle)
          Public constructor.
 
Method Summary
 void drawLabel(Graphics g)
          Draws this label into the specified IlvManagerView.
 Image getImage()
          Returns the image of this label.
protected  Vector getImageAnchorPoints()
          Returns the vector containing image shapes.
protected  Vector getLabelShapes()
          Returns the vector containing label shapes.
 IlvMapLabelStyle getLabelStyle()
          Returns the style of this label.
protected  Vector getOutlineShapes()
          Returns the vector containing label outline shapes.
 String getText()
          Returns the string of this label.
abstract  void placeLabels(IlvManagerView view, IlvLabelingAreas usedArea, boolean forceCompute)
          Method called when the position of this label on screen needs to be computed.
 void setImage(Image image)
          Sets the image of this label.
 void setLabelStyle(IlvMapLabelStyle labelStyle)
          Sets the style of this label.
 void setText(String text)
          Sets the string of this label.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvMapLabelingLabel

public IlvMapLabelingLabel(String text,
                           Image image,
                           IlvMapLabelStyle labelStyle)
Public constructor.

Parameters:
text - The label string.
image -
labelStyle - The label style.

IlvMapLabelingLabel

public IlvMapLabelingLabel(String text,
                           IlvMapLabelStyle labelStyle)
Public constructor.

Parameters:
text - The label string.
labelStyle - The label style.
Method Detail

getLabelShapes

protected Vector getLabelShapes()
Returns the vector containing label shapes.

Returns:
the vector containing label shapes.

getOutlineShapes

protected Vector getOutlineShapes()
Returns the vector containing label outline shapes.

Returns:
the vector containing label outline shapes.

getImageAnchorPoints

protected Vector getImageAnchorPoints()
Returns the vector containing image shapes.

Returns:
the vector containing image shapes.

getText

public String getText()
Returns the string of this label.

Returns:
The string of this label.

getImage

public Image getImage()
Returns the image of this label.

Returns:
The image of this label.

setText

public void setText(String text)
Sets the string of this label.

Parameters:
text - The string of this label.

setImage

public void setImage(Image image)
Sets the image of this label.

Parameters:
image - The image of this label.

getLabelStyle

public IlvMapLabelStyle getLabelStyle()
Returns the style of this label.

Returns:
The style of this label.

setLabelStyle

public void setLabelStyle(IlvMapLabelStyle labelStyle)
Sets the style of this label.

Parameters:
labelStyle - The style of this label.

drawLabel

public void drawLabel(Graphics g)
Draws this label into the specified IlvManagerView.

Parameters:
g - The Graphics used to draw the label.

placeLabels

public abstract void placeLabels(IlvManagerView view,
                                 IlvLabelingAreas usedArea,
                                 boolean forceCompute)
Method called when the position of this label on screen needs to be computed.

Parameters:
view - The IlvManagerView the label is going to be drawn into.
usedArea - A forbidden area that the label must not intersect (previously placed labels).
forceCompute - Forces a new computation (versus lazy computation which optimizes the process for some subclasses.
Since:
JViews 7.5


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