public class TLcdKML22GXYViewParametersUpdater extends Object
TLcdKML22Parameters
which are derived from a 2D view.
A property change listener can be attached to the view to update the KML parameters whenever a a
relevant view property has been changed, as follows:
ILcdGXYView view = ... TLcdKMl22GXYViewParametersUpdater updater = .. view.addPropertyChangeListener( new PropertyChangeListener() { public void propertyChange( PropertyChangeEvent evt ) { // The KML parameters are computed from the worldOrigin and scale. if ( "worldOrigin".equals( evt.getPropertyName() ) || "scale".equals( evt.getPropertyName() ) ) { updater.updateParameters(view); } } } );
Constructor and Description |
---|
TLcdKML22GXYViewParametersUpdater(TLcdKML22Parameters aParameters)
Creates a new updater that will update the specified KML parameter map whenever the
updateParameters method is called. |
Modifier and Type | Method and Description |
---|---|
void |
updateParameters(ILcdGXYView aView)
Updates the parameters of the KML parameter map of this updater according to the state of the
specified view.
|
public TLcdKML22GXYViewParametersUpdater(TLcdKML22Parameters aParameters)
updateParameters
method is called.aParameters
- A KML parameter map to be synchronized with a view.public void updateParameters(ILcdGXYView aView)
Updates the parameters of the KML parameter map of this updater according to the state of the specified view.
This method will also configure the asynchronousAllowed value of the KML
parameters, based on the ILcdGXYView.isAsynchronousAllowed()
method. If synchronous is not
allowed, then the parameter will be set to false,
otherwise it will be set to true
aView
- the view from which to derive KML parameter values.