test_class.declarator: xyPlot
test_class.original_string: XYPlot xyPlot;
test_class.type: XYPlot
test_class.var_name: xyPlot
test_class.declarator: canvas
test_class.original_string: Canvas canvas;
test_class.type: Canvas
test_class.var_name: canvas
test_class.declarator: plotArea = new RectF(0, 0, 100, 100)
test_class.original_string: RectF plotArea = new RectF(0, 0, 100, 100);
test_class.type: RectF
test_class.var_name: plotArea
test_class.declarator: renderStack
test_class.modifier: @Mock
test_class.original_string: @Mock
      RenderStack renderStack;
test_class.type: RenderStack
test_class.var_name: renderStack
test_class.file: androidplot-core/src/test/java/com/androidplot/xy/BubbleRendererTest.java
test_class.identifier: BubbleRendererTest
test_class.superclass: extends AndroidplotTest
test_case.body: @Test
      public void testOnRender_withPointLabeler() throws Exception {
          BubbleFormatter formatter = spy(new BubbleFormatter());
          PointLabelFormatter plf = new PointLabelFormatter(Color.MAGENTA);
          formatter.setPointLabelFormatter(plf);
          BubbleRenderer br = formatter.getRendererInstance(xyPlot);
          BubbleRenderer renderer = spy(br);
  
          doReturn(renderer.getClass()).when(formatter).getRendererClass();
          doReturn(renderer).when(formatter).getRendererInstance(any(XYPlot.class));
  
          BubbleSeries bs = new BubbleSeries(2, 2, 22);
  
          xyPlot.addSeries(bs, formatter);
  
          renderer.onRender(canvas, plotArea, bs, formatter, renderStack);
  
          // verify the z-val is the one labeled:
          verify(canvas).drawText(eq("22"), anyFloat(), anyFloat(), eq(plf.getTextPaint()));
      }
test_case.class_method_signature: BubbleRendererTest.testOnRender_withPointLabeler()
test_case.full_signature: @Test public void testOnRender_withPointLabeler()
test_case.identifier: testOnRender_withPointLabeler
test_case.invocations: spy setPointLabelFormatter getRendererInstance spy getRendererClass when doReturn getClass getRendererInstance when doReturn any addSeries onRender drawText verify eq anyFloat anyFloat eq getTextPaint
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOnRender_withPointLabeler()
focal_class.declarator: MIN_BUBBLE_RADIUS_DEFAULT_DP = 9
focal_class.modifier: protected static final
focal_class.original_string: protected static final float MIN_BUBBLE_RADIUS_DEFAULT_DP = 9;
focal_class.type: float
focal_class.var_name: MIN_BUBBLE_RADIUS_DEFAULT_DP
focal_class.declarator: MAX_BUBBLE_RADIUS_DEFAULT_DP = 25
focal_class.modifier: protected static final
focal_class.original_string: protected static final float MAX_BUBBLE_RADIUS_DEFAULT_DP = 25;
focal_class.type: float
focal_class.var_name: MAX_BUBBLE_RADIUS_DEFAULT_DP
focal_class.declarator: bubbleBounds
focal_class.modifier: private
focal_class.original_string: private Region bubbleBounds;
focal_class.type: Region
focal_class.var_name: bubbleBounds
focal_class.declarator: bubbleScaleMode = BubbleScaleMode.SQUARE_ROOT
focal_class.modifier: private
focal_class.original_string: private BubbleScaleMode bubbleScaleMode = BubbleScaleMode.SQUARE_ROOT;
focal_class.type: BubbleScaleMode
focal_class.var_name: bubbleScaleMode
focal_class.file: androidplot-core/src/main/java/com/androidplot/xy/BubbleRenderer.java
focal_class.identifier: BubbleRenderer
focal_class.class_method_signature: BubbleRenderer.BubbleRenderer(XYPlot plot)
focal_class.full_signature: public  BubbleRenderer(XYPlot plot)
focal_class.identifier: BubbleRenderer
focal_class.modifiers: public
focal_class.parameters: (XYPlot plot)
focal_class.signature:  BubbleRenderer(XYPlot plot)
focal_class.class_method_signature: BubbleRenderer.onRender(Canvas canvas, RectF plotArea, BubbleSeries series,
              FormatterType formatter, RenderStack stack)
focal_class.full_signature: @Override protected void onRender(Canvas canvas, RectF plotArea, BubbleSeries series,
              FormatterType formatter, RenderStack stack)
focal_class.identifier: onRender
focal_class.modifiers: @Override protected
focal_class.parameters: (Canvas canvas, RectF plotArea, BubbleSeries series,
              FormatterType formatter, RenderStack stack)
focal_class.return: void
focal_class.signature: void onRender(Canvas canvas, RectF plotArea, BubbleSeries series,
              FormatterType formatter, RenderStack stack)
focal_class.class_method_signature: BubbleRenderer.drawBubble(Canvas canvas, FormatterType formatter, BubbleSeries series,
              int index, PointF centerPoint, float radius)
focal_class.full_signature: protected void drawBubble(Canvas canvas, FormatterType formatter, BubbleSeries series,
              int index, PointF centerPoint, float radius)
focal_class.identifier: drawBubble
focal_class.modifiers: protected
focal_class.parameters: (Canvas canvas, FormatterType formatter, BubbleSeries series,
              int index, PointF centerPoint, float radius)
focal_class.return: void
focal_class.signature: void drawBubble(Canvas canvas, FormatterType formatter, BubbleSeries series,
              int index, PointF centerPoint, float radius)
focal_class.class_method_signature: BubbleRenderer.doDrawLegendIcon(Canvas canvas, RectF rect, FormatterType formatter)
focal_class.full_signature: @Override protected void doDrawLegendIcon(Canvas canvas, RectF rect, FormatterType formatter)
focal_class.identifier: doDrawLegendIcon
focal_class.modifiers: @Override protected
focal_class.parameters: (Canvas canvas, RectF rect, FormatterType formatter)
focal_class.return: void
focal_class.signature: void doDrawLegendIcon(Canvas canvas, RectF rect, FormatterType formatter)
focal_class.class_method_signature: BubbleRenderer.getMinBubbleRadius()
focal_class.full_signature: public float getMinBubbleRadius()
focal_class.identifier: getMinBubbleRadius
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: float
focal_class.signature: float getMinBubbleRadius()
focal_class.class_method_signature: BubbleRenderer.setMinBubbleRadius(float minBubbleRadius)
focal_class.full_signature: public void setMinBubbleRadius(float minBubbleRadius)
focal_class.identifier: setMinBubbleRadius
focal_class.modifiers: public
focal_class.parameters: (float minBubbleRadius)
focal_class.return: void
focal_class.signature: void setMinBubbleRadius(float minBubbleRadius)
focal_class.class_method_signature: BubbleRenderer.getMaxBubbleRadius()
focal_class.full_signature: public float getMaxBubbleRadius()
focal_class.identifier: getMaxBubbleRadius
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: float
focal_class.signature: float getMaxBubbleRadius()
focal_class.class_method_signature: BubbleRenderer.setMaxBubbleRadius(float maxBubbleRadius)
focal_class.full_signature: public void setMaxBubbleRadius(float maxBubbleRadius)
focal_class.identifier: setMaxBubbleRadius
focal_class.modifiers: public
focal_class.parameters: (float maxBubbleRadius)
focal_class.return: void
focal_class.signature: void setMaxBubbleRadius(float maxBubbleRadius)
focal_class.class_method_signature: BubbleRenderer.getBubbleScaleMode()
focal_class.full_signature: public BubbleScaleMode getBubbleScaleMode()
focal_class.identifier: getBubbleScaleMode
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: BubbleScaleMode
focal_class.signature: BubbleScaleMode getBubbleScaleMode()
focal_class.class_method_signature: BubbleRenderer.setBubbleScaleMode(BubbleScaleMode bubbleScaleMode)
focal_class.full_signature: public void setBubbleScaleMode(BubbleScaleMode bubbleScaleMode)
focal_class.identifier: setBubbleScaleMode
focal_class.modifiers: public
focal_class.parameters: (BubbleScaleMode bubbleScaleMode)
focal_class.return: void
focal_class.signature: void setBubbleScaleMode(BubbleScaleMode bubbleScaleMode)
focal_class.class_method_signature: BubbleRenderer.calculateBounds()
focal_class.full_signature: protected Region calculateBounds()
focal_class.identifier: calculateBounds
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: Region
focal_class.signature: Region calculateBounds()
focal_class.superclass: extends XYSeriesRenderer<BubbleSeries, FormatterType>
focal_method.body: @Override
      protected void onRender(Canvas canvas, RectF plotArea, BubbleSeries series,
              FormatterType formatter, RenderStack stack) {
  
          Region magnitudeBounds = calculateBounds();
          for(int i = 0; i < series.size(); i++) {
  
              // only render non-null values greater than zero:
              if(series.getY(i) != null && series.getZ(i).doubleValue() > 0) {
  
                  final PointF centerPoint = getPlot().getBounds().
                          transform(series.getX(i), series.getY(i), plotArea, false, true);
  
                  // calculate bubble radius:
                  float bubbleRadius = magnitudeBounds.
                          transform(bubbleScaleMode == BubbleScaleMode.SQUARE_ROOT ?
                                    Math.sqrt(series.getZ(i).doubleValue()) :
                                    series.getZ(i).doubleValue(), bubbleBounds).floatValue();
                  drawBubble(canvas, formatter, series, i, centerPoint, bubbleRadius);
              }
          }
      }
focal_method.class_method_signature: BubbleRenderer.onRender(Canvas canvas, RectF plotArea, BubbleSeries series,
              FormatterType formatter, RenderStack stack)
focal_method.full_signature: @Override protected void onRender(Canvas canvas, RectF plotArea, BubbleSeries series,
              FormatterType formatter, RenderStack stack)
focal_method.identifier: onRender
focal_method.invocations: calculateBounds size getY doubleValue getZ transform getBounds getPlot getX getY floatValue transform sqrt doubleValue getZ doubleValue getZ drawBubble
focal_method.modifiers: @Override protected
focal_method.parameters: (Canvas canvas, RectF plotArea, BubbleSeries series,
              FormatterType formatter, RenderStack stack)
focal_method.return: void
focal_method.signature: void onRender(Canvas canvas, RectF plotArea, BubbleSeries series,
              FormatterType formatter, RenderStack stack)