public static class J3DUtils.ApplyingShapeHandler extends java.lang.Object implements J3DUtils.ShapeHandler
Generic J3DUtils.ShapeHandler impl that delegates to an object
implementing an apply(Object[]) method.
The apply(Object[]) method is passed the argument vector
{shape} where shape is the parameter passed to handleShape(javax.media.j3d.Shape3D). If it returns a Boolean or a boolean then the value has
the same semantics as J3DUtils.ShapeHandler.handleShape(javax.media.j3d.Shape3D); other return types
are treated as true.
This is primarily for integration with higher-level scripting environments such as JScheme.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
appliccable
the delegate
|
protected java.lang.reflect.Method |
applyMethod
the apply method on the delegate
|
| Constructor and Description |
|---|
J3DUtils.ApplyingShapeHandler(java.lang.Object appliccable)
uses default applyMethodName
|
J3DUtils.ApplyingShapeHandler(java.lang.Object appliccable,
java.lang.String applyMethodName)
Make a new delegating handler.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
handleShape(javax.media.j3d.Shape3D shape)
Delegates to
appliccable.apply(Object[]), see
class header doc. |
protected final java.lang.Object appliccable
protected final java.lang.reflect.Method applyMethod
public J3DUtils.ApplyingShapeHandler(java.lang.Object appliccable,
java.lang.String applyMethodName)
Make a new delegating handler.
applyMethodName - the name of the apply(Object[]) method,
or null to use "apply"public J3DUtils.ApplyingShapeHandler(java.lang.Object appliccable)
public boolean handleShape(javax.media.j3d.Shape3D shape)
Delegates to appliccable.apply(Object[]), see
class header doc.
handleShape in interface J3DUtils.ShapeHandler