com.androidplot.ui
Class Formatter<PlotType extends Plot>

java.lang.Object
  extended by com.androidplot.ui.Formatter<PlotType>
Direct Known Subclasses:
SegmentFormatter, XYSeriesFormatter

public abstract class Formatter<PlotType extends Plot>
extends Object

Base class of all Formatters. Encapsulates visual elements of a series; line style, color etc. Implementors of this class should include both a default constructor and a one argument constructor in the following form:

 // provided as a convenience to users; allows instantiation and
 // xml configuration in a single line.
 public MyFormatter(Context ctx, int xmlCfgId) {
     // prevent configuration of classes derived from this one:
     if (getClass().equals(MyFormatter.class)) {
         Configurator.configure(ctx, this, xmlCfgId);
     }
 }
 


Constructor Summary
Formatter()
           
 
Method Summary
 Formatter<PlotType> configure(android.content.Context ctx, int xmlCfgId)
           
abstract  Class<? extends SeriesRenderer> getRendererClass()
           
abstract  SeriesRenderer getRendererInstance(PlotType plot)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Formatter

public Formatter()
Method Detail

configure

public Formatter<PlotType> configure(android.content.Context ctx,
                                     int xmlCfgId)

getRendererClass

public abstract Class<? extends SeriesRenderer> getRendererClass()
Returns:
The Class of SeriesRenderer that should be used.

getRendererInstance

public abstract SeriesRenderer getRendererInstance(PlotType plot)
Returns:
An instance of SeriesRenderer that took plot as an argument to its constructor.


Copyright © 2010-2013 androidplot.com. All Rights Reserved.