com.xj.anylogic.engine.presentation
Class ShapeTopLevelPresentationGroup

java.lang.Object
  extended by com.xj.anylogic.engine.presentation.Shape
      extended by com.xj.anylogic.engine.presentation.ShapeGroup
          extended by com.xj.anylogic.engine.presentation.Shape3DGroup
              extended by com.xj.anylogic.engine.presentation.ShapeTopLevelPresentationGroup
All Implemented Interfaces:
com.xj.anylogic.engine.internal.Child, com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal, com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjal, Locatable2D, Locatable3D, java.io.Serializable, java.lang.Cloneable

public class ShapeTopLevelPresentationGroup
extends Shape3DGroup

Top-level group of active object or experiment presentation

Author:
XJ Technologies Company Ltd. www.anylogic.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.xj.anylogic.engine.presentation.Shape
UNKNOWN_NAME
 
Constructor Summary
ShapeTopLevelPresentationGroup(Presentable presentable, boolean ispublic, double x, double y, double z, double rotationXY, java.lang.Object... contents)
          Constructs a top-level presentation group with specific attributes and possibly with some content
 
Method Summary
 void add(int shape)
          Adds a non-persistent shape to the group.
 Configuration3D getConfiguration3D()
          Returns 3D configuration of active object.
 ShapeEmbeddedObjectPresentation getOwner()
          Returns the owner of this presentation if this is an active object presentation and it is embedded to another active object
This method returns null in case the active object is not embedded anywhere or if this is an experiment presentation
 java.util.ArrayList<java.lang.Object> getShapes()
          Returns the collection of shapes in the group (not a copy).
 boolean remove(int shape)
          Tries to remove a non-persistent shape from the group, returns false if the shape was not contained.
 void setOwner_xjal(ShapeEmbeddedObjectPresentation owner)
          This method shouldn't be called by user.
 
Methods inherited from class com.xj.anylogic.engine.presentation.Shape3DGroup
add, add, clone, contains, draw, get, get3DElement_xjal, getRotation, getRotationX, getRotationY, getRotationZ, getScaleZ, getZ, getZOffset, onClickAt, remove, remove, set3DElement_xjal, setContextReference_xjal, setPos, setPos, setRotation, setRotationX, setRotationY, setRotationZ, setScale, setScale, setScaleX, setScaleY, setScaleZ, setVisible, setX, setY, setZ
 
Methods inherited from class com.xj.anylogic.engine.presentation.ShapeGroup
add, add, clear, getPresentable, indexOf, onDraw, remove, remove, restoreOwner, size
 
Methods inherited from class com.xj.anylogic.engine.presentation.Shape
canHandleClick, getGroup, getName, getScaleX, getScaleY, getX, getY, isVisible, onClick
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.xj.anylogic.engine.Locatable2D
getX, getY
 
Methods inherited from interface com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjal
getPresentable
 

Constructor Detail

ShapeTopLevelPresentationGroup

public ShapeTopLevelPresentationGroup(Presentable presentable,
                                      boolean ispublic,
                                      double x,
                                      double y,
                                      double z,
                                      double rotationXY,
                                      java.lang.Object... contents)
Constructs a top-level presentation group with specific attributes and possibly with some content

Parameters:
presentable - the presentable object owning this shape
ispublic - if true, the shape is visible on container's presentation
x - the x coordinate of group
y - the y coordinate of group
z - the z coordinate of group
rotationXY - the rotation of the group in radians
contents - the (possibly, empty) initial set of shapes (Shape objects, int ids, ReplicatedShape or Light3D objects)
Method Detail

add

public void add(int shape)
Adds a non-persistent shape to the group. Note that it is your responsibility to remove the shape from the another group, if any!

Overrides:
add in class Shape3DGroup
Parameters:
shape - the shape id to add

remove

public boolean remove(int shape)
Tries to remove a non-persistent shape from the group, returns false if the shape was not contained.

Overrides:
remove in class Shape3DGroup
Parameters:
shape - the id of the shape to remove
Returns:
true if the group contained the shape, false otherwise

getShapes

public java.util.ArrayList<java.lang.Object> getShapes()
Returns the collection of shapes in the group (not a copy). The collection can contain either members of type Integer for non-persistent shapes, of class Shape for persistent shapes, and of class ReplicatedShape for replicated shapes.

Overrides:
getShapes in class Shape3DGroup
Returns:
the collection of shapes in the group

getOwner

public ShapeEmbeddedObjectPresentation getOwner()
Returns the owner of this presentation if this is an active object presentation and it is embedded to another active object
This method returns null in case the active object is not embedded anywhere or if this is an experiment presentation

Returns:
the owner of this presentation

getConfiguration3D

public Configuration3D getConfiguration3D()
Returns 3D configuration of active object.
Returns null for experiments.

Returns:
3D configuration of active object

setOwner_xjal

public void setOwner_xjal(ShapeEmbeddedObjectPresentation owner)
This method shouldn't be called by user.
It is public due to technical reasons



Copyright © 1991-2008 XJ Technlogies. All Rights Reserved.