public class IlvGraphicLayerDataSource extends IlvMapDataSource implements IlvMapReusableFeatureIterator, IlvFeatureRenderer
IlvGraphic
objects.
Using add(IlvGraphic)
, the application will add to the list of objects, that will then be available through the getNextFeature()
calls,
and will be stored and retrieved when the map is saved.renderer, usingGeodeticComputation
Constructor and Description |
---|
IlvGraphicLayerDataSource()
Default constructor.
|
IlvGraphicLayerDataSource(IlvInputStream stream)
Reads an
IlvGraphicLayerDataSource from an IlvInputStream |
Modifier and Type | Method and Description |
---|---|
void |
add(IlvGraphic graphic)
Adds an IlvGraphic object (in the manager's coordinate system) to this dynamic datasource.
|
void |
add(IlvGraphic graphic,
IlvCoordinateSystem cs)
Adds an IlvGraphic object using the specified coordinate system to this dynamic datasource.
|
void |
clear()
Clears the list of IlvGraphic in this dynamic datasource.
|
void |
dispose()
This feature iterator method does nothing.
|
IlvGraphic |
get(int index)
Returns the graphic object at specified index.
|
IlvFeatureRenderer |
getDefaultFeatureRenderer()
Returns this data source.
|
IlvMapReusableFeatureIterator |
getFeatureIterator()
Retrieves the feature iterator used by this data source.
|
IlvCoordinate |
getLowerRightCorner()
Returns null.
|
IlvThreadMonitoringData |
getMonitoringData()
Returns the monitorData.
|
IlvMapFeature |
getNextFeature()
Returns the next map feature of the iterator or
null if the iteration is finished. |
IlvCoordinate |
getUpperLeftCorner()
Returns null.
|
boolean |
isGeoreferenced()
Returns false.
|
boolean |
isPersistent()
Returns true.
|
IlvGraphic |
makeGraphic(IlvMapFeature arg0,
IlvCoordinateTransformation transform)
Goes through the vector of known
IlvGraphic registered with add(IlvGraphic) and uses IlvMapGraphic.copy(IlvCoordinateTransformation) to transform them to the new manager transformation. |
boolean |
remove(IlvGraphic graphic)
Removes an IlvGraphic object from this dynamic datasource.
|
void |
restart()
Rewinds the iterator for a new use.
|
void |
setCoordinateSystem(IlvCoordinateSystem coordinateSystem)
This method is not allowed for this data source.
|
void |
setManager(IlvManager manager)
This method sets both the manager and the coordinate system of the data source.
|
void |
setMonitoringData(IlvThreadMonitoringData monitorData)
Sets the monitorData.
|
int |
size()
Returns the number of IlvGraphic in this datasource.
|
void |
start()
Starts this data source and initiates the rendering process.
|
void |
write(IlvOutputStream stream)
Writes an
IlvMapDataSource to an
IlvOutputStream . |
addDataSourceListener, callListeners, createInsertionLayer, getBackupDataSources, getCoordinateSystem, getDescription, getFeatureRenderer, getInsertionLayer, getManager, getMapLayer, getName, getNode, getValidExtentions, hasInsertionLayer, initBackupDataSource, initInsertionLayer, isAttachingAttributes, isGrapherMode, isSaveBackupDataSources, isSourceDataAvailable, isUsingBackupDataSource, isUsingGeodeticComputation, mapIntersects, removeDataSourceListener, reset, setAttachingAttributes, setDescription, setFeatureRenderer, setForceUsingBackupDataSource, setGrapherMode, setInsertionLayer, setName, setSaveBackupDataSources, setValidExtentions, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCoordinateSystem
public IlvGraphicLayerDataSource()
public IlvGraphicLayerDataSource(IlvInputStream stream) throws IlvReadFileException
IlvGraphicLayerDataSource
from an IlvInputStream
stream
- The stream to read from.IlvReadFileException
public void write(IlvOutputStream stream) throws IOException
IlvMapDataSource
to an
IlvOutputStream
.write
in interface IlvPersistentObject
write
in interface IlvFeatureRenderer
write
in class IlvMapDataSource
stream
- The stream to write to.IOException
- thrown when an exception occurs during
the write operation for this object.IlvFeatureRenderer.write(ilog.views.io.IlvOutputStream)
public void restart()
restart
in interface IlvMapReusableFeatureIterator
IlvMapReusableFeatureIterator.restart()
public void start() throws Exception
start
in class IlvMapDataSource
Exception
IlvMapDataSource.start()
public void setCoordinateSystem(IlvCoordinateSystem coordinateSystem)
IlvGraphic
, the coordinate system must be exactly the manager's one, at the moment the object is added.setCoordinateSystem
in class IlvMapDataSource
coordinateSystem
- The coordinate system of this data source.IlvMapDataSource.setCoordinateSystem(ilog.views.maps.srs.coordsys.IlvCoordinateSystem)
public void setManager(IlvManager manager)
setManager
in class IlvMapDataSource
manager
- The manager.setCoordinateSystem(IlvCoordinateSystem)
,
IlvMapDataSource.setManager(ilog.views.IlvManager)
public IlvMapFeature getNextFeature()
null
if the iteration is finished.
The returned map feature must be considered as volatile and
can be modified by the reader during the next call to its
getNextFeature
function.getNextFeature
in interface IlvMapFeatureIterator
IlvMapFeatureIterator.getNextFeature()
public boolean isGeoreferenced()
isGeoreferenced
in interface IlvMapFeatureIterator
IlvMapFeatureIterator.isGeoreferenced()
public IlvCoordinate getUpperLeftCorner()
getUpperLeftCorner
in interface IlvMapFeatureIterator
IlvMapFeatureIterator.getUpperLeftCorner()
public IlvCoordinate getLowerRightCorner()
getLowerRightCorner
in interface IlvMapFeatureIterator
IlvMapFeatureIterator.getLowerRightCorner()
public IlvFeatureRenderer getDefaultFeatureRenderer()
getDefaultFeatureRenderer
in interface IlvMapFeatureIterator
IlvMapFeatureIterator.getLowerRightCorner()
public void dispose()
dispose
in interface IlvMapFeatureIterator
IlvMapFeatureIterator.dispose()
public IlvGraphic makeGraphic(IlvMapFeature arg0, IlvCoordinateTransformation transform)
IlvGraphic
registered with add(IlvGraphic)
and uses IlvMapGraphic.copy(IlvCoordinateTransformation)
to transform them to the new manager transformation.makeGraphic
in interface IlvFeatureRenderer
arg0
- The map feature to translate.transform
- The transformation used to convert coordinates of the map
feature.IlvFeatureRenderer.makeGraphic(ilog.views.maps.IlvMapFeature, ilog.views.maps.srs.coordtrans.IlvCoordinateTransformation)
public boolean isPersistent()
isPersistent
in interface IlvFeatureRenderer
IlvFeatureRenderer.isPersistent()
public void add(IlvGraphic graphic)
graphic
- graphic object to manage with this datasource.public void add(IlvGraphic graphic, IlvCoordinateSystem cs)
graphic
- graphic object to manage with this datasource.cs
- coordinate system used by the graphics passed.public boolean remove(IlvGraphic graphic)
graphic
- graphic object to manage with this datasource.true
if the data source contained this graphic.public int size()
public IlvGraphic get(int index)
index
- index of IlvGraphic to return.ArrayIndexOutOfBoundsException
- index is out of rangepublic void clear()
public IlvMapReusableFeatureIterator getFeatureIterator()
getFeatureIterator
in class IlvMapDataSource
IlvMapDataSource.getFeatureIterator()
public IlvThreadMonitoringData getMonitoringData()
public void setMonitoringData(IlvThreadMonitoringData monitorData)
monitorData
- The monitorData to set.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.