public class DrawableCombiner extends AbstractVisual2D implements IPropertyObject
Constructor and Description |
---|
DrawableCombiner()
Creates a new DrawableCombiner of size 1.0.
|
DrawableCombiner(Object position,
Object rotation,
Object size)
Creates a new DrawableCombiner of size 1.0.
|
Modifier and Type | Method and Description |
---|---|
void |
addPrimitive(Primitive p)
Adds a primitive to the combiner.
|
void |
addPrimitive(Primitive p,
int layer)
Adds a primitive to the combiner in a specific layer.
|
void |
draw(Object obj,
Integer layer,
IViewport vp)
Draws the objects to a viewport
|
void |
flushRenderInfo()
Flushes the render information.
|
Object |
getBoundValue(Object obj,
Object prop,
IViewport viewport)
Gets the bound value for a property.
|
Set |
getLayers()
Returns all layers used by this DrawableCombiner.
|
Object |
getProperty(String name)
Returns a property.
|
Set |
getPropertyNames()
Returns all of the properties.
|
boolean |
hasProperty(String name)
Tests if the given property name exists
If an property is
null it exists |
void |
removePrimitive(Primitive p)
Removes a primitive from all layers in the combiner.
|
void |
setProperty(String name,
Object value)
Sets a property
|
bindPosition, bindRotation, bindSize, getPosition, getRotation, getSize, setPosition, setRotation, setSize
public DrawableCombiner()
public void addPrimitive(Primitive p)
p
- the primitivepublic void addPrimitive(Primitive p, int layer)
p
- the primitivelayer
- the layersizeDefining
- true if the added object should be the size-defining
onepublic void removePrimitive(Primitive p)
p
- the primitivepublic void draw(Object obj, Integer layer, IViewport vp)
obj
- object being drawnlayer
- the current layervp
- the viewportpublic Set getLayers()
public void flushRenderInfo()
public Object getBoundValue(Object obj, Object prop, IViewport viewport)
public Object getProperty(String name)
getProperty
in interface IPropertyObject
name
- name of the propertypublic Set getPropertyNames()
getPropertyNames
in interface IPropertyObject
public void setProperty(String name, Object value)
setProperty
in interface IPropertyObject
name
- name of the propertyvalue
- value of the propertypublic boolean hasProperty(String name)
IPropertyObject
null
it existshasProperty
in interface IPropertyObject
name
- the name of the property to testtrue
if and only if the property existsCopyright © 2012. All Rights Reserved.