@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface MapTileProvider
WorldRenderPainter
that is a map
provider. The provider may use one of the two options.
One option is to extend Tile
and the tiles will be managed by
the WorldRenderPainter
.
The second option is to implement MapPainterProvider
and will
be essentially a Renderer2DPainter
with no managed by the
WorldRenderPainter
except if it should paint or not.
getMaxLevelOfDetail()
returning
the max level of detail to use the WorldRenderPainter.MAX_LEVEL_OF_DETAIL
will be used.
Tile
s a public static method getTilesMap()
returning
Map
<String, Tile
>
is needed.
Tile
s a public static void clearDiskCache() {
Tile.clearDiskCache(tileClassId);
}
MUST be created.
isFetchableOrGenerated
returning a
boolean. true
if the tiles are fetch outside and allow all tiles to
be fetch at ounce for the current level of detail (StateRenderer2D.getLevelOfDetail()
)
plus 2 more levels up.
NeptusProperty
and usePropertiesOrCustomOptionsDialog()
to true
the WorldRenderPainter
will try to call a public static method
staticPropertiesChanged()
in order for you to save the properties to disc or
adjust the tile behavior.
In the case of usePropertiesOrCustomOptionsDialog()
equals to false, that is because
the map provider will be using a custom options dialog. In this case a method with signature
public JDialog getOptionsDialog(JDialog parent)
or
public JDialog getOptionsDialog(JDialog parent, StateRenderer2D renderer)
will
need to be implemented. This will be only called once and reused. The dispose will be called
at the end when the WorldRenderPainter
dies.Modifier and Type | Required Element and Description |
---|---|
java.lang.String |
name |
Modifier and Type | Optional Element and Description |
---|---|
boolean |
isBaseMapOrLayer |
short |
layerPriority |
boolean |
makeCustomOptionsDialogIndependent
If true will not use
Dialog.ModalityType.DOCUMENT_MODAL . |
boolean |
usePropertiesOrCustomOptionsDialog
This will make the properties
NeptusProperty to be automatically
gathered into a dialog for user edition or it will call for
getOptionsDialog(JDialog parent) (expecting a JDialog
in return). |
public abstract java.lang.String name
public abstract boolean usePropertiesOrCustomOptionsDialog
NeptusProperty
to be automatically
gathered into a dialog for user edition or it will call for
getOptionsDialog(JDialog parent)
(expecting a JDialog
in return).public abstract boolean makeCustomOptionsDialogIndependent
Dialog.ModalityType.DOCUMENT_MODAL
.public abstract boolean isBaseMapOrLayer
public abstract short layerPriority
Copyright © 2004-2014 FEUP-LSTS and Neptus developers. All Rights Reserved.