/*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software
* Foundation.
*
* You should have received a copy of the GNU Lesser General Public License along with this
* program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
* or from the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* Copyright (c) 2001 - 2013 Object Refinery Ltd, Pentaho Corporation and Contributors.. All rights reserved.
*/
package org.pentaho.reporting.engine.classic.core.util;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import org.pentaho.reporting.engine.classic.core.ResourceBundleFactory;
import org.pentaho.reporting.engine.classic.core.imagemap.ImageMap;
import org.pentaho.reporting.engine.classic.core.style.StyleSheet;
import org.pentaho.reporting.libraries.base.config.Configuration;
/**
* A report drawable receives context-information from the report processor that may allow the implementation to return
* better results. Implement this interface to get some extra hints for your drawing task.
*
* @author Thomas Morgner
*/
public interface ReportDrawable {
public void draw( Graphics2D graphics2D, Rectangle2D bounds );
/**
* Provides the current report configuration of the current report process to the drawable. The report configuration
* can be used to configure the drawing process through the report.
*
* @param config
* the report configuration.
*/
public void setConfiguration( Configuration config );
/**
* Provides the computed stylesheet of the report element that contained this drawable. The stylesheet is immutable.
*
* @param style
* the stylesheet.
*/
public void setStyleSheet( StyleSheet style );
/**
* Defines the resource-bundle factory that can be used to localize the drawing process.
*
* @param bundleFactory
* the resource-bundle factory.
*/
public void setResourceBundleFactory( final ResourceBundleFactory bundleFactory );
/**
* Returns an optional image-map for the entry.
*
* @param bounds
* the bounds for which the image map is computed.
* @return the computed image-map or null if there is no image-map available.
*/
public ImageMap getImageMap( final Rectangle2D bounds );
}