01: /*
02: * $RCSfile: ComplexPropertyGenerator.java,v $
03: *
04: * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
05: *
06: * Use is subject to license terms.
07: *
08: * $Revision: 1.1 $
09: * $Date: 2005/02/11 04:57:31 $
10: * $State: Exp $
11: */
12: package javax.media.jai.operator;
13:
14: import javax.media.jai.RenderableOp;
15: import javax.media.jai.RenderedOp;
16: import com.sun.media.jai.util.PropertyGeneratorImpl;
17:
18: /**
19: * This property generator returns <code>Boolean.TRUE</code> for the
20: * "COMPLEX" property for the rendered and renderable modes.
21: */
22: class ComplexPropertyGenerator extends PropertyGeneratorImpl {
23:
24: /** Constructor. */
25: public ComplexPropertyGenerator() {
26: super (new String[] { "COMPLEX" },
27: new Class[] { Boolean.class }, new Class[] {
28: RenderedOp.class, RenderableOp.class });
29: }
30:
31: /**
32: * Returns the specified property.
33: *
34: * @param name Property name.
35: * @param op Operation node.
36: */
37: public Object getProperty(String name, Object op) {
38: validate(name, op);
39:
40: return name.equalsIgnoreCase("complex") ? Boolean.TRUE
41: : java.awt.Image.UndefinedProperty;
42: }
43: }
|