ilog.views.maps.label
Class IlvMapLineLabel

java.lang.Object
  extended by ilog.views.maps.label.IlvMapLabelingLabel
      extended by ilog.views.maps.label.IlvMapLineLabel

public class IlvMapLineLabel
extends IlvMapLabelingLabel

Class for displaying labels on polylines. The placeLabel() method will try several candidate positions on the visible part of the path (the way that candidates are generated depends on specified list of parameters). A candidate that does not intersect previously placed labels is then chosen.

Since:
JViews 7.5

Nested Class Summary
static class IlvMapLineLabel.ParameterRecord
          Class holding parameters for IlvMapLineLabel instances.
 
Constructor Summary
IlvMapLineLabel(String label, IlvMapLabelStyle labelStyle, IlvMapPolyline poly, IlvMapLineLabel.ParameterRecord parameters)
          Public constructor.
IlvMapLineLabel(String label, Image image, IlvMapLabelStyle labelStyle, IlvPolyline poly, IlvMapLineLabel.ParameterRecord parameters)
          Public constructor.
 
Method Summary
 void placeLabels(IlvManagerView view, IlvLabelingAreas usedArea, boolean forceCompute)
          Method called when the position of this label on screen needs to be computed.
 
Methods inherited from class ilog.views.maps.label.IlvMapLabelingLabel
drawLabel, getImage, getImageAnchorPoints, getLabelShapes, getLabelStyle, getOutlineShapes, getText, setImage, setLabelStyle, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvMapLineLabel

public IlvMapLineLabel(String label,
                       Image image,
                       IlvMapLabelStyle labelStyle,
                       IlvPolyline poly,
                       IlvMapLineLabel.ParameterRecord parameters)
Public constructor.

Parameters:
label - Label text.
image - Label image.
labelStyle - Label style.
poly - IlvPolyline to which this label is attached.
parameters - Placement parameters for this label.

IlvMapLineLabel

public IlvMapLineLabel(String label,
                       IlvMapLabelStyle labelStyle,
                       IlvMapPolyline poly,
                       IlvMapLineLabel.ParameterRecord parameters)
Public constructor.

Parameters:
label - Label text.
labelStyle - Label style.
poly - IlvMapPolyline to which this label is attached.
parameters - Placement parameters for this label.
Method Detail

placeLabels

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

Specified by:
placeLabels in class IlvMapLabelingLabel
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 (otherwise just check that previously computed labels are still valid).


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