org.geotools.renderer.j2d
Class RenderedGridMarks.Iterator

java.lang.Object
  extended byorg.geotools.renderer.j2d.MarkIterator
      extended byorg.geotools.renderer.j2d.RenderedGridMarks.Iterator
Enclosing class:
RenderedGridMarks

protected class RenderedGridMarks.Iterator
extends MarkIterator

Iterates through all marks in a RenderedGridMarks.

Version:
$Id: RenderedGridMarks.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux

Constructor Summary
RenderedGridMarks.Iterator()
          Construct a mark iterator.
 
Method Summary
 double amplitude()
          Retourne l'amplitude ? la position d'une marque.
 double direction()
          Retourne la direction de la valeur d'une marque.
 int getIteratorPosition()
          Returns the current iterator position.
protected  java.lang.String getToolTipText(GeoMouseEvent event)
          Returns a tooltip text for the current mark.
 java.lang.String label()
          Returns the label for the current mark, or null if none.
 java.awt.Paint markPaint()
          Returns the paint for current mark.
 java.awt.Shape markShape()
          Retourne la forme g?om?trique servant de mod?le au tra?age des marques.
 boolean next()
          Moves the iterator to the next mark.
 java.awt.geom.Point2D position()
          Retourne les coordonn?es (x,y) d'un point de la grille.
 void setIteratorPosition(int n)
          Moves the iterator to the specified index.
 
Methods inherited from class org.geotools.renderer.j2d.MarkIterator
font, geographicArea, getAction, labelPosition, markIcon, paint, visible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderedGridMarks.Iterator

public RenderedGridMarks.Iterator()
Construct a mark iterator.

Method Detail

getIteratorPosition

public int getIteratorPosition()
Description copied from class: MarkIterator
Returns the current iterator position. A newly created MarkIterator will returns -1, since new iterators are initially positioned before the first mark.

Specified by:
getIteratorPosition in class MarkIterator

setIteratorPosition

public void setIteratorPosition(int n)
Moves the iterator to the specified index.

Specified by:
setIteratorPosition in class MarkIterator
Parameters:
n - The new position (0 for the first mark, 1 for the second one, etc.).

next

public boolean next()
Moves the iterator to the next mark.

Specified by:
next in class MarkIterator
Returns:
true if the new current mark is valid; false if there are no more marks.

position

public java.awt.geom.Point2D position()
                               throws org.opengis.referencing.operation.TransformException
Retourne les coordonn?es (x,y) d'un point de la grille. Les coordonn?es x et y seront exprim?es selon le syst?me de coordonn?es du grid coverage. Si une d?cimation a ?t? sp?cifi?e avec la m?thode RenderedGridMarks.setDecimation(int, int), alors la position retourn?e sera situ?e au milieu des points ? moyenner.

Specified by:
position in class MarkIterator
Throws:
org.opengis.referencing.operation.TransformException - if a transform was required and failed.
See Also:
MarkIterator.geographicArea()

amplitude

public double amplitude()
Retourne l'amplitude ? la position d'une marque. Si une d?cimation a ?t? sp?cifi?e avec la m?thode RenderedGridMarks.setDecimation(int, int), alors cette m?thode calcule la moyenne vectorielle (la moyenne des composantes x et y) aux positions des marques ? d?cimer, et retourne l'amplitude du vecteur moyen.

Overrides:
amplitude in class MarkIterator

direction

public double direction()
Retourne la direction de la valeur d'une marque. Si une d?cimation a ?t? sp?cifi?e avec la m?thode RenderedGridMarks.setDecimation(int, int), alors cette m?thode calcule la moyenne vectorielle (la moyenne des composantes x et y) aux positions des marques ? d?cimer, et retourne la direction du vecteur moyen.

Overrides:
direction in class MarkIterator

markShape

public java.awt.Shape markShape()
Retourne la forme g?om?trique servant de mod?le au tra?age des marques. Lorsque deux bandes sont utilis?es, la forme par d?faut sera une fl?che dont l'origine est ? (0,0) et qui pointe dans la direction des x positifs (soit ? un angle de 0 radians arithm?tiques).

Overrides:
markShape in class MarkIterator
See Also:
RenderedGridMarks.getMarkShape(), RenderedGridMarks.setMarkShape(java.awt.Shape)

markPaint

public java.awt.Paint markPaint()
Returns the paint for current mark.

Overrides:
markPaint in class MarkIterator
See Also:
RenderedGridMarks.getMarkPaint(), RenderedGridMarks.setMarkPaint(java.awt.Paint)

label

public java.lang.String label()
Returns the label for the current mark, or null if none.

Overrides:
label in class MarkIterator

getToolTipText

protected java.lang.String getToolTipText(GeoMouseEvent event)
Returns a tooltip text for the current mark. The default implementation returns the arrow's amplitude and direction. Note: This method is not a commited part of the API. It may moves elsewhere in a future version.

Overrides:
getToolTipText in class MarkIterator
Parameters:
event - The mouse event.
Returns:
The tool tip text for the current mark, or null if none.


Copyright © GeoTools. All Rights Reserved.