001: /*
002: * @(#) $Header: /cvs/jai-operators/src/tests/ca/forklabs/media/jai/mock/MockRenderableImage.java,v 1.2 2007/05/10 18:06:26 forklabs Exp $
003: *
004: * Copyright (C) 2007 Forklabs Daniel Léonard
005: *
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU General Public License
008: * as published by the Free Software Foundation; either version 2
009: * of the License, or (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
019: */
020:
021: package ca.forklabs.media.jai.mock;
022:
023: import java.awt.RenderingHints;
024: import java.awt.image.RenderedImage;
025: import java.awt.image.renderable.RenderContext;
026: import java.awt.image.renderable.RenderableImage;
027: import java.util.Vector;
028:
029: /**
030: * Class {@code MockRenderableImage} is an empty implementation of class
031: * {@link RenderableImage}.
032: *
033: * @author <a href="mailto:forklabs at dev.java.net?subject=ca.forklabs.media.jai.mock.MockRenderableImage">Daniel Léonard</a>
034: * @version $Revision: 1.2 $
035: */
036: public class MockRenderableImage implements RenderableImage {
037:
038: /**
039: * Does nothing.
040: * @return always {@code null}.
041: */
042: public RenderedImage createDefaultRendering() {
043: return null;
044: }
045:
046: /**
047: * Does nothing.
048: * @param renderContext ignored.
049: * @return always {@code null}.
050: */
051: @SuppressWarnings("unused")
052: public RenderedImage createRendering(RenderContext renderContext) {
053: return null;
054: }
055:
056: /**
057: * Does nothing.
058: * @param w ignored.
059: * @param h ignored.
060: * @param hints ignored.
061: * @return always {@code null}.
062: */
063: @SuppressWarnings("unused")
064: public RenderedImage createScaledRendering(int w, int h,
065: RenderingHints hints) {
066: return null;
067: }
068:
069: /**
070: * Does nothing.
071: * @return always <em>0.0f</em>.
072: */
073: public float getHeight() {
074: return 0.0f;
075: }
076:
077: /**
078: * Does nothing.
079: * @return always <em>0.0f</em>.
080: */
081: public float getMinX() {
082: return 0.0f;
083: }
084:
085: /**
086: * Does nothing.
087: * @return always <em>0.0f</em>.
088: */
089: public float getMinY() {
090: return 0.0f;
091: }
092:
093: /**
094: * Does nothing.
095: * @param name ignored.
096: * @return always {@code null}.
097: */
098: @SuppressWarnings("unused")
099: public Object getProperty(String name) {
100: return null;
101: }
102:
103: /**
104: * Does nothing.
105: * @return always {@code null}.
106: */
107: public String[] getPropertyNames() {
108: return null;
109: }
110:
111: /**
112: * Does nothing.
113: * @return always {@code null}.
114: */
115: public Vector<RenderableImage> getSources() {
116: return null;
117: }
118:
119: /**
120: * Does nothing.
121: * @return always <em>0.0f</em>.
122: */
123: public float getWidth() {
124: return 0.0f;
125: }
126:
127: /**
128: * Does nothing.
129: * @return always {@code false}.
130: */
131: @SuppressWarnings("unused")
132: public boolean isDynamic() {
133: return false;
134: }
135:
136: }
137:
138: /*
139: * $Log: MockRenderableImage.java,v $
140: * Revision 1.2 2007/05/10 18:06:26 forklabs
141: * Removed undesirable task tag.
142: *
143: * Revision 1.1 2007/05/03 20:23:18 forklabs
144: * Mocks.
145: *
146: */
|