19 package org.sleuthkit.autopsy.datasourcesummary.uiutils;
 
   21 import java.awt.Graphics2D;
 
   22 import org.jfree.chart.ChartPanel;
 
   23 import org.jfree.chart.panel.AbstractOverlay;
 
   24 import org.jfree.chart.panel.Overlay;
 
   30 class ChartMessageOverlay 
extends AbstractOverlay implements Overlay {
 
   32     private static final long serialVersionUID = 1L;
 
   33     private final BaseMessageOverlay overlay = 
new BaseMessageOverlay();
 
   37     private static final double MESSAGE_WIDTH_FACTOR = .6;
 
   45     void setVisible(
boolean visible) {
 
   46         overlay.setVisible(visible);
 
   54     void setMessage(String message) {
 
   55         overlay.setMessage(message);
 
   59     public void paintOverlay(Graphics2D gd, ChartPanel cp) {
 
   60         int labelWidth = (int) (Math.min(cp.getWidth(), cp.getHeight()) * MESSAGE_WIDTH_FACTOR);
 
   61         overlay.paintOverlay(gd, cp.getWidth(), cp.getHeight(), labelWidth);