public class TLcdNVGGXYPainterProvider extends Object implements ILcdGXYPainterProvider, ILcdGXYEditorProvider
By default, retrieved painters will paint NVG domain objects as defined in the standard.
The retrieved painters use the TLcdNVGStyle
and the TLcdNVGSymbol
of an element for its visualization.
If the standard defined in TLcdNVGSymbol
specifies how an object should be rendered, the symbol has
precedence over the style.
Other painter providers can be registered
for domain specific symbol sets
.
If an element has a symbol with an unsupported standard, only the style is used for visualization.
If an element doesn't have a style set, a configurable
style with default values according to NVG specifications is used.
Style customization of military symbols is possible by setting an ILcdAPP6AStyle
and
an ILcdMS2525bStyle
.
Constructor and Description |
---|
TLcdNVGGXYPainterProvider() |
Modifier and Type | Method and Description |
---|---|
TLcdNVGGXYPainterProvider |
clone()
Redefines
Object.clone to make it public. |
ILcdAPP6AStyle |
getDefaultAPP6AStyle()
Returns the default symbology style for APP-6 domain objects that do not contain any styling.
|
ILcdMS2525bStyle |
getDefaultMS2525bStyle()
Returns the default symbology style for MIL-STD 2525 domain objects that do not contain any styling.
|
TLcdNVGStyle |
getDefaultNVGStyle()
Returns the
TLcdNVGStyle used for objects without styling information. |
ILcdGXYEditor |
getGXYEditor(Object aObject)
Finds an
ILcdGXYEditor that can be used to edit the object passed. |
ILcdGXYPainter |
getGXYPainter(Object aObject)
Finds an
ILcdGXYPainter that can be used to paint or locate the object passed. |
void |
registerPainterEditorProviders(String aStandardName,
ILcdGXYPainterProvider aPainterProvider,
ILcdGXYEditorProvider aEditorProvider)
Allows to use external painter and editor providers for a domain specific standard.
|
void |
setDefaultAPP6AStyle(ILcdAPP6AStyle aDefaultAPP6AStyle)
Sets the default symbology style for APP-6 domain objects that do not contain any styling.
|
void |
setDefaultMS2525bStyle(ILcdMS2525bStyle aDefaultMS2525bStyle)
Sets the default symbology style for MIL-STD 2525 domain objects that do not contain any styling.
|
void |
setDefaultNVGStyle(TLcdNVGStyle aDefaultNVGStyle)
Set the default
TLcdNVGStyle of this painter provider. |
public TLcdNVGStyle getDefaultNVGStyle()
TLcdNVGStyle
used for objects without styling information.setDefaultNVGStyle(TLcdNVGStyle)
public void setDefaultNVGStyle(TLcdNVGStyle aDefaultNVGStyle)
TLcdNVGStyle
of this painter provider.
This NVG Style allows to override the default values of the style attributes from NVG specifications. These values will be used to visualize an object if neither its style neither a style of its ancestors explicitly set these attributes. If some values aren't set on this style, the painters will use the ones from the specifications.
For example, if the default style defines a font, that font is used for every element that does not define its font.
This style is not used for military symbols, see setDefaultAPP6AStyle(com.luciad.symbology.app6a.view.gxy.ILcdAPP6AStyle)
/setDefaultMS2525bStyle(com.luciad.symbology.milstd2525b.view.gxy.ILcdMS2525bStyle)
instead.
aDefaultNVGStyle
- a default nvg stylepublic ILcdMS2525bStyle getDefaultMS2525bStyle()
ILcdMS2525bStyle
instance.public void setDefaultMS2525bStyle(ILcdMS2525bStyle aDefaultMS2525bStyle)
aDefaultMS2525bStyle
- the default MS2525 Style for the painter providerpublic ILcdAPP6AStyle getDefaultAPP6AStyle()
ILcdAPP6AStyle
instance.public void setDefaultAPP6AStyle(ILcdAPP6AStyle aDefaultAPP6AStyle)
aDefaultAPP6AStyle
- the default APP6A Style for the painter providerpublic ILcdGXYPainter getGXYPainter(Object aObject)
ILcdGXYPainter
that can be used to paint or locate the object passed.
The painter provider is responsible for setting the object to the painter before returning the painter. An implementation should therefore have the following structure:
public ILcdGXYPainter getGXYPainter(Object aObject) {
ILcdGXYPainter painter = ... // find the painter for the object
if (painter != null) {
painter.setObject(aObject);
}
return painter;
}
getGXYPainter
in interface ILcdGXYPainterProvider
aObject
- the object to find a painter forpublic void registerPainterEditorProviders(String aStandardName, ILcdGXYPainterProvider aPainterProvider, ILcdGXYEditorProvider aEditorProvider)
TLcdNVGSymbol
).
Editor provider can be null
.aStandardName
- name of the standard
aPainterProvider
- a painter provideraEditorProvider
- a editor provider, can be null
public ILcdGXYEditor getGXYEditor(Object aObject)
ILcdGXYEditor
that can be used to edit the object passed.
The editor provider is responsible for setting the object to the editor before returning the editor. An implementation should therefore have the following structure:
public ILcdGXYEditor getGXYEditor(Object aObject) {
ILcdGXYEditor editor = ... // find the editor for the object
editor.setObject( aObject );
return editor;
}
getGXYEditor
in interface ILcdGXYEditorProvider
aObject
- the object to find an editor forpublic TLcdNVGGXYPainterProvider clone()
Object.clone
to make it public.clone
in interface ILcdCloneable
clone
in interface ILcdGXYEditorProvider
clone
in interface ILcdGXYPainterProvider
clone
in class Object
Object.clone()