public class IlvMapDefaultLabeler extends Object implements IlvMapLabeler
IlvMapDefaultLabeler
is the default implementation of
IlvMapLabeler
.
This labeler adds labels to the layers with the
LABEL_ATTRIBUTE
attribute set to a non null
value.
This attribute name tells the labeler which
IlvAttributeProperty
to take into account for
labeling.Modifier and Type | Class and Description |
---|---|
static class |
IlvMapDefaultLabeler.LabelLayer
This class is public for implementation purposes only.
|
Constructor and Description |
---|
IlvMapDefaultLabeler()
Construct an
IlvMapDefaultLabeler . |
IlvMapDefaultLabeler(IlvInputStream stream)
Reads an
IlvMapDefaultLabeler from an IlvInputStream . |
Modifier and Type | Method and Description |
---|---|
void |
addLayer(IlvMapLayer layer)
Add a layer to be labeled by this labeler.
|
IlvMapLabelingLabel[] |
createLabels(IlvGraphic graphic,
String message)
Creates and sets up map label components.
|
boolean |
equals(Object obj)
Indicates whether some other labeler is "equal to" this one.
|
IlvMapLayer |
getLabeledLayer(IlvMapLayer mapLayer)
Retrieves the
IlvMapLayer for which this label layer has been created. |
IlvMapLabelFactory |
getLabelFactory()
Deprecated.
Since JViews 8.8, you should use
getLabelManager().getLabelFactory() |
IlvMapLayer |
getLabelLayer()
Deprecated.
|
IlvMapLayer |
getLabelLayer(IlvMapLayer mapLayer)
Retrieves the
IlvMapLayer on which labels are drawn for this specific map layer. |
Iterator<IlvMapLayer> |
getLabelLayers()
Returns an iterator to iterate through the label layers.
|
IlvMapLabelManager |
getLabelManager()
Returns the label manager in charge of creating, placing and displaying the labels.
|
IlvManagerView |
getView()
Retreives the view associated to this labeler.
|
boolean |
isGeneratingImage()
Tests if this label manager is prepared for to generate images.
|
void |
labelize()
Deprecated.
Since JViews 8.0 , you should use #performLabeling() instead.
|
void |
performLabeling()
Create labels from the specified
IlvMapLayer . |
void |
removeLayer(IlvMapLayer layer)
Removes a layer from this labeler.
|
void |
setGeneratingImage(boolean generatingImage)
Tells this label manager instance to be prepared to generate images.
|
void |
setLabelFactory(IlvMapLabelFactory factory)
Deprecated.
Since JViews 8.8, you should use
getLabelManager().setLabelFactory(factory) |
void |
setLabelLayer(IlvMapLayer layer)
Sets the label layer.
|
void |
setView(IlvManagerView view)
Sets the view associated to this labeler.
|
void |
write(IlvOutputStream stream)
Writes the labeler into an
IlvOutputStream . |
public IlvMapDefaultLabeler()
IlvMapDefaultLabeler
.public IlvMapDefaultLabeler(IlvInputStream stream) throws IlvReadFileException
IlvMapDefaultLabeler
from an IlvInputStream
.stream
- The stream to read from.IlvReadFileException
public IlvManagerView getView()
getView
in interface IlvMapLabeler
IlvMapLabeler.getView()
public void setView(IlvManagerView view)
setView
in interface IlvMapLabeler
view
- The view to be associated to this labeler.IlvMapLabeler.setView(ilog.views.IlvManagerView)
public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
stream
- The stream to write to.IOException
public IlvMapLabelingLabel[] createLabels(IlvGraphic graphic, String message)
IlvGraphicSet
can have more than
one label component.
This utility method is typically used in
IlvMapLabelFactory.getGisLabel(IlvGraphic)
.createLabels
in interface IlvMapLabeler
graphic
- The graphic object for which one or more labels should
be created.message
- A String
containing the label message.@Deprecated public void setLabelFactory(IlvMapLabelFactory factory)
getLabelManager().setLabelFactory(factory)
LabelFactory
used by all label layers.factory
- The LabelFactory
to use.@Deprecated public IlvMapLabelFactory getLabelFactory()
getLabelManager().getLabelFactory()
LabelFactory
used by all label layers.
Creates a default label factory (that returns the selected metadata in the layer style) if none has been set.LabelFactory
used by all label layers.public void setLabelLayer(IlvMapLayer layer)
setLabelLayer
in interface IlvMapLabeler
layer
- The new label layer.IlvMapLabeler.setLabelLayer(ilog.views.maps.beans.IlvMapLayer)
@Deprecated public IlvMapLayer getLabelLayer()
getLabelLayer(IlvMapLayer)
instead.getLabelLayer
in interface IlvMapLabeler
IlvMapLayer
.public IlvMapLayer getLabelLayer(IlvMapLayer mapLayer)
IlvMapLayer
on which labels are drawn for this specific map layer.getLabelLayer
in interface IlvMapLabeler
mapLayer
- the layer to retrieve label layer for.IlvMapLayer
public IlvMapLayer getLabeledLayer(IlvMapLayer mapLayer)
IlvMapLayer
for which this label layer has been created.getLabeledLayer
in interface IlvMapLabeler
mapLayer
- The label layer for which you want to retrieve the source layer.IlvMapLayer
.public void addLayer(IlvMapLayer layer)
addLayer
in interface IlvMapLabeler
layer
- A new layer to be labeled.IlvMapLabeler.addLayer(ilog.views.maps.beans.IlvMapLayer)
public void removeLayer(IlvMapLayer layer)
removeLayer
in interface IlvMapLabeler
layer
- The layer to remove.IlvMapLabeler.removeLayer(ilog.views.maps.beans.IlvMapLayer)
@Deprecated public void labelize()
IlvMapLayer
.
The name of the attribute to be labeled if the one returned by
IlvMapStyle.getLabelAttribute()
labelize
in interface IlvMapLabeler
public void performLabeling()
IlvMapLayer
.
The name of the attribute to be labeled if the one returned by
IlvMapStyle.getLabelAttribute()
performLabeling
in interface IlvMapLabeler
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public Iterator<IlvMapLayer> getLabelLayers()
getLabelLayers
in interface IlvMapLabeler
public boolean isGeneratingImage()
true
is returned.public void setGeneratingImage(boolean generatingImage)
generatingImage
- Set to true
to generate images.public final IlvMapLabelManager getLabelManager()
getLabelManager
in interface IlvMapLabeler
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.