Package com.androidplot.ui
Class Formatter
-
- All Implemented Interfaces:
public abstract class Formatter<PlotType extends Plot>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); } } </pre>
-
-
Field Summary
Fields Modifier and Type Field Description public booleanisLegendIconEnabled
-
Method Summary
Modifier and Type Method Description booleanisLegendIconEnabled()voidsetLegendIconEnabled(boolean legendIconEnabled)Sets whether or not a legend icon should be drawn for the series associated with this formatter. voidconfigure(@NonNull() Context ctx, int xmlCfgId)<T extends SeriesRenderer> TgetRendererInstance(@NonNull() PlotType plot)abstract Class<out SeriesRenderer>getRendererClass()-
-
Constructor Detail
-
Formatter
Formatter()
-
Formatter
Formatter(Context ctx, int xmlCfgId)
-
-
Method Detail
-
isLegendIconEnabled
boolean isLegendIconEnabled()
-
setLegendIconEnabled
void setLegendIconEnabled(boolean legendIconEnabled)
Sets whether or not a legend icon should be drawn for the series associated with this formatter.
-
getRendererInstance
@NonNull() <T extends SeriesRenderer> T getRendererInstance(@NonNull() PlotType plot)
- Returns:
@return An instance of SeriesRenderer constructed with the specified plot.
-
getRendererClass
@NonNull() abstract Class<out SeriesRenderer> getRendererClass()
- Returns:
The Class of SeriesRenderer that should be used when rendering series associated with instances of this formatter.
-
-
-
-