|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.renderer.j2d.RenderedLayer org.geotools.renderer.j2d.RenderedMarks
A set of marks and/or labels to be rendered. Marks can have different sizes and orientations
(for example a field of wind arrows). This abstract class is not a container for marks.
Subclasses must override the getMarkIterator()
method in order to returns informations
about marks.
Field Summary | |
protected static int |
AREAS_MASK
A bitmask to specify the validity of geographic areas. |
protected static int |
GLYPHS_MASK
A bitmask to specify the validity of labels and their positions. |
protected static int |
ICONS_MASK
A bitmask to specify the validity of mark's icon. |
protected static int |
MARKS_MASK
A bitmask to specify the validity of mark's shapes, position, amplitude and direction. |
Fields inherited from class org.geotools.renderer.j2d.RenderedLayer |
listeners |
Constructor Summary | |
RenderedMarks()
Construct a new layer of marks using a default coordinate system. |
|
RenderedMarks(CoordinateSystem cs)
Construct a new layer of marks using the specified coordinate system. |
Method Summary | |
protected javax.swing.Action |
getAction(GeoMouseEvent event)
Returns the action to run when some mouse action occured over the map. |
Unit |
getAmplitudeUnit()
Returns the units for marks amplitude, or null if unknow. |
abstract MarkIterator |
getMarkIterator()
Returns an iterator for iterating through the marks. |
protected java.lang.String |
getToolTipText(GeoMouseEvent event)
Returns the tooltip text to display when the mouse cursor is located over the map. |
double |
getTypicalAmplitude()
Returns the typical amplitude of marks. |
protected void |
invalidate()
Tells that some data has changed in all aspects of marks. |
protected void |
invalidate(int mask)
Tells that some data has changed. |
protected void |
paint(RenderingContext context)
Proc?de au tra?age des marques de cette couche. |
protected void |
repaint(MarkIterator iterator)
Tells that a single mark need to be repainted. |
Methods inherited from class org.geotools.renderer.j2d.RenderedLayer |
addPropertyChangeListener, addPropertyChangeListener, dispose, getCoordinateSystem, getLocale, getName, getPreferredArea, getPreferredPixelSize, getRenderer, getTreeLock, getZOrder, isVisible, prefetch, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, setCoordinateSystem, setPreferredArea, setPreferredPixelSize, setVisible, setZOrder, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final int AREAS_MASK
invalidate(int)
,
Constant Field Valuesprotected static final int MARKS_MASK
invalidate(int)
,
Constant Field Valuesprotected static final int ICONS_MASK
invalidate(int)
,
Constant Field Valuesprotected static final int GLYPHS_MASK
invalidate(int)
,
Constant Field ValuesConstructor Detail |
public RenderedMarks()
public RenderedMarks(CoordinateSystem cs)
cs
- The coordinate system. If the specified coordinate system has more than
two dimensions, then it must be a CompoundCoordinateSystem
with
a two dimensional headCS
.
java.lang.IllegalArgumentException
- if cs
is nul.Method Detail |
public abstract MarkIterator getMarkIterator()
RenderedMarks
more than once, the mark iterator must consistently iterates
through the same marks in the same order, unless invalidate()
has been invoked.
If some marks are added, removed or changed, then invalidate()
must be invoked
first (usually by the methods implementing the addition, change or removal of marks).
public Unit getAmplitudeUnit()
null
if unknow. All marks must use the same units. The default
implementation returns always null
.
public double getTypicalAmplitude()
protected void paint(RenderingContext context) throws org.opengis.referencing.operation.TransformException
MarkIterator
.
paint
in class RenderedLayer
context
- Information relatives to the rendering context. This object ontains the
Graphics2D
to use and methods for getting MathTransform
objects.
This temporary object will be destroy once the rendering is completed. Consequently,
do not keep a reference to it outside this paint
method.
org.opengis.referencing.operation.TransformException
- if a coordinate transformation was required and failed.MarkIterator.position()
,
MarkIterator.markShape()
,
MarkIterator.markIcon()
,
MarkIterator.geographicArea()
,
MarkIterator.label()
,
getTypicalAmplitude()
,
getAmplitudeUnit()
,
MarkIterator.paint(java.awt.Graphics2D, java.awt.Shape, java.awt.Shape, java.awt.image.RenderedImage, java.awt.geom.AffineTransform, java.awt.font.GlyphVector, java.awt.geom.Point2D.Float)
protected void repaint(MarkIterator iterator)
RenderedLayer.repaint()
may be more effective.
iterator
- An iterator over the mark to be repainted.
Only the current mark will be repainted.protected void invalidate(int mask)
MarkIterator
will
iterates through marks in a different order, returns different geographic areas, mark
shapes, icons and/or labels. This method do not invokes repaint(org.geotools.renderer.j2d.MarkIterator)
.
This is the caller's responsability to invokes repaint()
after an
invalidate(...)
call, if needed.
mask
- A bitwise combinaison of AREAS_MASK
, MARKS_MASK
,
ICONS_MASK
and/or GLYPHS_MASK
.AREAS_MASK
,
MARKS_MASK
,
ICONS_MASK
,
GLYPHS_MASK
protected void invalidate()
invalidate(int)
with all flags set.
protected final java.lang.String getToolTipText(GeoMouseEvent event)
MarkIterator.getToolTipText(org.geotools.renderer.j2d.GeoMouseEvent)
.
getToolTipText
in class RenderedLayer
event
- The mouse event.
null
if none.Renderer.getToolTipText(org.geotools.renderer.j2d.GeoMouseEvent)
protected final javax.swing.Action getAction(GeoMouseEvent event)
MarkIterator.getAction(org.geotools.renderer.j2d.GeoMouseEvent)
.
getAction
in class RenderedLayer
event
- The mouse event.
null
if none.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |