001: /*
002: * ============================================================================
003: * GNU Lesser General Public License
004: * ============================================================================
005: *
006: * JasperReports - Free Java report-generating library.
007: * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2.1 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library; if not, write to the Free Software
021: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
022: *
023: * JasperSoft Corporation
024: * 303 Second Street, Suite 450 North
025: * San Francisco, CA 94107
026: * http://www.jaspersoft.com
027: */
028:
029: /*
030: * Contributors:
031: * Adrian Jackson - iapetus@users.sourceforge.net
032: * David Taylor - exodussystems@users.sourceforge.net
033: * Lars Kristensen - llk@users.sourceforge.net
034: */
035: package net.sf.jasperreports.engine;
036:
037: import java.awt.Graphics2D;
038: import java.awt.geom.Dimension2D;
039: import java.awt.geom.Rectangle2D;
040: import java.io.Serializable;
041:
042: /**
043: * @author Teodor Danciu (teodord@users.sourceforge.net)
044: * @version $Id: JRRenderable.java 1229 2006-04-19 10:27:35Z teodord $
045: */
046: public interface JRRenderable extends Serializable {
047:
048: /**
049: *
050: */
051: public static final byte TYPE_IMAGE = 0;
052: public static final byte TYPE_SVG = 1;
053:
054: /**
055: * A constant used for specifying that the image is of unknown type
056: */
057: public static final byte IMAGE_TYPE_UNKNOWN = 0;
058:
059: /**
060: * A constant used for specifying that the image is of GIF type
061: */
062: public static final byte IMAGE_TYPE_GIF = 1;
063:
064: /**
065: * A constant used for specifying that the image is of the JPEG type
066: */
067: public static final byte IMAGE_TYPE_JPEG = 2;
068:
069: /**
070: * A constant used for specifying that the image is of the PNG type
071: */
072: public static final byte IMAGE_TYPE_PNG = 3;
073:
074: /**
075: * A constant used for specifying that the image is of the TIFF type
076: */
077: public static final byte IMAGE_TYPE_TIFF = 4;
078:
079: /**
080: * image mime type constants
081: */
082: public static final String MIME_TYPE_GIF = "image/gif";
083: public static final String MIME_TYPE_JPEG = "image/jpeg";
084: public static final String MIME_TYPE_PNG = "image/png";
085: public static final String MIME_TYPE_TIFF = "image/tiff";
086:
087: /**
088: *
089: */
090: public String getId();
091:
092: /**
093: *
094: */
095: public byte getType();
096:
097: /**
098: *
099: */
100: public byte getImageType();
101:
102: /**
103: *
104: */
105: public Dimension2D getDimension() throws JRException;
106:
107: /**
108: *
109: */
110: public byte[] getImageData() throws JRException;
111:
112: /**
113: *
114: */
115: public void render(Graphics2D grx, Rectangle2D rectanle)
116: throws JRException;
117:
118: }
|