Class TLcyCompositeCameraLinkerFactory
- All Implemented Interfaces:
Iterable<ALcyCameraLinkerFactory>
Composite implementation of ALcyCameraLinkerFactory
.
- Since:
- 2012.0
- See Also:
-
Field Summary
Fields inherited from class com.luciad.lucy.util.TLcyGenericComposite
PRIORITY_DEFAULT, PRIORITY_FALLBACK
-
Constructor Summary
ConstructorDescriptionDefault constructor.TLcyCompositeCameraLinkerFactory
(ILcyLucyEnv aLucyEnv) Construct aTLcyCompositeCameraLinkerFactory
working on the Lucy back-end. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canCreateCameraLinker
(ILcyGenericMapComponent<? extends ILcdView, ? extends ILcdLayer> aMapComponent, String aType, List<Object> aObjects, List<ILcdModel> aModels) Consults the leafALcyCameraLinkerFactory
instances to see if this composite factory can create anALcyCameraLinker
.createCameraLinker
(ILcyGenericMapComponent<? extends ILcdView, ? extends ILcdLayer> aMapComponent, String aType, List<Object> aObjects, List<ILcdModel> aModels) This composite implementation consults all the leafALcyCameraLinkerFactory
instances to create anALcyCameraLinker
.Methods inherited from class com.luciad.lucy.util.TLcyGenericComposite
add, add, getList, getPriority, iterator, remove
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TLcyCompositeCameraLinkerFactory
public TLcyCompositeCameraLinkerFactory()Default constructor.
The created instance will only work on the
ALcyCameraLinkerFactory
instances registered to it. If you want to use all registeredALcyCameraLinkerFactory
instances of the Lucy back-end, useTLcyCompositeCameraLinkerFactory(com.luciad.lucy.ILcyLucyEnv)
instead.- See Also:
-
TLcyCompositeCameraLinkerFactory
Construct a
TLcyCompositeCameraLinkerFactory
working on the Lucy back-end.It will use all
ALcyCameraLinkerFactory
instances registered to the back-end, and adding and/or removingALcyCameraLinkerFactory
to/from thisTLcyCompositeCameraLinkerFactory
will respectively add/remove it as service from the back-end.If you want to create a
TLcyCompositeCameraLinkerFactory
which does not use the back-end, useTLcyCompositeCameraLinkerFactory()
instead.- Parameters:
aLucyEnv
- The Lucy back-end- See Also:
-
-
Method Details
-
canCreateCameraLinker
public boolean canCreateCameraLinker(ILcyGenericMapComponent<? extends ILcdView, ? extends ILcdLayer> aMapComponent, String aType, List<Object> aObjects, List<ILcdModel> aModels) Consults the leaf
ALcyCameraLinkerFactory
instances to see if this composite factory can create anALcyCameraLinker
. It respects the priority of theALcyCameraLinkerFactory
instances: factories with a higher priority will be consulted before factories with a lower priority.- Parameters:
aMapComponent
- The map component in which the camera linker should link the camera.aType
- The camera type. See general javadoc of this class.aObjects
- The objects to track. See general javadoc of this class.aModels
- The models belonging to the objects. Should have same size as aObjects.- Returns:
true
if it can create a camera linker,false
if not.- See Also:
-
createCameraLinker
public ALcyCameraLinker createCameraLinker(ILcyGenericMapComponent<? extends ILcdView, ? extends ILcdLayer> aMapComponent, String aType, List<Object> aObjects, List<ILcdModel> aModels) This composite implementation consults all the leaf
ALcyCameraLinkerFactory
instances to create anALcyCameraLinker
. It respects the priority of theALcyCameraLinkerFactory
instances: factories with a higher priority will be consulted before factories with a lower priority.- Parameters:
aMapComponent
- The map component in which the camera linker should link the camera.aType
- The camera type. See general javadoc of this class.aObjects
- The objects to track. See general javadoc of this class.aModels
- The models belonging to the objects. Should have same size as aObjects.- Returns:
- The newly created camera linker, can never be
null
. - Throws:
IllegalArgumentException
- When no camera linker factory compatible with the given parameters is part of this composite factory, an exception will be thrown. Therefore we suggest to only call this method if#canCreateCameraLinker
returnedtrue
for the given parameters.
-