private void drawOverlayInfo(Graphics2D g,Point position){
  if (mReportingContainer == null) {
    return;
  }
  int ascent=mDefaultFontMetrics.getAscent();
  int labelColumnWidth=0;
  int dataColumnWidth=0;
  int overlayHeight=OVERLAY_INFO_PADDING * 2 + ascent + OVERLAY_INFO_LINE_SPACING;
  String containerName=mReportingContainer.getContainerName();
  if (containerName != null) {
    labelColumnWidth=mDefaultFontMetrics.stringWidth(containerName);
    overlayHeight+=ascent + OVERLAY_INFO_LINE_SPACING;
  }
  ArrayDeque<Integer> dataWidthArray=new ArrayDeque<>();
  for (  ReportingSeries series : mReportingData.keySet()) {
    int labelWidth=mDefaultFontMetrics.stringWidth(series.getLabel());
    labelColumnWidth=Math.max(labelColumnWidth,labelWidth);
    for (    ReportingSeries.ReportingData data : mReportingData.get(series)) {
      int dataWidth=mDefaultFontMetrics.stringWidth(data.formattedYData);
      dataColumnWidth=Math.max(dataColumnWidth,dataWidth);
      dataWidthArray.add(dataWidth);
      overlayHeight+=ascent + OVERLAY_INFO_LINE_SPACING;
    }
  }
  int overlayWidth=Math.max(OVERLAY_INFO_MIN_WIDTH,OVERLAY_INFO_PADDING * 2 + OVERLAY_INFO_COLUMN_SPACING + labelColumnWidth + dataColumnWidth);
  Rectangle2D.Float rect=new Rectangle2D.Float(0,0,overlayWidth,overlayHeight);
  g.translate(position.x + OVERLAY_INFO_OFFSET,position.y + OVERLAY_INFO_OFFSET);
  g.translate(OVERLAY_SHADOW_OFFSET,OVERLAY_SHADOW_OFFSET);
  g.setColor(AdtUiUtils.DEFAULT_FONT_COLOR);
  g.fill(rect);
  g.translate(-OVERLAY_SHADOW_OFFSET,-OVERLAY_SHADOW_OFFSET);
  g.setColor(AdtUiUtils.OVERLAY_INFO_BACKGROUND);
  g.fill(rect);
  g.setColor(AdtUiUtils.DEFAULT_FONT_COLOR);
  g.setFont(AdtUiUtils.DEFAULT_FONT);
  int textHeight=OVERLAY_INFO_PADDING;
  if (containerName != null) {
    textHeight+=ascent;
    g.drawString(containerName,OVERLAY_INFO_PADDING,textHeight);
    textHeight+=OVERLAY_INFO_LINE_SPACING;
  }
  for (  ReportingSeries series : mReportingData.keySet()) {
    for (    ReportingSeries.ReportingData data : mReportingData.get(series)) {
      textHeight+=ascent;
      g.drawString(series.getLabel(),OVERLAY_INFO_PADDING,textHeight);
      g.drawString(data.formattedYData,overlayWidth - OVERLAY_INFO_PADDING - dataWidthArray.remove(),textHeight);
      textHeight+=OVERLAY_INFO_LINE_SPACING;
    }
  }
  g.drawLine(0,textHeight,overlayWidth,textHeight);
  textHeight+=OVERLAY_INFO_LINE_SPACING + ascent;
  g.drawString(OVERLAY_DRILL_DOWN_MESSAGE,OVERLAY_INFO_PADDING,textHeight);
  g.translate(-(position.x + OVERLAY_INFO_OFFSET),-(position.y + OVERLAY_INFO_OFFSET));
}

private void drawOverlayInfo ( Graphics2D g , Point position ) { if ( mReportingContainer == null ) { return ; } int ascent = mDefaultFontMetrics . getAscent ( ) ; int labelColumnWidth = 0 ; int dataColumnWidth = 0 ; int overlayHeight = OVERLAY_INFO_PADDING * 2 + ascent + OVERLAY_INFO_LINE_SPACING ; String containerName = mReportingContainer . getContainerName ( ) ; if ( containerName != null ) { labelColumnWidth = mDefaultFontMetrics . stringWidth ( containerName ) ; overlayHeight += ascent + OVERLAY_INFO_LINE_SPACING ; } ArrayDeque < Integer > dataWidthArray = new ArrayDeque < > ( ) ; for ( ReportingSeries series : mReportingData . keySet ( ) ) { int labelWidth = mDefaultFontMetrics . stringWidth ( series . getLabel ( ) ) ; labelColumnWidth = Math . max ( labelColumnWidth , labelWidth ) ; for ( ReportingSeries . ReportingData data : mReportingData . get ( series ) ) { int dataWidth = mDefaultFontMetrics . stringWidth ( data . formattedYData ) ; dataColumnWidth = Math . max ( dataColumnWidth , dataWidth ) ; dataWidthArray . add ( dataWidth ) ; overlayHeight += ascent + OVERLAY_INFO_LINE_SPACING ; } } int overlayWidth = Math . max ( OVERLAY_INFO_MIN_WIDTH , OVERLAY_INFO_PADDING * 2 + OVERLAY_INFO_COLUMN_SPACING + labelColumnWidth + dataColumnWidth ) ; Rectangle2D . Float rect = new Rectangle2D . Float ( 0 , 0 , overlayWidth , overlayHeight ) ; g . translate ( position . x + OVERLAY_INFO_OFFSET , position . y + OVERLAY_INFO_OFFSET ) ; g . translate ( OVERLAY_SHADOW_OFFSET , OVERLAY_SHADOW_OFFSET ) ; g . setColor ( AdtUiUtils . DEFAULT_FONT_COLOR ) ; g . fill ( rect ) ; g . translate ( - OVERLAY_SHADOW_OFFSET , - OVERLAY_SHADOW_OFFSET ) ; g . setColor ( AdtUiUtils . OVERLAY_INFO_BACKGROUND ) ; g . fill ( rect ) ; g . setColor ( AdtUiUtils . DEFAULT_FONT_COLOR ) ; g . setFont ( AdtUiUtils . DEFAULT_FONT ) ; int textHeight = OVERLAY_INFO_PADDING ; if ( containerName != null ) { textHeight += ascent ; g . drawString ( containerName , OVERLAY_INFO_PADDING , textHeight ) ; textHeight += OVERLAY_INFO_LINE_SPACING ; } for ( ReportingSeries series : mReportingData . keySet ( ) ) { for ( ReportingSeries . ReportingData data : mReportingData . get ( series ) ) { textHeight += ascent ; g . drawString ( series . getLabel ( ) , OVERLAY_INFO_PADDING , textHeight ) ; g . drawString ( data . formattedYData , overlayWidth - OVERLAY_INFO_PADDING - dataWidthArray . remove ( ) , textHeight ) ; textHeight += OVERLAY_INFO_LINE_SPACING ; } } g . drawLine ( 0 , textHeight , overlayWidth , textHeight ) ; textHeight += OVERLAY_INFO_LINE_SPACING + ascent ; g . drawString ( OVERLAY_DRILL_DOWN_MESSAGE , OVERLAY_INFO_PADDING , textHeight ) ; g . translate ( - ( position . x + OVERLAY_INFO_OFFSET ) , - ( position . y + OVERLAY_INFO_OFFSET ) ) ; }
manually draws a overlaying rectangle displaying rows of data corresponding to where the user is currently pointing at .
