public class TLcyDynamicLonLatGridLayer extends TLcdMapLonLatGridLayer
This class is an extension of a TLcdMapLonLatGridLayer
It provides a dynamic grid. This means that the delta ( in degrees )
between the lines of longitude and between the lines of latitude will
change wrt to the scale of the map the layer is painted on.
To calculate the delta between the lines for a certain scale, one can
provide an ILcyGridDeltaCalculator
. The other possibility
is to use the method initFromConfiguration
to initialise
an object of this class wrt to the given ALcyProperties
This class may have a TLcdLonLatBorderGridPainter
instead of a regular TLcdLonLatGridPainter
. If this is the case,
it adapts the painter's major/minor labels to the current view's scale.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CONFIG_FILE_NAME |
static int |
DEFAULT_MAJOR_TICKS_PER_DELTA_LAT |
static int |
DEFAULT_MAJOR_TICKS_PER_DELTA_LON |
static int |
DEFAULT_MINOR_TICKS_PER_DELTA_LAT |
static int |
DEFAULT_MINOR_TICKS_PER_DELTA_LON |
static float |
DELTA_LAT_DEFAULT |
static float |
DELTA_LON_DEFAULT |
Constructor and Description |
---|
TLcyDynamicLonLatGridLayer(ALcyProperties aConfiguration) |
Modifier and Type | Method and Description |
---|---|
ILcdModel |
getModel() |
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
paint(Graphics aGraphics,
int aMode,
ILcdGXYView aGXYView)
Paints the
TLcdLonLatGrid , taking into account the given mode, and delegating
to the configured grid painter. |
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
addPropertyChangeListener, addSelectionListener, applyOnInteract, clearSelection, fireCollectedSelectionChanges, firePropertyChangeEvent, getBounds, getGridPainter, getGXYEditor, getGXYLabelPainter, getGXYPainter, getGXYPainter, getGXYPen, getIcon, getLabel, getLabelScaleRange, getLonLatGrid, getModelXYWorldTransfoClass, getScaleRange, getSelectionCount, hasUserPen, isAntiAliased, isEditable, isEditableSupported, isLabeled, isLabeledSupported, isSelectable, isSelectableSupported, isSelected, isVisible, removePropertyChangeListener, removeSelectionListener, selectedObjects, selectObject, setAntiAliased, setEditable, setGridPainter, setGXYPainter, setGXYPen, setIcon, setLabel, setLabeled, setLonLatGrid, setScaleRange, setSelectable, setVisible, stopPainting
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLabelMapScaleRange, getMapScaleRange
getSelectedObjects
public static final float DELTA_LON_DEFAULT
public static final float DELTA_LAT_DEFAULT
public static final int DEFAULT_MAJOR_TICKS_PER_DELTA_LAT
public static final int DEFAULT_MAJOR_TICKS_PER_DELTA_LON
public static final int DEFAULT_MINOR_TICKS_PER_DELTA_LAT
public static final int DEFAULT_MINOR_TICKS_PER_DELTA_LON
public static final String DEFAULT_CONFIG_FILE_NAME
public TLcyDynamicLonLatGridLayer(ALcyProperties aConfiguration)
@Deprecated public boolean isTraceOn()
true
if tracing is enabled for this class.isTraceOn
in class TLcdMapLonLatGridLayer
@Deprecated public void setTraceOn(boolean aTraceOn)
true
or false
as argument automatically turns
off tracing for all other class instances for which
setTraceOn
has not been called.
If the argument is false
then only the informative, warning
and error log messages are recorded.setTraceOn
in class TLcdMapLonLatGridLayer
aTraceOn
- if true then all log messages are recorded for this
instance. If false, then only the informative, warning and
error log messages are recorded.@Deprecated public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.public void paint(Graphics aGraphics, int aMode, ILcdGXYView aGXYView)
TLcdMapLonLatGridLayer
TLcdLonLatGrid
, taking into account the given mode, and delegating
to the configured grid painter.
For TLcdLonLatGridPainter
and TLcdLonLatBorderGridPainter
instances,
the setLabeled
flag will be set according to the given paint mode.paint
in interface ILcdGXYLayer
paint
in class TLcdMapLonLatGridLayer
aGraphics
- Graphics
to consider for painting.aMode
- a combination of ILcdGXYLayer.OBJECTS
, ILcdGXYLayer.LABELS
,
ILcdGXYLayer.SELECTION_HANDLES
.aGXYView
- the ILcdGXYView
that contains this ILcdLayer
.ILcdGXYLayer.getGXYPainter(Object)
,
ILcdGXYLayer.getGXYLabelPainter(Object)
,
ILcdGXYLayer.getScaleRange()
,
ILcdGXYLayer.getLabelScaleRange()
,
ILcdGXYLayer.stopPainting()
public ILcdModel getModel()
getModel
in interface ILcdLayer
getModel
in class TLcdMapLonLatGridLayer
ILcdLayer
.