@Test public void testGetFormatter() { Plot plot = new MockPlot("MockPlot"); MockSeries m1 = new MockSeries(); MockSeries m2 = new MockSeries(); MockSeries m3 = new MockSeries(); MockFormatter1 f1 = new MockFormatter1(); MockFormatter1 f2 = new MockFormatter1(); MockFormatter2 f3 = new MockFormatter2(); plot.addSeries(m1, f1); plot.addSeries(m2, f2); plot.addSeries(m3, new MockFormatter1()); plot.addSeries(m1, new MockFormatter1()); plot.addSeries(m2, f3); plot.addSeries(m3, new MockFormatter1()); assertEquals(plot.getRenderer(MockRenderer1.class).getFormatter(m1), f1); assertEquals(plot.getRenderer(MockRenderer1.class).getFormatter(m2), f2); assertEquals(plot.getRenderer(MockRenderer2.class).getFormatter(m2), f3); assertNotSame(plot.getRenderer(MockRenderer2.class).getFormatter(m2), f1); }
public FormatterType getFormatter(SeriesType series, Class<? extends RendererType> rendererClass) { return getSeries(series, rendererClass).getFormatter(); }
Plot extends View implements Resizable { public FormatterType getFormatter(SeriesType series, Class<? extends RendererType> rendererClass) { return getSeries(series, rendererClass).getFormatter(); } }
Plot extends View implements Resizable { public FormatterType getFormatter(SeriesType series, Class<? extends RendererType> rendererClass) { return getSeries(series, rendererClass).getFormatter(); } Plot(Context context, String title);  Plot(Context context, String title, RenderMode mode);  Plot(Context context, AttributeSet attrs);  Plot(Context context, AttributeSet attrs, int defStyle); }
Plot extends View implements Resizable { public FormatterType getFormatter(SeriesType series, Class<? extends RendererType> rendererClass) { return getSeries(series, rendererClass).getFormatter(); } Plot(Context context, String title);  Plot(Context context, String title, RenderMode mode);  Plot(Context context, AttributeSet attrs);  Plot(Context context, AttributeSet attrs, int defStyle); DisplayDimensions getDisplayDimensions(); HashMap<Class<? extends RendererType>, RendererType> getRenderers(); RegistryType getRegistry(); void setRegistry(RegistryType registry); TextLabelWidget getTitle(); void setTitle(TextLabelWidget title); void setTitle(String title); void setRenderMode(RenderMode mode); RenderMode getRenderMode(); synchronized boolean addListener(PlotListener listener); synchronized boolean removeListener(PlotListener listener); synchronized boolean addSeries(FormatterType formatter, SeriesType... series); synchronized boolean addSeries(SeriesType series, FormatterType formatter); synchronized boolean removeSeries(SeriesType series, Class<? extends RendererType> rendererClass); synchronized void removeSeries(SeriesType series); void clear(); boolean isEmpty(); FormatterType getFormatter(SeriesType series, Class<? extends RendererType> rendererClass); T getRenderer(Class<T> rendererClass); List<RendererType> getRendererList(); void setMarkupEnabled(boolean enabled); void redraw(); @Override synchronized void layout(final DisplayDimensions dims); void setBorderStyle(BorderStyle style, Float radiusX, Float radiusY); LayoutManager getLayoutManager(); void setLayoutManager(LayoutManager layoutManager); Paint getBackgroundPaint(); void setBackgroundPaint(Paint backgroundPaint); void setPlotMargins(float left, float top, float right, float bottom); void setPlotPadding(float left, float top, float right, float bottom); float getPlotMarginTop(); void setPlotMarginTop(float plotMarginTop); float getPlotMarginBottom(); void setPlotMarginBottom(float plotMarginBottom); float getPlotMarginLeft(); void setPlotMarginLeft(float plotMarginLeft); float getPlotMarginRight(); void setPlotMarginRight(float plotMarginRight); float getPlotPaddingTop(); void setPlotPaddingTop(float plotPaddingTop); float getPlotPaddingBottom(); void setPlotPaddingBottom(float plotPaddingBottom); float getPlotPaddingLeft(); void setPlotPaddingLeft(float plotPaddingLeft); float getPlotPaddingRight(); void setPlotPaddingRight(float plotPaddingRight); Paint getBorderPaint(); void setBorderPaint(Paint borderPaint); }
Plot extends View implements Resizable { public FormatterType getFormatter(SeriesType series, Class<? extends RendererType> rendererClass) { return getSeries(series, rendererClass).getFormatter(); } Plot(Context context, String title);  Plot(Context context, String title, RenderMode mode);  Plot(Context context, AttributeSet attrs);  Plot(Context context, AttributeSet attrs, int defStyle); DisplayDimensions getDisplayDimensions(); HashMap<Class<? extends RendererType>, RendererType> getRenderers(); RegistryType getRegistry(); void setRegistry(RegistryType registry); TextLabelWidget getTitle(); void setTitle(TextLabelWidget title); void setTitle(String title); void setRenderMode(RenderMode mode); RenderMode getRenderMode(); synchronized boolean addListener(PlotListener listener); synchronized boolean removeListener(PlotListener listener); synchronized boolean addSeries(FormatterType formatter, SeriesType... series); synchronized boolean addSeries(SeriesType series, FormatterType formatter); synchronized boolean removeSeries(SeriesType series, Class<? extends RendererType> rendererClass); synchronized void removeSeries(SeriesType series); void clear(); boolean isEmpty(); FormatterType getFormatter(SeriesType series, Class<? extends RendererType> rendererClass); T getRenderer(Class<T> rendererClass); List<RendererType> getRendererList(); void setMarkupEnabled(boolean enabled); void redraw(); @Override synchronized void layout(final DisplayDimensions dims); void setBorderStyle(BorderStyle style, Float radiusX, Float radiusY); LayoutManager getLayoutManager(); void setLayoutManager(LayoutManager layoutManager); Paint getBackgroundPaint(); void setBackgroundPaint(Paint backgroundPaint); void setPlotMargins(float left, float top, float right, float bottom); void setPlotPadding(float left, float top, float right, float bottom); float getPlotMarginTop(); void setPlotMarginTop(float plotMarginTop); float getPlotMarginBottom(); void setPlotMarginBottom(float plotMarginBottom); float getPlotMarginLeft(); void setPlotMarginLeft(float plotMarginLeft); float getPlotMarginRight(); void setPlotMarginRight(float plotMarginRight); float getPlotPaddingTop(); void setPlotPaddingTop(float plotPaddingTop); float getPlotPaddingBottom(); void setPlotPaddingBottom(float plotPaddingBottom); float getPlotPaddingLeft(); void setPlotPaddingLeft(float plotPaddingLeft); float getPlotPaddingRight(); void setPlotPaddingRight(float plotPaddingRight); Paint getBorderPaint(); void setBorderPaint(Paint borderPaint);  }