XYGraphWidget extends Widget { protected void drawMarkers(Canvas canvas) { if (plot.getYValueMarkers() != null && plot.getYValueMarkers().size() > 0) { for (YValueMarker marker : plot.getYValueMarkers()) { marker.draw(canvas, plot, gridRect); } } if (plot.getXValueMarkers() != null && plot.getXValueMarkers().size() > 0) { for (XValueMarker marker : plot.getXValueMarkers()) { marker.draw(canvas, plot, gridRect); } } } XYGraphWidget(LayoutManager layoutManager, XYPlot plot, Size size); void processAttrs(TypedArray attrs); Paint getGridBackgroundPaint(); void setGridBackgroundPaint(Paint gridBackgroundPaint); Paint getDomainGridLinePaint(); void setDomainGridLinePaint(Paint gridLinePaint); Paint getRangeGridLinePaint(); Paint getDomainSubGridLinePaint(); void setDomainSubGridLinePaint(Paint gridLinePaint); void setRangeGridLinePaint(Paint gridLinePaint); Paint getRangeSubGridLinePaint(); void setRangeSubGridLinePaint(Paint gridLinePaint); int getLinesPerRangeLabel(); void setLinesPerRangeLabel(int linesPerRangeLabel); int getLinesPerDomainLabel(); void setLinesPerDomainLabel(int linesPerDomainLabel); Paint getDomainOriginLinePaint(); void setDomainOriginLinePaint(Paint domainOriginLinePaint); Paint getRangeOriginLinePaint(); void setRangeOriginLinePaint(Paint rangeOriginLinePaint); void setCursorPosition(Float x, Float y); void setCursorPosition(PointF point); Float getDomainCursorPosition(); Number getDomainCursorVal(); void setDomainCursorPosition(Float domainCursorPosition); Float getRangeCursorPosition(); Number getRangeCursorVal(); void setRangeCursorPosition(Float rangeCursorPosition); boolean isDrawGridOnTop(); void setDrawGridOnTop(boolean drawGridOnTop); boolean isDrawMarkersEnabled(); void setDrawMarkersEnabled(boolean drawMarkersEnabled); Paint getDomainCursorPaint(); void setDomainCursorPaint(Paint domainCursorPaint); Paint getRangeCursorPaint(); void setRangeCursorPaint(Paint rangeCursorPaint); float getLineExtensionTop(); void setLineExtensionTop(float lineExtensionTop); float getLineExtensionBottom(); void setLineExtensionBottom(float lineExtensionBottom); float getLineExtensionLeft(); void setLineExtensionLeft(float lineExtensionLeft); float getLineExtensionRight(); void setLineExtensionRight(float lineExtensionRight); LineLabelRenderer getLineLabelRenderer(Edge edge); void setLineLabelRenderer(Edge edge, LineLabelRenderer renderer); LineLabelStyle getLineLabelStyle(Edge edge); void setLineLabelStyle(Edge edge, LineLabelStyle style); CursorLabelFormatter getCursorLabelFormatter(); void setCursorLabelFormatter(
            CursorLabelFormatter cursorLabelFormatter); Insets getGridInsets(); void setGridInsets(Insets gridInsets); Insets getLineLabelInsets(); void setLineLabelInsets(Insets lineLabelInsets); RectF getGridRect(); void setGridRect(RectF gridRect); RectF getLabelRect(); void setLabelRect(RectF labelRect); boolean isGridClippingEnabled(); void setGridClippingEnabled(boolean gridClippingEnabled); boolean isLineLabelEnabled(Edge position); void setLineLabelEdges(Edge... positions); void setLineLabelEdges(Collection<Edge> positions); boolean containsPoint(float x, float y);  }
@Test public void drawMarkers_drawsLineForEachMarker() { xyPlot.addMarker(new XValueMarker(1, "x")); xyPlot.addMarker(new YValueMarker(-1, "y")); graphWidget.drawMarkers(canvas); verify(canvas, times(2)) .drawLine(anyFloat(), anyFloat(), anyFloat(), anyFloat(), any(Paint.class)); }