Class ALabelFormatter
- java.lang.Object
-
- info.monitorenter.gui.chart.labelformatters.ALabelFormatter
-
- All Implemented Interfaces:
IAxisLabelFormatter
,java.io.Serializable
- Direct Known Subclasses:
LabelFormatterAutoUnits
,LabelFormatterDate
,LabelFormatterNumber
,LabelFormatterUnit
public abstract class ALabelFormatter extends java.lang.Object implements IAxisLabelFormatter
A label formatter that is aware of theAAxis
it formats label for.This allows to compute the amount of fraction digits needed from the range to display.
- Version:
- $Revision: 1.10 $
- Author:
- Achim Westermann
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.beans.PropertyChangeSupport
m_propertyChangeSupport
Support for acting as a property change event producer for listeners.static AUnit
UNIT_UNCHANGED
The default unit with the factor 1 that is returned as the default forgetUnit()
.-
Fields inherited from interface info.monitorenter.gui.chart.IAxisLabelFormatter
PROPERTY_FORMATCHANGE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ALabelFormatter()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
Registers a property change listener that will be informed about changes of the property identified by the givenpropertyName
.boolean
equals(java.lang.Object obj)
IAxis<?>
getAxis()
Intended forAAxis
only.int
getMaxAmountChars()
Returns the maximum amount of characters that will be returned fromIAxisLabelFormatter.format(double)
.AUnit
getUnit()
ReturnsUNIT_UNCHANGED
.int
hashCode()
void
initPaintIteration()
Void adapter method implementation - optional to override.void
removePropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
Deregisters a property change listener that has been registerd for listening on the given property.void
setAxis(IAxis<?> axis)
Intended forAAxis
only.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface info.monitorenter.gui.chart.IAxisLabelFormatter
format, getMinimumValueShiftForChange, getNextEvenValue, parse
-
-
-
-
Field Detail
-
UNIT_UNCHANGED
public static final AUnit UNIT_UNCHANGED
The default unit with the factor 1 that is returned as the default forgetUnit()
.
-
m_propertyChangeSupport
protected java.beans.PropertyChangeSupport m_propertyChangeSupport
Support for acting as a property change event producer for listeners.
-
-
Method Detail
-
addPropertyChangeListener
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
Description copied from interface:IAxisLabelFormatter
Registers a property change listener that will be informed about changes of the property identified by the givenpropertyName
.- Specified by:
addPropertyChangeListener
in interfaceIAxisLabelFormatter
- Parameters:
propertyName
- the name of the property the listener is interested inlistener
- a listener that will only be informed if the property identified by the argumentpropertyName
changes- See Also:
IAxisLabelFormatter.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
getMaxAmountChars
public int getMaxAmountChars()
Returns the maximum amount of characters that will be returned fromIAxisLabelFormatter.format(double)
.- Specified by:
getMaxAmountChars
in interfaceIAxisLabelFormatter
- Returns:
- the maximum amount of characters that will be returned from
IAxisLabelFormatter.format(double)
.
-
getUnit
public AUnit getUnit()
ReturnsUNIT_UNCHANGED
.- Specified by:
getUnit
in interfaceIAxisLabelFormatter
- Returns:
UNIT_UNCHANGED
- See Also:
IAxisLabelFormatter.getUnit()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
initPaintIteration
public void initPaintIteration()
Void adapter method implementation - optional to override.- Specified by:
initPaintIteration
in interfaceIAxisLabelFormatter
- See Also:
IAxisLabelFormatter.initPaintIteration()
-
removePropertyChangeListener
public void removePropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
Description copied from interface:IAxisLabelFormatter
Deregisters a property change listener that has been registerd for listening on the given property.- Specified by:
removePropertyChangeListener
in interfaceIAxisLabelFormatter
- Parameters:
property
- the property the listener was registered to.listener
- a listener that will only be informed if the property identified by the argumentpropertyName
changes- See Also:
IAxisLabelFormatter.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
-
setAxis
public void setAxis(IAxis<?> axis)
Intended forAAxis
only.Do never invoke this! This is only public for package sorting reasons.
- Specified by:
setAxis
in interfaceIAxisLabelFormatter
- Parameters:
axis
- The m_axis to set.
-
-