|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractGraduation
@ThreadSafe public abstract class AbstractGraduation
Base class for graduation.
| display/geotk-display (download) | View source code for this class |
| Field Summary | |
|---|---|
protected PropertyChangeSupport |
listenerList
A list of event listeners for this component. |
| Fields inherited from interface Graduation |
|---|
AXIS_TITLE_FONT, TICK_LABEL_FONT, VISUAL_AXIS_LENGTH, VISUAL_TICK_SPACING |
| Constructor Summary | |
|---|---|
AbstractGraduation(Unit<?> unit)
Constructs a graduation with the supplied units. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
boolean |
equals(Object object)
Compares this graduation with the specified object for equality. |
Locale |
getLocale()
Returns the locale to use for formatting labels. |
String |
getTitle(boolean includeSymbol)
Returns the axis title. |
Unit<?> |
getUnit()
Returns the graduation's units, or null if unknown. |
int |
hashCode()
Returns a hash value for this graduation. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
setLocale(Locale locale)
Sets the locale to use for formatting labels. |
abstract boolean |
setMaximum(double value)
Sets the maximum value for this graduation. |
abstract boolean |
setMinimum(double value)
Sets the minimum value for this graduation. |
void |
setTitle(String title)
Sets the axis title, not including unit symbol. |
void |
setUnit(Unit<?> unit)
Changes the graduation's units. |
String |
toString()
Returns a string representation for debugging purpose. |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface Graduation |
|---|
getFormat, getMaximum, getMinimum, getSpan, getTickIterator |
| Field Detail |
|---|
protected final PropertyChangeSupport listenerList
| Constructor Detail |
|---|
public AbstractGraduation(Unit<?> unit)
unit - The axis's units, or null if unknown.| Method Detail |
|---|
public abstract boolean setMinimum(double value)
throws IllegalArgumentException
value - The new minimum in getUnit() units.
true if the state of this graduation changed as a result of this call, or
false if the new value is identical to the previous one.
IllegalArgumentException - If value is NaN ou infinite.Graduation.getMinimum(),
setMaximum(double)
public abstract boolean setMaximum(double value)
throws IllegalArgumentException
value - The new maximum in getUnit() units.
true if the state of this graduation changed as a result of this call, or
false if the new value is identical to the previous one.
IllegalArgumentException - If value is NaN ou infinite.Graduation.getMaximum(),
setMinimum(double)public String getTitle(boolean includeSymbol)
includeUnits is true, then the returned string
will includes units as in "Temperature (°C)". The exact formatting is local-dependent.
getTitle in interface GraduationincludeSymbol - true to format unit symbol after the name.
public void setTitle(String title)
"title" property name.
title - New axis title, or null to remove any previous setting.public Unit<?> getUnit()
null if unknown.
getUnit in interface Graduationnull.
public void setUnit(Unit<?> unit)
throws IllegalArgumentException
"unit" property name.
unit - The new units, or null if unknown. If null, minimum and maximum values
are not converted.
IllegalArgumentException - if units are not convertible, or if the
specified units is illegal for this graduation.public Locale getLocale()
getLocale in interface LocalizedgetLocale in interface Graduationpublic void setLocale(Locale locale)
"locale" property name.
locale - The new labels format.public void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener to the listener list. The listener is registered
for all properties. A PropertyChangeEvent will get fired in response
to setting a property, such as setTitle(java.lang.String) or setLocale(java.util.Locale).
addPropertyChangeListener in interface Graduationlistener - The listener to add.public void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener from the listener list.
removePropertyChangeListener in interface Graduationlistener - The listener to remove.public boolean equals(Object object)
listenerList.
equals in class Objectobject - The object to compare with.
true if this graduation is equal to the given object.public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||