public abstract class ALcyDefaultModelDescriptorFactory extends Object
Factory to create ILcdModelDescriptor
s. This factory is typically registered as a service to
ILcyLucyEnv
.
Contrary to a lot of other factories that can be registered to (a manager of)
ILcyLucyEnv
, this factory does not have a canCreate
facility (or
something similar by throwing IllegalArgumentException
from the create
method). So if several ALcyModelDescriptorFactory
s are registered to
ILcyLucyEnv
, there is no programmatic way to choose one. Instead, only the end user
can choose which one to use, which explains the need for a displayName
property.
For an example of how that can work, please refer to
TLcyCreateGXYLayerAction
.
Modifier | Constructor and Description |
---|---|
protected |
ALcyDefaultModelDescriptorFactory()
Creates a new
ALcyDefaultModelDescriptorFactory . |
Modifier and Type | Method and Description |
---|---|
abstract ILcdModelDescriptor |
createDefaultModelDescriptor()
Creates an
ILcdModelDescriptor that is ready to be used. |
String |
getDisplayName()
Returns the display name (that can be presented to an end-user) for this factory.
|
protected ALcyDefaultModelDescriptorFactory()
ALcyDefaultModelDescriptorFactory
.public String getDisplayName()
Returns the display name (that can be presented to an end-user) for this factory.
The default implementation returns the display name of a model descriptor created by createDefaultModelDescriptor()
.
public abstract ILcdModelDescriptor createDefaultModelDescriptor()
ILcdModelDescriptor
that is ready to be used. An example use could be
to pass the created descriptor to an ILcdModelFactory
.ILcdModelDescriptor
that is ready to be used.