Class DrawableCombiner
- java.lang.Object
-
- jadex.extension.envsupport.observer.graphics.drawable.AbstractVisual2D
-
- jadex.extension.envsupport.observer.graphics.drawable.DrawableCombiner
-
- All Implemented Interfaces:
IPropertyObject
public class DrawableCombiner extends AbstractVisual2D implements IPropertyObject
This drawable combines multiple drawables into a single drawable object.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.MappropertiesThe properties
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPrimitive(Primitive p)Adds a primitive to the combiner.voidaddPrimitive(Primitive p, int layer)Adds a primitive to the combiner in a specific layer.voiddraw(java.lang.Object obj, java.lang.Integer layer, IViewport vp)Draws the objects to a viewportvoidflushRenderInfo()Flushes the render information.java.lang.ObjectgetBoundValue(java.lang.Object obj, java.lang.Object prop, IViewport viewport)Gets the bound value for a property.java.util.SetgetLayers()Returns all layers used by this DrawableCombiner.java.lang.ObjectgetProperty(java.lang.String name)Returns a property.java.util.SetgetPropertyNames()Returns all of the properties.booleanhasProperty(java.lang.String name)Tests if the given property name exists If an property isnullit existsvoidremovePrimitive(Primitive p)Removes a primitive from all layers in the combiner.voidsetProperty(java.lang.String name, java.lang.Object value)Sets a property-
Methods inherited from class jadex.extension.envsupport.observer.graphics.drawable.AbstractVisual2D
bindPosition, bindRotation, bindSize, getPosition, getRotation, getSize, setPosition, setRotation, setSize
-
-
-
-
Method Detail
-
addPrimitive
public void addPrimitive(Primitive p)
Adds a primitive to the combiner.- Parameters:
p- the primitive
-
addPrimitive
public void addPrimitive(Primitive p, int layer)
Adds a primitive to the combiner in a specific layer.- Parameters:
p- the primitivelayer- the layersizeDefining- true if the added object should be the size-defining one
-
removePrimitive
public void removePrimitive(Primitive p)
Removes a primitive from all layers in the combiner.- Parameters:
p- the primitive
-
draw
public void draw(java.lang.Object obj, java.lang.Integer layer, IViewport vp)Draws the objects to a viewport- Parameters:
obj- object being drawnlayer- the current layervp- the viewport
-
getLayers
public java.util.Set getLayers()
Returns all layers used by this DrawableCombiner.- Returns:
- all layers used by the DrawableCombiner
-
flushRenderInfo
public void flushRenderInfo()
Flushes the render information.
-
getBoundValue
public java.lang.Object getBoundValue(java.lang.Object obj, java.lang.Object prop, IViewport viewport)Gets the bound value for a property.- Returns:
- The bound value.
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
Returns a property.- Specified by:
getPropertyin interfaceIPropertyObject- Parameters:
name- name of the property- Returns:
- the property
-
getPropertyNames
public java.util.Set getPropertyNames()
Returns all of the properties.- Specified by:
getPropertyNamesin interfaceIPropertyObject- Returns:
- the properties
-
setProperty
public void setProperty(java.lang.String name, java.lang.Object value)Sets a property- Specified by:
setPropertyin interfaceIPropertyObject- Parameters:
name- name of the propertyvalue- value of the property
-
hasProperty
public boolean hasProperty(java.lang.String name)
Description copied from interface:IPropertyObjectTests if the given property name exists If an property isnullit exists- Specified by:
hasPropertyin interfaceIPropertyObject- Parameters:
name- the name of the property to test- Returns:
trueif and only if the property exists
-
-