ContextualRenderedImageFactory.java revision 54b6cfa9a9e5b861a9930af873580d6dc20f773c
1/* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17/** 18 * @author Igor V. Stolyarov 19 * @version $Revision$ 20 */ 21package java.awt.image.renderable; 22 23import java.awt.geom.Rectangle2D; 24import java.awt.image.RenderedImage; 25 26/** 27 * A factory for creating ContextualRenderedImage objects with utilities 28 * for manipulating the properties in the parameter block. 29 */ 30public interface ContextualRenderedImageFactory extends RenderedImageFactory { 31 32 /** 33 * Maps a render context to a parameter block and a renderable image. 34 * 35 * @param a0 the index 36 * @param a1 the RenderContext 37 * @param a2 the ParameterBlock 38 * @param a3 the RenderableImage 39 * 40 * @return the render context 41 */ 42 public RenderContext mapRenderContext(int a0, RenderContext a1, ParameterBlock a2, RenderableImage a3); 43 44 /** 45 * Gets the value of the property from the parameter block. 46 * 47 * @param a0 the parameter block to examine to find the property 48 * @param a1 the name of the property 49 * 50 * @return the value of the property 51 */ 52 public Object getProperty(ParameterBlock a0, String a1); 53 54 /** 55 * Creates the rendered image determined by the render context and 56 * parameter block. 57 * 58 * @param a0 the RenderContext 59 * @param a1 the ParameterBlock 60 * 61 * @return the rendered image 62 */ 63 public RenderedImage create(RenderContext a0, ParameterBlock a1); 64 65 /** 66 * Gets the bounding rectangle from the parameter block. 67 * 68 * @param a0 the parameter block to read the bounds from 69 * 70 * @return the bounding rectangle 71 */ 72 public Rectangle2D getBounds2D(ParameterBlock a0); 73 74 /** 75 * Gets the names of all of the supported properties. 76 * 77 * @return the property names 78 */ 79 public String[] getPropertyNames(); 80 81 /** 82 * Checks if this image factory is dynamic. 83 * 84 * @return true, if this image factory is dynamic 85 */ 86 public boolean isDynamic(); 87 88} 89 90