|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractGraduation
public abstract class AbstractGraduation
Base class for graduation.
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 unknow. |
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. |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface Graduation |
---|
getFormat, getMaximum, getMinimum, getRange, getTickIterator |
Field Detail |
---|
protected final PropertyChangeSupport listenerList
Constructor Detail |
---|
public AbstractGraduation(Unit<?> unit)
unit
- The axis's units, or null
if unknow.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 Graduation
includeSymbol
- 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 unknow.
getUnit
in interface Graduation
null
.public void setUnit(Unit<?> unit) throws ConversionException
"unit"
property name.
unit
- The new units, or null
if unknow. If null, minimum and maximum values
are not converted.
ConversionException
- if units are not convertible, or if the
specified units is illegal for this graduation.public Locale getLocale()
getLocale
in interface Graduation
public 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 Graduation
listener
- The listener to add.public void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener
from the listener list.
removePropertyChangeListener
in interface Graduation
listener
- The listener to remove.public boolean equals(Object object)
listenerList
.
equals
in class Object
object
- The object to compare with.
true
if this graduation is equals to the given object.public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |