@Test public void seriesToScreen_returnsScreenPoint() { when(xyPlot.getBounds()).thenReturn(new RectRegion(-100, 100, -100, 100)); PointF point = graphWidget.seriesToScreen(new XYCoords(-100, 100)); assertEquals(0f, point.x); assertEquals(0f, point.y); point = graphWidget.seriesToScreen(new XYCoords(100, -100)); assertEquals(10f, point.x); assertEquals(100f, point.y); point = graphWidget.seriesToScreen(new XYCoords(0, 0)); assertEquals(5f, point.x); assertEquals(50f, point.y); }
protected PointF seriesToScreen(XYCoords xy) { if (!plot.getBounds().isFullyDefined()) { return null; } return plot.getBounds().transform(xy, gridRect, false, true); }
XYGraphWidget extends Widget { protected PointF seriesToScreen(XYCoords xy) { if (!plot.getBounds().isFullyDefined()) { return null; } return plot.getBounds().transform(xy, gridRect, false, true); } }
XYGraphWidget extends Widget { protected PointF seriesToScreen(XYCoords xy) { if (!plot.getBounds().isFullyDefined()) { return null; } return plot.getBounds().transform(xy, gridRect, false, true); } XYGraphWidget(LayoutManager layoutManager, XYPlot plot, Size size); }
XYGraphWidget extends Widget { protected PointF seriesToScreen(XYCoords xy) { if (!plot.getBounds().isFullyDefined()) { return null; } return plot.getBounds().transform(xy, gridRect, false, true); } 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); }
XYGraphWidget extends Widget { protected PointF seriesToScreen(XYCoords xy) { if (!plot.getBounds().isFullyDefined()) { return null; } return plot.getBounds().transform(xy, gridRect, false, true); } 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);  }