com.androidplot.xy
Class BarFormatter

java.lang.Object
  extended by com.androidplot.ui.Formatter<XYPlot>
      extended by com.androidplot.xy.XYSeriesFormatter
          extended by com.androidplot.xy.BarFormatter

public class BarFormatter
extends XYSeriesFormatter


Constructor Summary
BarFormatter(android.content.Context ctx, int xmlCfgId)
          Provided as a convenience to users; allows instantiation and xml configuration to take place in a single line
BarFormatter(int fillColor, int borderColor)
           
 
Method Summary
 android.graphics.Paint getBorderPaint()
           
 android.graphics.Paint getFillPaint()
           
 Class<? extends DataRenderer> getRendererClass()
           
 DataRenderer getRendererInstance(XYPlot plot)
          Not completely sure why this is necessary, but if it's not here then subclasses are forced to take a Plot instead of an XYPlot as a parameter, which in turn breaks the pattern.
 void setBorderPaint(android.graphics.Paint borderPaint)
           
 void setFillPaint(android.graphics.Paint fillPaint)
           
 
Methods inherited from class com.androidplot.xy.XYSeriesFormatter
addRegion, getRegionFormatter, getRegions, removeRegion
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BarFormatter

public BarFormatter(android.content.Context ctx,
                    int xmlCfgId)
Provided as a convenience to users; allows instantiation and xml configuration to take place in a single line

Parameters:
ctx -
xmlCfgId - Id of the xml config file within /res/xml

BarFormatter

public BarFormatter(int fillColor,
                    int borderColor)
Method Detail

getFillPaint

public android.graphics.Paint getFillPaint()

setFillPaint

public void setFillPaint(android.graphics.Paint fillPaint)

getBorderPaint

public android.graphics.Paint getBorderPaint()

setBorderPaint

public void setBorderPaint(android.graphics.Paint borderPaint)

getRendererClass

public Class<? extends DataRenderer> getRendererClass()
Specified by:
getRendererClass in class Formatter
Returns:
The Class of DataRenderer that should be used.

getRendererInstance

public DataRenderer getRendererInstance(XYPlot plot)
Description copied from class: XYSeriesFormatter
Not completely sure why this is necessary, but if it's not here then subclasses are forced to take a Plot instead of an XYPlot as a parameter, which in turn breaks the pattern.

Specified by:
getRendererInstance in class XYSeriesFormatter
Returns:
An instance of DataRenderer that took plot as an argument to its constructor.


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