info.monitorenter.gui.chart.labelformatters
Class ALabelFormatter

java.lang.Object
  extended by 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 the AAxis 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
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 for getUnit().
 
Fields inherited from interface info.monitorenter.gui.chart.IAxisLabelFormatter
PROPERTY_FORMATCHANGE
 
Constructor Summary
protected ALabelFormatter()
          Default constructor.
 
Method Summary
 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 given propertyName.
 boolean equals(java.lang.Object obj)
           
 IAxis<?> getAxis()
          Intended for AAxis only.
 int getMaxAmountChars()
          Returns the maximum amount of characters that will be returned from IAxisLabelFormatter.format(double).
 AUnit getUnit()
          Returns UNIT_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 for AAxis 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 for getUnit().


m_propertyChangeSupport

protected java.beans.PropertyChangeSupport m_propertyChangeSupport
Support for acting as a property change event producer for listeners.

Constructor Detail

ALabelFormatter

protected ALabelFormatter()
Default constructor.

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 given propertyName.

Specified by:
addPropertyChangeListener in interface IAxisLabelFormatter
Parameters:
propertyName - the name of the property the listener is interested in
listener - a listener that will only be informed if the property identified by the argument propertyName changes
See Also:
IAxisLabelFormatter.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getAxis

public IAxis<?> getAxis()
Intended for AAxis only.

Returns:
Returns the axis.

getMaxAmountChars

public int getMaxAmountChars()
Returns the maximum amount of characters that will be returned from IAxisLabelFormatter.format(double).

Specified by:
getMaxAmountChars in interface IAxisLabelFormatter
Returns:
the maximum amount of characters that will be returned from IAxisLabelFormatter.format(double).

getUnit

public AUnit getUnit()
Returns UNIT_UNCHANGED.

Specified by:
getUnit in interface IAxisLabelFormatter
Returns:
UNIT_UNCHANGED
See Also:
IAxisLabelFormatter.getUnit()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

initPaintIteration

public void initPaintIteration()
Void adapter method implementation - optional to override.

Specified by:
initPaintIteration in interface IAxisLabelFormatter
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 interface IAxisLabelFormatter
Parameters:
property - the property the listener was registered to.
listener - a listener that will only be informed if the property identified by the argument propertyName changes
See Also:
IAxisLabelFormatter.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

setAxis

public void setAxis(IAxis<?> axis)
Intended for AAxis only.

Do never invoke this! This is only public for package sorting reasons.

Specified by:
setAxis in interface IAxisLabelFormatter
Parameters:
axis - The m_axis to set.


Copyright © 2001 - 2010 LGPL, All Rights Footloose.