lt.monarch.chart.mapper
Class CountableAxisMapper

java.lang.Object
  extended by lt.monarch.chart.mapper.AbstractAxisMapper
      extended by lt.monarch.chart.mapper.CountableAxisMapper
All Implemented Interfaces:
java.io.Serializable, AxisMapper
Direct Known Subclasses:
DateListAxisMapper, GroupedLabelsAxisMapper, LabelAxisMapper

public abstract class CountableAxisMapper
extends AbstractAxisMapper

Class for axis mappers, which have a countable number of labels.

See Also:
Serialized Form

Constructor Summary
Constructor and Description
CountableAxisMapper()
           
 
Method Summary
Modifier and Type Method and Description
abstract  int getLabelCount()
          Gets label count in the axis mapper.
abstract  java.lang.Object[] getRegisteredKeys()
          Gets axis registered keys.
protected  double getTextHeigh(AbstractGraphics g, AbstractTextPainter textPainter, java.lang.Object value, java.text.Format format)
          Internal API method.
protected  double getTextWidth(AbstractGraphics g, AbstractTextPainter textPainter, java.lang.Object value, java.text.Format format)
          Internal API method.
 
Methods inherited from class lt.monarch.chart.mapper.AbstractAxisMapper
addListener, fireMappingChanged, getProjectionRange, mapBack, removeListener, setProjectionRange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lt.monarch.chart.mapper.AxisMapper
formatKey, getPreferredHeight, getPreferredWidth, getScale, getViewRange, map
 

Constructor Detail

CountableAxisMapper

public CountableAxisMapper()
Method Detail

getLabelCount

public abstract int getLabelCount()
Gets label count in the axis mapper.

Returns:
returns label count in the axis mapper

getRegisteredKeys

public abstract java.lang.Object[] getRegisteredKeys()
Gets axis registered keys.

Returns:
axis registered keys

getTextWidth

protected double getTextWidth(AbstractGraphics g,
                              AbstractTextPainter textPainter,
                              java.lang.Object value,
                              java.text.Format format)
Internal API method. Returns text width.

Parameters:
g - graphics context
textPainter - painting mode
value - value to format
format - text format
Returns:
returns maximum width

getTextHeigh

protected double getTextHeigh(AbstractGraphics g,
                              AbstractTextPainter textPainter,
                              java.lang.Object value,
                              java.text.Format format)
Internal API method. Returns text height.

Parameters:
g - graphics context
textPainter - painting mode
value - value to format
format - text format
Returns:
returns maximum height