com.androidplot.ui
Class Formatter<PlotType extends Plot>
java.lang.Object
com.androidplot.ui.Formatter<PlotType>
- Direct Known Subclasses:
- 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);
}
}
Formatter
public Formatter()
getRendererClass
public abstract Class<? extends DataRenderer> getRendererClass()
- Returns:
- The Class of DataRenderer that should be used.
getRendererInstance
public abstract DataRenderer getRendererInstance(PlotType plot)
- Returns:
- An instance of DataRenderer that took plot as an argument to its constructor.
Copyright © 2010-2013 androidplot.com. All Rights Reserved.