public class DrawableCombiner extends AbstractVisual2D implements IPropertyObject
Modifier and Type | Field and Description |
---|---|
protected java.util.Map |
properties
The properties
|
Constructor and Description |
---|
DrawableCombiner()
Creates a new DrawableCombiner of size 1.0.
|
DrawableCombiner(java.lang.Object position,
java.lang.Object rotation,
java.lang.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(java.lang.Object obj,
java.lang.Integer layer,
IViewport vp)
Draws the objects to a viewport
|
void |
flushRenderInfo()
Flushes the render information.
|
java.lang.Object |
getBoundValue(java.lang.Object obj,
java.lang.Object prop,
IViewport viewport)
Gets the bound value for a property.
|
java.util.Set |
getLayers()
Returns all layers used by this DrawableCombiner.
|
java.lang.Object |
getProperty(java.lang.String name)
Returns a property.
|
java.util.Set |
getPropertyNames()
Returns all of the properties.
|
boolean |
hasProperty(java.lang.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(java.lang.String name,
java.lang.Object value)
Sets a property
|
bindPosition, bindRotation, bindSize, getPosition, getRotation, getSize, setPosition, setRotation, setSize
public DrawableCombiner()
public DrawableCombiner(java.lang.Object position, java.lang.Object rotation, java.lang.Object size)
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(java.lang.Object obj, java.lang.Integer layer, IViewport vp)
obj
- object being drawnlayer
- the current layervp
- the viewportpublic java.util.Set getLayers()
public void flushRenderInfo()
public java.lang.Object getBoundValue(java.lang.Object obj, java.lang.Object prop, IViewport viewport)
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface IPropertyObject
name
- name of the propertypublic java.util.Set getPropertyNames()
getPropertyNames
in interface IPropertyObject
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in interface IPropertyObject
name
- name of the propertyvalue
- value of the propertypublic boolean hasProperty(java.lang.String name)
IPropertyObject
null
it existshasProperty
in interface IPropertyObject
name
- the name of the property to testtrue
if and only if the property exists