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:
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(android.content.Context ctx, int xmlCfgId)
          Provided as a convenience to users; allows instantiation and xml configuration to take place in a single line
LineAndPointFormatter(Integer lineColor, Integer vertexColor, Integer fillColor)
          Deprecated. As of 0.5.1: Use LineAndPointFormatter(Integer, Integer, Integer, PointLabelFormatter) instead.
LineAndPointFormatter(Integer lineColor, Integer vertexColor, Integer fillColor, FillDirection fillDir)
          Deprecated. As of 0.5.1: Use LineAndPointFormatter(Integer, Integer, Integer, PointLabelFormatter, FillDirection) instead.
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()
           
 PointLabelFormatter getPointLabelFormatter()
           
 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.
 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 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 java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineAndPointFormatter

public LineAndPointFormatter(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

LineAndPointFormatter

@Deprecated
public LineAndPointFormatter(Integer lineColor,
                                        Integer vertexColor,
                                        Integer fillColor)
Deprecated. As of 0.5.1: Use LineAndPointFormatter(Integer, Integer, Integer, PointLabelFormatter) instead.

Set corresponding parameter to null to disable the drawing of lines, vertexes or fill. Uses a default of FillDirection.BOTTOM.

Parameters:
lineColor -
vertexColor -
fillColor -

LineAndPointFormatter

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

LineAndPointFormatter

@Deprecated
public LineAndPointFormatter(Integer lineColor,
                                        Integer vertexColor,
                                        Integer fillColor,
                                        FillDirection fillDir)
Deprecated. As of 0.5.1: Use LineAndPointFormatter(Integer, Integer, Integer, PointLabelFormatter, FillDirection) instead.

Parameters:
lineColor -
vertexColor -
fillColor -
fillDir - Determines which edge or origin of the plot is used to close the path for filling.

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 DataRenderer> getRendererClass()
Specified by:
getRendererClass in class Formatter<XYPlot>
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<XYRegionFormatter>
Returns:
An instance of DataRenderer 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)


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