com.androidplot.xy
Class LineAndPointFormatter

java.lang.Object
  extended by com.androidplot.ui.Formatter<XYPlot>
      extended by com.androidplot.xy.XYSeriesFormatter<XYRegionFormatter>
          extended by com.androidplot.xy.LineAndPointFormatter
Direct Known Subclasses:
BarFormatter, BezierLineAndPointFormatter, StepFormatter

public class LineAndPointFormatter
extends XYSeriesFormatter<XYRegionFormatter>

Defines the visual aesthetics of an XYSeries; outline color and width, fill style, vertex size and color, shadowing, etc.


Constructor Summary
LineAndPointFormatter()
          Should only be used in conjunction with calls to configure()...
LineAndPointFormatter(Integer lineColor, Integer vertexColor, Integer fillColor, PointLabelFormatter plf)
           
LineAndPointFormatter(Integer lineColor, Integer vertexColor, Integer fillColor, PointLabelFormatter plf, FillDirection fillDir)
           
 
Method Summary
 void disableShadows()
           
 void enableShadows()
          Enables the shadow layer on linePaint and shadowPaint by calling setShadowLayer() with preset values.
 FillDirection getFillDirection()
           
 android.graphics.Paint getFillPaint()
           
 android.graphics.Paint getLinePaint()
           
 PointLabeler getPointLabeler()
           
 PointLabelFormatter getPointLabelFormatter()
           
 Class<? extends SeriesRenderer> getRendererClass()
           
 SeriesRenderer 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.
 android.graphics.Paint getVertexPaint()
           
 void setFillDirection(FillDirection fillDirection)
          Sets which edge to use to close the line's path for filling purposes.
 void setFillPaint(android.graphics.Paint fillPaint)
           
 void setLinePaint(android.graphics.Paint linePaint)
           
 void setPointLabeler(PointLabeler pointLabeler)
           
 void setPointLabelFormatter(PointLabelFormatter pointLabelFormatter)
           
 void setVertexPaint(android.graphics.Paint vertexPaint)
           
 
Methods inherited from class com.androidplot.xy.XYSeriesFormatter
addRegion, getRegionFormatter, getRegions, removeRegion
 
Methods inherited from class com.androidplot.ui.Formatter
configure
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineAndPointFormatter

public LineAndPointFormatter()
Should only be used in conjunction with calls to configure()...


LineAndPointFormatter

public LineAndPointFormatter(Integer lineColor,
                             Integer vertexColor,
                             Integer fillColor,
                             PointLabelFormatter plf)

LineAndPointFormatter

public LineAndPointFormatter(Integer lineColor,
                             Integer vertexColor,
                             Integer fillColor,
                             PointLabelFormatter plf,
                             FillDirection fillDir)
Method Detail

getFillDirection

public FillDirection getFillDirection()

setFillDirection

public void setFillDirection(FillDirection fillDirection)
Sets which edge to use to close the line's path for filling purposes. See FillDirection.

Parameters:
fillDirection -

getRendererClass

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

getRendererInstance

public SeriesRenderer 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<XYRegionFormatter>
Returns:
An instance of SeriesRenderer that took plot as an argument to its constructor.

enableShadows

public void enableShadows()
Enables the shadow layer on linePaint and shadowPaint by calling setShadowLayer() with preset values.


disableShadows

public void disableShadows()

getLinePaint

public android.graphics.Paint getLinePaint()

setLinePaint

public void setLinePaint(android.graphics.Paint linePaint)

getVertexPaint

public android.graphics.Paint getVertexPaint()

setVertexPaint

public void setVertexPaint(android.graphics.Paint vertexPaint)

getFillPaint

public android.graphics.Paint getFillPaint()

setFillPaint

public void setFillPaint(android.graphics.Paint fillPaint)

getPointLabelFormatter

public PointLabelFormatter getPointLabelFormatter()

setPointLabelFormatter

public void setPointLabelFormatter(PointLabelFormatter pointLabelFormatter)

getPointLabeler

public PointLabeler getPointLabeler()

setPointLabeler

public void setPointLabeler(PointLabeler pointLabeler)


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