public abstract class ALcyGeneralFormat extends ALcyFormat
ALcyFormat
that works on general data formats (not necessarily files on disk), but
provides some nice extras:
ALcyProperties
instance passed in the constructor through the following key-value pairs:
# Properties to configure the asynchronous paint hint provider (seeALcyFormat.getAsynchronousPaintHintProvider()
). # Note that configuring the paint hint provider is not sufficient to enable asynchronous painting. # the format still needs to be wrapped with aTLcyAsynchronousFormatWrapper
for asynchronous painting. # When true, it indicates that an async paint hint provider must be created propertyPrefix.asynchronous = true # String value for theTLcyAsynchronousPaintHint.getMergeGroup()
propertyPrefix.asynchronous.mergeGroup = myMergeGroup # Boolean: when true, only the bodies are asynchronous. SeeTLcyAsynchronousPaintHint.isBodiesOnly()
propertyPrefix.asynchronous.bodiesOnly = false # Integer: seeTLcyAsynchronousPaintHint.getMinimumThreadPriority()
propertyPrefix.asynchronous.minimumThreadPriority = 0
ALcyProperties
instance passed in the constructor through the following key-value pairs:
# Properties to configure the label placement hint provider (seeALcyFormat.getLabelPlacementHintProvider()
). # String value for theTLcyGXYLabelPlacementHint.getLabelPlacementGroup()
propertyPrefix.labelPlacementGroup = myLabelPlacementGroup
ILcdModelDecoder
.ILcdModelDescriptor
of a decoded ILcdModel
can again be provided to the ILcdModelDecoder
to get the model back.ILcdModelEncoder
is available, and when saving an ILcdModel
under a different name using ILcdModel.getModelEncoder().export
, the source name of
the ILcdModelDescriptor
of the ILcdModel
is updated. This is usually
only applicable for files, but not necessarily restricted to it.ILcdModel
is
deterministic. It uses this information to for example remember the selected objects. If the
order does change, it will not throw exceptions, but side effects such as incorrectly restoring
the selection and warning messages could appear. Replacing the codecs created by
createDomainObjectWorkspaceCodecs
can remove this assumption.ILcdModelDecoder
returns a TLcdModelList
, that the
sub-models are always in the same order for the same data source.Modifier | Constructor and Description |
---|---|
protected |
ALcyGeneralFormat(ILcyLucyEnv aLucyEnv,
Class aClass,
ALcyProperties aProperties)
Deprecated.
Better use the constructor with explicit long and short prefix, to avoid any
confusion.
Functionally equivalent to
ALcyGeneralFormat(aLucyEnv, ALcyTool.getLongPrefix(aClass),
ALcyTool.getShortPrefix(aClass), aProperties) . |
protected |
ALcyGeneralFormat(ILcyLucyEnv aLucyEnv,
String aLongPrefix,
String aShortPrefix,
ALcyProperties aProperties)
Creates a
ALcyGeneralFormat for the specified Lucy backend. |
protected |
ALcyGeneralFormat(ILcyLucyEnv aLucyEnv,
String aLongPrefix,
String aShortPrefix,
ALcyProperties aProperties,
String aPropertyPrefix)
Creates a
ALcyGeneralFormat for the specified Lucy backend. |
Modifier and Type | Method and Description |
---|---|
protected ILcyAsynchronousPaintHintProvider |
createAsynchronousPaintHintProvider()
Creates a
ILcyAsynchronousPaintHintProvider for this format. |
protected ALcyWorkspaceObjectCodec[] |
createDomainObjectWorkspaceCodecs()
Creates the
ALcyWorkspaceObjectCodec that can encode and decode the
ILcyCustomizerPanel instances for the domain objects produced by the model decoders
of this format. |
protected ILcyGXYLabelPlacementHintProvider |
createLabelPlacementHintProvider()
Creates the
ILcyLabelPlacementHintProvider that can create a
TLcyGXYLabelPlacementHint |
protected ALcyWorkspaceObjectCodec[] |
createModelWorkspaceCodecs()
Creates the
ALcyWorkspaceObjectCodec codecs that can encode and decode the
ILcdModel instances produces by the model decoders of this format. |
String |
getLongPrefix()
Returns the long prefix of this format that can be used, for instance, to derive UID's.
|
ILcyLucyEnv |
getLucyEnv()
Returns the
ILcyLucyEnv backend with which this ALcyFormat is
associated. |
ALcyProperties |
getProperties()
Returns the
ALcyProperties holding the configuration of this format. |
String |
getPropertyPrefix()
Returns the prefix that is used when deriving keys to retrieve configuration properties.
|
String |
getShortPrefix()
Returns the short prefix of this format that can be used, for example, by the workspace codecs when writing information to the workspace.
|
createAll, createBalloonContentProviders, createDataPropertyValueCustomizerPanelFactories, createDataSourceHandlerFileTypeDescriptorGroups, createDataSourceHandlerFileTypeDescriptors, createDataSourceHandlers, createDefaultModelDescriptorFactories, createDomainObjectCustomizerPanelFactories, createDomainObjectCustomizerPanelWorkspaceCodecs, createFormatBarFactory, createGXYLayerCustomizerPanelFactories, createGXYLayerCustomizerPanelWorkspaceCodecs, createGXYLayerDecoderFileTypeDescriptors, createGXYLayerDecoders, createGXYLayerEncoderFileTypeDescriptors, createGXYLayerEncoders, createGXYLayerFactory, createGXYLayerOfFormatFilter, createGXYLayerSelectionTransferHandlers, createGXYLayerStyleProvider, createGXYLayerTypeProvider, createGXYLayerWorkspaceCodecs, createLayerContextOfFormatFilter, createLayerHeightProviderFactory, createLayerMeasureProviderFactory, createModelContentTypeProvider, createModelContextOfFormatFilter, createModelCustomizerPanelFactories, createModelCustomizerPanelWorkspaceCodecs, createModelDecoderFileTypeDescriptorGroups, createModelDecoderFileTypeDescriptors, createModelDecoders, createModelEncoderCustomizerPanelFactories, createModelEncoderCustomizerPanelWorkspaceCodecs, createModelEncoderFileTypeDescriptors, createModelEncoders, createModelFactory, createModelHeightProviderFactory, createModelMeasureProviderFactory, createModelMetaDataCustomizerPanelFactories, createModelMetaDataCustomizerPanelWorkspaceCodecs, createModelOfFormatFilter, getAsynchronousPaintHintProvider, getBalloonContentProviders, getDataPropertyValueCustomizerPanelFactories, getDataSourceHandlerFileTypeDescriptorGroups, getDataSourceHandlerFileTypeDescriptors, getDataSourceHandlers, getDefaultModelDescriptorFactories, getDomainObjectCustomizerPanelFactories, getDomainObjectCustomizerPanelWorkspaceCodecs, getDomainObjectWorkspaceCodecs, getFormatBarFactory, getGXYLayerCustomizerPanelFactories, getGXYLayerCustomizerPanelWorkspaceCodecs, getGXYLayerDecoderFileTypeDescriptors, getGXYLayerDecoders, getGXYLayerEncoderFileTypeDescriptors, getGXYLayerEncoders, getGXYLayerFactory, getGXYLayerSelectionTransferHandlers, getGXYLayerStyleProvider, getGXYLayerTypeProvider, getGXYLayerWorkspaceCodecs, getLabelPlacementHintProvider, getLayerHeightProviderFactory, getLayerMeasureProviderFactory, getModelContentTypeProvider, getModelCustomizerPanelFactories, getModelCustomizerPanelWorkspaceCodecs, getModelDecoderFileTypeDescriptorGroups, getModelDecoderFileTypeDescriptors, getModelDecoders, getModelEncoderCustomizerPanelFactories, getModelEncoderCustomizerPanelWorkspaceCodecs, getModelEncoderFileTypeDescriptors, getModelEncoders, getModelFactory, getModelHeightProviderFactory, getModelMeasureProviderFactory, getModelMetaDataCustomizerPanelFactories, getModelMetaDataCustomizerPanelWorkspaceCodecs, getModelWorkspaceCodecs, isGXYLayerOfFormat, isModelOfFormat, toString
@Deprecated protected ALcyGeneralFormat(ILcyLucyEnv aLucyEnv, Class aClass, ALcyProperties aProperties)
ALcyGeneralFormat(aLucyEnv, ALcyTool.getLongPrefix(aClass),
ALcyTool.getShortPrefix(aClass), aProperties)
.aLucyEnv
- The Lucy backend for which to create this format. Must not be
null
.aClass
- A representative class for using this ALcyApplicationPaneTool
,
normally an extension of ALcyAddOn
. It is used to retrieve the
long and short prefixes using getLongPrefix
and getShortPrefix
. These prefixes are stored in workspace files, so if
backward compatibility is a concern (e.g. read an old workspace file), the
given class or its name must never change.aProperties
- The ALcyProperties
instance holding the configuration for this
format. Must not be null
.ALcyGeneralFormat(ILcyLucyEnv, String, String, ALcyProperties)
protected ALcyGeneralFormat(ILcyLucyEnv aLucyEnv, String aLongPrefix, String aShortPrefix, ALcyProperties aProperties)
ALcyGeneralFormat
for the specified Lucy backend.aLucyEnv
- The Lucy backend for which to create this format. Must not be null
.aLongPrefix
- The long prefix of this format. See getLongPrefix()
. Must not be null
.aShortPrefix
- The short prefix of this format. This prefix will also be set as the property prefix and be used when reading values from aProperties
.
See getShortPrefix()
and getPropertyPrefix()
.
Must not be null
.aProperties
- The ALcyProperties
instance holding the configuration for this
format. Must not be null
.protected ALcyGeneralFormat(ILcyLucyEnv aLucyEnv, String aLongPrefix, String aShortPrefix, ALcyProperties aProperties, String aPropertyPrefix)
ALcyGeneralFormat
for the specified Lucy backend.aLucyEnv
- The Lucy backend for which to create this format. Must not be null
.aLongPrefix
- The long prefix of this format. See getLongPrefix()
. Must not be null
.aShortPrefix
- The short prefix of this format. See getShortPrefix()
Must not be null
.aProperties
- The ALcyProperties
instance holding the configuration for this
format. Must not be null
.aPropertyPrefix
- The prefix to use when deriving keys to use for the ALcyProperties
.
Typically this is only different from aShortPrefix
when the properties contain settings
for multiple formats.public ILcyLucyEnv getLucyEnv()
ALcyFormat
Returns the ILcyLucyEnv
backend with which this ALcyFormat
is
associated.
getLucyEnv
in class ALcyFormat
ILcyLucyEnv
backend. Must not be null
.public String getLongPrefix()
ALcyFormat
Returns the long prefix of this format that can be used, for instance, to derive UID's. Typically this would be the fully qualified name of the addon.
getLongPrefix
in class ALcyFormat
null
.public String getShortPrefix()
Returns the short prefix of this format that can be used, for example, by the workspace codecs when writing information to the workspace. Typically this is the class name of add-on.
This prefix should not be used when you want to read values from the properties of this format.
Use getPropertyPrefix()
in that case.
getShortPrefix
in class ALcyFormat
getPropertyPrefix()
,
ALcyTool.getShortPrefix(Class)
public String getPropertyPrefix()
getProperties()
instance.public ALcyProperties getProperties()
ALcyProperties
holding the configuration of this format.
It's strongly recommended to use keys that start with a format specific property prefix.ALcyProperties
holding the configuration. Never null
.protected ILcyAsynchronousPaintHintProvider createAsynchronousPaintHintProvider()
ALcyFormat
Creates a ILcyAsynchronousPaintHintProvider
for this format.
createAsynchronousPaintHintProvider
in class ALcyFormat
ILcyAsynchronousPaintHintProvider
for the layers created by the layer
factories of this format. May be null
.TLcySafeGuardFormatWrapper
protected ALcyWorkspaceObjectCodec[] createModelWorkspaceCodecs()
ALcyFormat
Creates the ALcyWorkspaceObjectCodec
codecs that can encode and decode the
ILcdModel
instances produces by the model decoders of this format.
createModelWorkspaceCodecs
in class ALcyFormat
ALcyWorkspaceObjectCodec
instances. Must not be
null
, but may have length 0
. Must not contain
null
.TLcySafeGuardFormatWrapper
protected ALcyWorkspaceObjectCodec[] createDomainObjectWorkspaceCodecs()
ALcyFormat
Creates the ALcyWorkspaceObjectCodec
that can encode and decode the
ILcyCustomizerPanel
instances for the domain objects produced by the model decoders
of this format.
createDomainObjectWorkspaceCodecs
in class ALcyFormat
ALcyWorkspaceObjectCodec
instances. Must not be
null
but may have length 0
. Must not contain
null
.TLcySafeGuardFormatWrapper
protected ILcyGXYLabelPlacementHintProvider createLabelPlacementHintProvider()
ILcyLabelPlacementHintProvider
that can create a
TLcyGXYLabelPlacementHint for layers of this format.
This implementation return an ILcyLabelPlacementHintProvider
that
creates a TLcyGXYLabelPlacementHint
containing a labeling group.
The labeling group is read from the format's configuration file.
createLabelPlacementHintProvider
in class ALcyFormat
ILcyLabelPlacementHintProvider
.TLcySafeGuardFormatWrapper