| java.lang.Object org.geotools.axis.AbstractGraduation
All known Subclasses: org.geotools.axis.NumberGraduation, org.geotools.axis.DateGraduation,
AbstractGraduation | abstract public class AbstractGraduation implements Graduation,Serializable(Code) | | Base class for graduation.
since: 2.0 version: $Id: AbstractGraduation.java 27576 2007-10-22 13:54:24Z desruisseaux $ author: Martin Desruisseaux |
Constructor Summary | |
public | AbstractGraduation(Unit unit) Constructs a graduation with the supplied units. |
AbstractGraduation | public AbstractGraduation(Unit unit)(Code) | | Constructs a graduation with the supplied units.
Parameters: unit - The axis's units, or null if unknow. |
ensureFinite | static void ensureFinite(String name, double n) throws IllegalArgumentException(Code) | | Vérifie que le nombre spécifié est réel. S'il est NaN ou infini, une exception sera lancée.
Parameters: name - Nom de l'argument. Parameters: n - Nombre à vérifier. throws: IllegalArgumentException - Si n est NaN ou infini. |
ensureFinite | static void ensureFinite(String name, float n) throws IllegalArgumentException(Code) | | Vérifie que le nombre spécifié est réel. S'il est NaN ou infini, une exception sera lancée.
Parameters: name - Nom de l'argument. Parameters: n - Nombre à vérifier. throws: IllegalArgumentException - Si n est NaN ou infini. |
ensureNonNull | static void ensureNonNull(String name, double n) throws IllegalArgumentException(Code) | | Vérifie que le nombre spécifié est non-nul. S'il
est 0, NaN ou infini, une exception sera lancée.
Parameters: name - Nom de l'argument. Parameters: n - Nombre à vérifier. throws: IllegalArgumentException - Si n est NaN ou infini. |
getLocale | public Locale getLocale()(Code) | | Returns the locale to use for formatting labels.
|
getSymbol | String getSymbol()(Code) | | Returns a string representation of axis's units, or
null if there is none. The default implementation returns the string
representation of
AbstractGraduation.getUnit .
|
getTitle | public synchronized String getTitle(boolean includeSymbol)(Code) | | Returns the axis title. If
includeUnits is
true , then the returned string
will includes units as in "Temperature (°C)". The exact formatting is local-dependent.
Parameters: includeSymbol - true to format unit symbol after the name. The graduation name (also to be use as axis title). |
getUnit | public Unit getUnit()(Code) | | Returns the graduation's units, or
null if unknow.
|
getVisualAxisLength | static float getVisualAxisLength(RenderingHints hints)(Code) | | Retourne la longueur de l'axe, en pixels ou en points (1/72 de pouce).
|
getVisualTickSpacing | static float getVisualTickSpacing(RenderingHints hints)(Code) | | Retourne l'espace approximatif (en pixels ou en points) à laisser entre les
graduations principales. L'espace réel entre les graduations peut être légèrement
différent, par exemple pour avoir des étiquettes qui correspondent à des valeurs
arrondies.
|
hashCode | public int hashCode()(Code) | | Returns a hash value for this graduation.
|
setLocale | public synchronized void setLocale(Locale locale)(Code) | | Sets the locale to use for formatting labels.
This will fire a property change event with the
"locale" property name.
|
setTitle | public void setTitle(String title)(Code) | | Sets the axis title, not including unit symbol. This method will fire a
property change event with the
"title" property name.
Parameters: title - New axis title, or null to remove any previous setting. |
setUnit | public void setUnit(Unit unit) throws ConversionException(Code) | | Changes the graduation's units. Subclasses will automatically convert minimum and maximum
values from the old units to the new one. This method fires a property change event with the
"unit" property name.
Parameters: unit - The new units, or null if unknow. If null, minimum and maximum valuesare not converted. throws: ConversionException - if units are not convertible, or if thespecified units is illegal for this graduation. |
|
|