TLcdVVTerrainModel
instead.@Deprecated public class TLcdVVTerrainProfileModel extends ALcdVVModel
ILcdVVModel
to show a terrain profile in a Vertical View.
The preferred way of using this class is:
setGXYView()
to set the view that contains the rasters.setPointListGXYLayer()
to set the layer that contains the point list
for which the profile should be shown.setPointList()
to set the point list for which the profile should be
displayed.update()
to update the model.For backward compatibility, it is possible to skip the setting of the point list and call
updateTerrainProfileModel()
to automatically find the first selected point list in
the given layer and update the profile model with this one.
Modifier and Type | Field and Description |
---|---|
protected ILcdPointList |
fAboveTerrainPointList
Deprecated.
An
ILcdPointList indicating the terrain profile |
Constructor and Description |
---|
TLcdVVTerrainProfileModel()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
double |
getDistance(int i,
int j)
Deprecated.
Returns the distance between the given two points.
|
ILcdGXYView |
getGXYView()
Deprecated.
Returns the view on which the point list is painted and which contains the rasters.
|
ILcdPoint |
getPoint(int aPointIndex)
Deprecated.
|
int |
getPointCount()
Deprecated.
|
ILcdPointList |
getPointList()
Deprecated.
Gets the point list for which the terrain elevation will be displayed.
|
ILcdGXYLayer |
getPointListGXYLayer()
Deprecated.
Returns the layer that contains the point list for which the profile is shown.
|
protected ILcdPointList |
getPolylineInView()
Deprecated.
Preferred usage: set point list manually using setPointList().
|
TLcdProfileGenerator |
getProfileGenerator()
Deprecated.
Gets the TLcdProfileGenerator utility class that will be used for generating profiles.
|
int |
getScanResolution()
Deprecated.
Gets the scan resolution.
|
ILcdPoint[] |
getSegmentProfile(int aSegmentIndex)
Deprecated.
Returns an array containing the terrain elevation data for a certain segment.
|
int |
getSubProfileCount()
Deprecated.
|
boolean |
isAboveTerrain()
Deprecated.
|
boolean |
isAutoUpdate()
Deprecated.
If this property is true, this class will listen for changes to the current point list by
adding a listener to the model and update the model (and the view) automatically when
the point list is changed.
|
boolean |
isEditable()
Deprecated.
|
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
double |
maxZ(int aSubProfilePointIndex,
int aSegmentIndex,
int aSubProfileIndex)
Deprecated.
|
double |
minZ(int aSubProfilePointIndex,
int aSegmentIndex,
int aSubProfileIndex)
Deprecated.
|
void |
setAboveTerrain(boolean aAboveTerrain)
Deprecated.
If set to
true , the terrain elevation will be added to the height of the
point list's points. |
void |
setAutoUpdate(boolean aAutoUpdate)
Deprecated.
Set autoUpdate on/off.
|
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setGXYView(ILcdGXYView aView)
Deprecated.
Set the view on which the point list is painted and which contains the rasters.
|
void |
setPointList(ILcdPointList aPointList)
Deprecated.
Set the point list for which the terrain elevation will be displayed.
|
void |
setPointListGXYLayer(ILcdGXYLayer aGXYLayer)
Deprecated.
Set the layer that contains the point list for which the profile is shown.
|
void |
setPointZ(int aIndex,
double aZ,
boolean isLastInRow)
Deprecated.
This method will be called whenever a point of the main-profile is
being dragged so that its Z-dimension needs to be changed.
|
void |
setProfileGenerator(TLcdProfileGenerator aProfileGenerator)
Deprecated.
Set the TLcdProfileGenerator utility class that will be used for generating profiles.
|
void |
setScanResolution(int aScanResolution)
Deprecated.
Set the resolution of the scan used to build the profile.
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
float |
stepLenghtRatio(int aSubProfilePointIndex,
int aSegmentIndex,
int aSubProfileIndex)
Deprecated.
Returns where the given sub-profile point is positioned on the X-axis.
|
int |
subProfilePointCount(int aSegmentIndex,
int aSubProfileIndex)
Deprecated.
Returns the number of points (steps) of a sub-profile for the given main profile segment.
|
boolean |
update(boolean aFireEvent)
Deprecated.
Causes the model to update itself.
|
void |
updateTerrainProfileModel()
Deprecated.
Use update( boolean ).
|
addChangeListener, fireChangeModel, removeChangeListener
protected ILcdPointList fAboveTerrainPointList
ILcdPointList
indicating the terrain profilepublic double getDistance(int i, int j)
ALcdVVModel
geodetic
,
rhumb
, or
cartesian
distances.getDistance
in interface ILcdVVModel
getDistance
in class ALcdVVModel
i
- the index of the first point on the main profile.j
- the index of the second point on the main profilepublic TLcdProfileGenerator getProfileGenerator()
setProfileGenerator(TLcdProfileGenerator)
public void setProfileGenerator(TLcdProfileGenerator aProfileGenerator)
aProfileGenerator
- the TLcdProfileGenerator instance.getProfileGenerator()
public void setPointList(ILcdPointList aPointList)
pointList
and pointListGXYLayer
combination is set, the method update(boolean)
should be called to
update the internal state of this instance.aPointList
- The ILcdPointList
to be setgetPointList()
,
update(boolean)
public ILcdPointList getPointList()
setPointList(ILcdPointList)
public void setPointListGXYLayer(ILcdGXYLayer aGXYLayer)
pointList
and pointListGXYLayer
combination is set, the method update(boolean)
should be called to
update the internal state of this instance.aGXYLayer
- the layer that contains the point list for which the profile is shown.getPointListGXYLayer()
,
update(boolean)
public ILcdGXYLayer getPointListGXYLayer()
setPointListGXYLayer( ILcdGXYLayer )
public void setGXYView(ILcdGXYView aView)
aView
- the view on which the point list is painted and which contains the rasters.getGXYView()
public ILcdGXYView getGXYView()
setGXYView(com.luciad.view.gxy.ILcdGXYView)
public boolean update(boolean aFireEvent)
pointList
and pointListGXYLayer
combination to this
instance. The method will update the terrain profile it represents and, depending on the
fire event argument, will fire a change event when the update is done.aFireEvent
- A flag indicating whether a change event should be fired.true
if terrain data was found, false
otherwise.public ILcdPoint[] getSegmentProfile(int aSegmentIndex)
aSegmentIndex
- The index of the required segment.public int getScanResolution()
setScanResolution(int)
public void setScanResolution(int aScanResolution)
aScanResolution
- A positive and non-zero integer.getScanResolution()
public int subProfilePointCount(int aSegmentIndex, int aSubProfileIndex) throws IndexOutOfBoundsException
ILcdVVModel
aSegmentIndex
- the index of the segment in the main profileaSubProfileIndex
- the index of the sub-profile to useIndexOutOfBoundsException
public int getPointCount()
public double minZ(int aSubProfilePointIndex, int aSegmentIndex, int aSubProfileIndex) throws IndexOutOfBoundsException
aSubProfilePointIndex
- the index of the sub-profile point whose altitude to retrieveaSegmentIndex
- the main-profile segment of the sub-profile point
A segment is a line-piece drawn between two
main-profile points.aSubProfileIndex
- the index of the sub-profile to useIndexOutOfBoundsException
public ILcdPoint getPoint(int aPointIndex) throws IndexOutOfBoundsException
aPointIndex
- the index of the point in the main profileIndexOutOfBoundsException
ILcdVVModel.setPointZ(int, double, boolean)
public void setPointZ(int aIndex, double aZ, boolean isLastInRow) throws IndexOutOfBoundsException
ILcdVVModel
aIndex
- The index of the point being dragged.aZ
- The new altitude for the point.isLastInRow
- While the user is dragging the point,
this parameter will be false, at the release of the mouse
this parameter will be true.IndexOutOfBoundsException
public int getSubProfileCount()
ILcdVVModel
.public boolean isEditable()
public double maxZ(int aSubProfilePointIndex, int aSegmentIndex, int aSubProfileIndex) throws IndexOutOfBoundsException
aSubProfilePointIndex
- the index of the sub-profile point whose altitude to retrieveaSegmentIndex
- the main-profile segment to retrieve the step length for.
A segment is a line-piece drawn between two
main-profile points.aSubProfileIndex
- the index of the sub-profile to useIndexOutOfBoundsException
public float stepLenghtRatio(int aSubProfilePointIndex, int aSegmentIndex, int aSubProfileIndex) throws IndexOutOfBoundsException
ILcdVVModel
aSubProfilePointIndex
- defines the step. It is the point to the right
of the step, so it can never be less than 1,aSegmentIndex
- the main-profile segment to retrieve the step length for.
A segment is a line-piece drawn between two
main-profile points.aSubProfileIndex
- the sub-profile to retrieve the step length ratio forIndexOutOfBoundsException
public boolean isAutoUpdate()
public void setAutoUpdate(boolean aAutoUpdate)
aAutoUpdate
- A flag indicating whether the auto update property is on or off.isAutoUpdate()
public void setAboveTerrain(boolean aAboveTerrain)
true
, the terrain elevation will be added to the height of the
point list's points.
Note that the height of the point list's points cannot be edited with setPointZ()
when aboveTerrain is true
.aAboveTerrain
- Indicates whether heights are above terrain or not.public boolean isAboveTerrain()
setAboveTerrain(boolean)
public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.public void setTraceOn(boolean aTraceOn)
true
or false
as argument automatically turns
off tracing for all other class instances for which
setTraceOn
has not been called.
If the argument is false
then only the informative, warning
and error log messages are recorded.aTraceOn
- if true then all log messages are recorded for this
instance. If false, then only the informative, warning and
error log messages are recorded.public boolean isTraceOn()
true
if tracing is enabled for this class.public void updateTerrainProfileModel()
ILcdPointList
in fPointListGXYLayer
.
This method will search for the first selected ILcdPointList
and update itself (and as a side-effect also the Vertical View it belongs to).update(boolean)
protected ILcdPointList getPolylineInView()