Package com.anylogic.engine.presentation
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.presentation.ShapeGroup
- Methods inherited from class com.anylogic.engine.presentation.Shape3D
- Methods inherited from class com.anylogic.engine.presentation.Shape
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Methods inherited from interface com.anylogic.engine.internal.Child
- Methods inherited from interface com.anylogic.engine.Locatable2D
- Constructor Details
- Method Details
- updateDynamicPropertiesStructural
- createShapes
- createShapeWithStaticProperties_xjal
- setShapeDynamicProperties_xjal
- size
- get
- getAgents_xjal
- getAgentsIterator_xjal
- isVisibleCurrently
- resetSVGState
- findSVGElement
- clear
- initialize_xjal
- get
- indexOf
- add
- add
- add
- insert
- insert
- insert
- remove
- remove
- remove
- add
- remove
- add
- remove
- java.lang.Object
- com.anylogic.engine.presentation.Shape
- com.anylogic.engine.presentation.Shape3D
- com.anylogic.engine.presentation.ShapeGroup
- com.anylogic.engine.presentation.ShapeAgentPopulationGroup
- All Implemented Interfaces:
com.anylogic.engine.internal.Child
,Locatable2D
,Locatable3D
,AggregatableAnimationElement
,HasLevel
,LevelElement
,SVGElement
,UsdElement
,Serializable
,Cloneable
public class ShapeAgentPopulationGroup extends ShapeGroup
- See Also:
- Serialized Form
Constructor | Description |
---|---|
ShapeAgentPopulationGroup |
Modifier and Type | Method | Description |
---|---|---|
void | add |
Deprecated.
This function is deprecated and will be removed in the next release
|
void | add |
Deprecated.
|
void | add |
Deprecated.
|
void | add |
Deprecated.
|
void | add |
Deprecated.
|
void | clear() |
Deprecated.
|
void | createShapes() |
Creates missing and removes redundant shapes so that current number of
shapes in this replicated shape equals value returned by
#getReplication() |
ShapeEmbeddedObjectPresentation | createShapeWithStaticProperties_xjal |
Creates a new shape with static properties already set.
|
SVGElement | findSVGElement |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
Object | get |
Deprecated.
|
ShapeEmbeddedObjectPresentation | get |
Returns the embedded presentation shape shape of the given agent.
|
Iterable<Agent> | getAgents_xjal() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. Returns the unsorted collection of agents - may be inconsistent with the real population state because of shape update sequence |
Iterator<Agent> | getAgentsIterator_xjal() | |
int | indexOf |
Deprecated.
|
void | initialize_xjal |
Deprecated.
|
void | insert |
Deprecated.
This function is deprecated and will be removed in the next release
|
void | insert |
Deprecated.
|
void | insert |
Deprecated.
|
boolean | isVisibleCurrently() |
Takes into account visibility of the
Level |
boolean | remove |
Deprecated.
This function is deprecated and will be removed in the next release
|
boolean | remove |
Deprecated.
|
boolean | remove |
Deprecated.
|
boolean | remove |
Deprecated.
|
boolean | remove |
Deprecated.
|
void | resetSVGState() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
void | setShapeDynamicProperties_xjal |
Sets the dynamic properties of a shape with the given index.
|
int | size() |
Returns the number of shapes in the group.
|
boolean | updateDynamicPropertiesStructural |
clone, contains, getPresentable, getRotation, getRotationX, getRotationY, getRotationZ, getShapes, initialize_xjal, onDraw, postSVGShapeSpecificAttributes, restoreOwner, setRotation, setRotationX, setRotationY, setRotationZ, setVisible
canHandleClick, getDrawMode, getScaleZ, getZ, getZOffset, setDrawMode, setPos, setPos, setPos, setScale, setScale, setScaleZ, setZ
executeUserAction, getGroup, getLevel, getName, getOrGenerateUSDId, getScaleX, getScaleY, getSVGId, getUsdVersion, getX, getY, isJava2DSwingPresentation, isPublic_xjal, isSVGPresentation, isVisible, onAggregatorVisibilityChanged, onClick, randomPointInside, randomPointInside, removeSVGFromOwner, removeSVGImage, setChangedUsdVersion, setLevel, setNextChangedUsdVersion, setPublic_xjal, setScale, setScaleX, setScaleY, setX, setY, updateDynamicProperties, updateSVGProperties
public ShapeAgentPopulationGroup(Agent presentable, ShapeDrawMode drawMode, boolean ispublic, AgentList<?> population)
@AnyLogicInternalAPI public boolean updateDynamicPropertiesStructural(boolean publicOnly)
- Overrides:
updateDynamicPropertiesStructural
in classShapeGroup
- Returns:
true
if:
1. update was done (usually for visible elements, respecting public flag etc.)
AND
2. further update of structural changes is applicable
public void createShapes()
Creates missing and removes redundant shapes so that current number of
shapes in this replicated shape equals value returned by
#getReplication()
@AnyLogicInternalCodegenAPI public ShapeEmbeddedObjectPresentation createShapeWithStaticProperties_xjal(Agent agent, int index)
Creates a new shape with static properties already set. Must be defined
in a subclass.
- Parameters:
index
- the desired shape index- Returns:
- a new shape
@AnyLogicInternalCodegenAPI public void setShapeDynamicProperties_xjal(ShapeEmbeddedObjectPresentation shape, int index)
Sets the dynamic properties of a shape with the given index. By default
does nothing.
- Parameters:
shape
- the shapeindex
- the shape index
public int size()
Returns the number of shapes in the group.
- Overrides:
size
in classShapeGroup
- Returns:
- the number of shapes in the group
public ShapeEmbeddedObjectPresentation get(Agent a)
Returns the embedded presentation shape shape of the given agent.
Returns
null
if the given agent isn't contained in this shape.- Parameters:
a
- the agent- Returns:
- the shape
@AnyLogicInternalAPI public Iterable<Agent> getAgents_xjal()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. Returns the unsorted collection of agents - may be inconsistent with the real population state because of shape update sequence
it may be removed/renamed in future. Returns the unsorted collection of agents - may be inconsistent with the real population state because of shape update sequence
@AnyLogicInternalAPI public Iterator<Agent> getAgentsIterator_xjal()
public boolean isVisibleCurrently()
Description copied from class:
Shape
Takes into account visibility of the
Level
- Overrides:
isVisibleCurrently
in classShape
@AnyLogicInternalAPI public void resetSVGState()
Description copied from interface:
SVGElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Specified by:
resetSVGState
in interfaceSVGElement
- Overrides:
resetSVGState
in classShapeGroup
@AnyLogicInternalAPI public SVGElement findSVGElement(long svgId)
Description copied from interface:
SVGElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Specified by:
findSVGElement
in interfaceSVGElement
- Overrides:
findSVGElement
in classShapeGroup
@Deprecated public void clear()
Deprecated.
Description copied from class:
ShapeGroup
Removes all shapes from the group.
- Overrides:
clear
in classShapeGroup
@Deprecated public void initialize_xjal(Object... contents)
Deprecated.
@Deprecated public Object get(int i)
Deprecated.
Description copied from class:
ShapeGroup
Returns the shape with the given index.
The result may be a shape, replicated shape, 3D light or camera.
- Overrides:
get
in classShapeGroup
- Parameters:
i
- the index of the shape- Returns:
- the shape with the given index
@Deprecated public int indexOf(Object shape)
Deprecated.
Description copied from class:
ShapeGroup
Returns the index of the specified shape (either object of class
Shape, or object of class ReplicatedShape) in this group, or
More formally, returns the index
Note that implementation of this method is very inefficient (has linear complexity)
-1
if this group does not
contain the shape.More formally, returns the index
i
such that
get( i ) == shape
, or -1
if
there is no such index.Note that implementation of this method is very inefficient (has linear complexity)
- Overrides:
indexOf
in classShapeGroup
- Parameters:
shape
- the shape to find index of- Returns:
- the index of the shape or
-1
@Deprecated public void add(Shape shape)
Deprecated.
Description copied from class:
ShapeGroup
Adds a persistent shape to the group. Note that it is your
responsibility to remove the shape from the another group, if any!
- Overrides:
add
in classShapeGroup
- Parameters:
shape
- the shape to add
@Deprecated public void add(int shape)
Deprecated.
This function is deprecated and will be removed in the next release
@Deprecated public void add(ReplicatedShape<?> rshape)
Deprecated.
Description copied from class:
ShapeGroup
Adds a replicated shape to the group. Note that it is your
responsibility to remove the shape from the another group, if any!
- Overrides:
add
in classShapeGroup
- Parameters:
rshape
- the replicated shape to add
@Deprecated public void insert(int index, Shape shape)
Deprecated.
Description copied from class:
ShapeGroup
Adds a persistent shape to the group at the specified index (which
defines z-order of shape in 2D animation). Note that it is your
responsibility to remove the shape from the another group, if any!
- Overrides:
insert
in classShapeGroup
- Parameters:
index
- index at which the specified shape is to be inserted (from0
tosize()
, inclusive)shape
- the shape to add
@Deprecated public void insert(int index, int shape)
Deprecated.
This function is deprecated and will be removed in the next release
@Deprecated public void insert(int index, ReplicatedShape<?> rshape)
Deprecated.
Description copied from class:
ShapeGroup
Adds a replicated shape to the group at the specified index (which
defines z-order of shape in 2D animation). Note that it is your
responsibility to remove the shape from the another group, if any!
- Overrides:
insert
in classShapeGroup
- Parameters:
index
- index at which the specified shape is to be inserted (from0
tosize()
, inclusive)rshape
- the replicated shape to add
@Deprecated public boolean remove(Shape shape)
Deprecated.
Description copied from class:
ShapeGroup
Tries to remove a persistent shape from the group,
returns
false
if the shape was not contained.- Overrides:
remove
in classShapeGroup
- Parameters:
shape
- the shape to remove- Returns:
true
if the group contained the shape,false
otherwise
@Deprecated public boolean remove(int shape)
Deprecated.
This function is deprecated and will be removed in the next release
@Deprecated public boolean remove(ReplicatedShape<?> rshape)
Deprecated.
Description copied from class:
ShapeGroup
Tries to remove a replicated shape from the group,
returns
false
if the shape was not contained.- Overrides:
remove
in classShapeGroup
- Parameters:
rshape
- the replicated shape to remove- Returns:
true
if the group contained the shape,false
otherwise
@Deprecated public void add(Light3D light)
Deprecated.
Description copied from class:
ShapeGroup
Adds a light to the group. Note that it is your
responsibility to remove the light from the another group, if any!
- Overrides:
add
in classShapeGroup
- Parameters:
light
- the light to add
@Deprecated public boolean remove(Light3D light)
Deprecated.
Description copied from class:
ShapeGroup
Tries to remove a light from the group,
returns
false
if the light was not contained.- Overrides:
remove
in classShapeGroup
- Parameters:
light
- the light to remove- Returns:
true
if the group contained the light,false
otherwise
@Deprecated public void add(Camera3D camera)
Deprecated.
Description copied from class:
ShapeGroup
Adds a camera to the group. Note that it is your
responsibility to remove the camera from the another group, if any!
- Overrides:
add
in classShapeGroup
- Parameters:
camera
- the camera to add
@Deprecated public boolean remove(Camera3D camera)
Deprecated.
Description copied from class:
ShapeGroup
Tries to remove a camera from the group,
returns
false
if the camera was not contained.- Overrides:
remove
in classShapeGroup
- Parameters:
camera
- the camera to remove- Returns:
true
if the group contained the camera,false
otherwise