AnyLogic
Expand
Font size
All Implemented Interfaces:
com.anylogic.engine.internal.Child, Locatable2D, Locatable3D, AggregatableAnimationElement, HasLevel, LevelElement, SVGElement, Serializable, Cloneable

public class ShapeAgentPopulationGroup
extends ShapeGroup
See Also:
Serialized Form

Field Summary

Fields inherited from class com.anylogic.engine.presentation.Shape3D

UNKNOWN_NAME

Constructor Summary

ConstructorDescription
ShapeAgentPopulationGroup(Agent presentable, ShapeDrawMode drawMode, boolean ispublic, AgentList<?> population) 

Method Summary

Modifier and TypeMethodDescription
voidadd(int shape)
Deprecated.
This function is deprecated and will be removed in the next release
voidadd(Camera3D camera)
Deprecated.
voidadd(Light3D light)
Deprecated.
voidadd(ReplicatedShape<?> rshape)
Deprecated.
voidadd(Shape shape)
Deprecated.
voidclear()
Deprecated.
voidcreateShapes()
Creates missing and removes redundant shapes so that current number of shapes in this replicated shape equals value returned by #getReplication()
ShapeEmbeddedObjectPresentationcreateShapeWithStaticProperties_xjal(Agent agent, int index)
Creates a new shape with static properties already set.
SVGElementfindSVGElement(long svgId)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Objectget(int i)
Deprecated.
ShapeEmbeddedObjectPresentationget(Agent a)
Returns the embedded presentation shape shape of the given agent.
Collection<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
intindexOf(Object shape)
Deprecated.
voidinitialize_xjal(Object... contents)
Deprecated.
voidinsert(int index, int shape)
Deprecated.
This function is deprecated and will be removed in the next release
voidinsert(int index, ReplicatedShape<?> rshape)
Deprecated.
voidinsert(int index, Shape shape)
Deprecated.
booleanremove(int shape)
Deprecated.
This function is deprecated and will be removed in the next release
booleanremove(Camera3D camera)
Deprecated.
booleanremove(Light3D light)
Deprecated.
booleanremove(ReplicatedShape<?> rshape)
Deprecated.
booleanremove(Shape shape)
Deprecated.
voidresetSVGState()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
voidsetShapeDynamicProperties_xjal(ShapeEmbeddedObjectPresentation shape, int index)
Sets the dynamic properties of a shape with the given index.
intsize()
Returns the number of shapes in the group.
booleanupdateDynamicPropertiesStructural(boolean publicOnly) 

Methods inherited from class com.anylogic.engine.presentation.Shape3D

canHandleClick, getDrawMode, getScaleZ, getZ, getZOffset, setDrawMode, setPos, setPos, setPos, setScale, setScale, setScaleZ, setZ

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement

initializeInternal, postInitialize

Methods inherited from interface com.anylogic.engine.internal.Child

restoreOwner

Methods inherited from interface com.anylogic.engine.Locatable2D

getX, getY

Constructor Details

ShapeAgentPopulationGroup

public ShapeAgentPopulationGroup(Agent presentable,
 ShapeDrawMode drawMode,
 boolean ispublic,
 AgentList<?> population)

Method Details

updateDynamicPropertiesStructural

@AnyLogicInternalAPI
public boolean updateDynamicPropertiesStructural(boolean publicOnly)
Overrides:
updateDynamicPropertiesStructural in class ShapeGroup
Returns:
true if:
1. update was done (usually for visible elements, respecting public flag etc.)
AND
2. further update of structural changes is applicable

createShapes

public void createShapes()
Creates missing and removes redundant shapes so that current number of shapes in this replicated shape equals value returned by #getReplication()

createShapeWithStaticProperties_xjal

@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

setShapeDynamicProperties_xjal

@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 shape
index - the shape index

size

public int size()
Returns the number of shapes in the group.
Overrides:
size in class ShapeGroup
Returns:
the number of shapes in the group

get

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

getAgents_xjal

@AnyLogicInternalAPI
public Collection<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

resetSVGState

@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.
Specified by:
resetSVGState in interface SVGElement
Overrides:
resetSVGState in class ShapeGroup

findSVGElement

@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.
Specified by:
findSVGElement in interface SVGElement
Overrides:
findSVGElement in class ShapeGroup

clear

@Deprecated
public void clear()
Deprecated.
Description copied from class: ShapeGroup
Removes all shapes from the group.
Overrides:
clear in class ShapeGroup

initialize_xjal

@Deprecated
public void initialize_xjal(Object... contents)
Deprecated.

get

@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 class ShapeGroup
Parameters:
i - the index of the shape
Returns:
the shape with the given index

indexOf

@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 -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 class ShapeGroup
Parameters:
shape - the shape to find index of
Returns:
the index of the shape or -1

add

@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 class ShapeGroup
Parameters:
shape - the shape to add

add

@Deprecated
public void add(int shape)
Deprecated.
This function is deprecated and will be removed in the next release

add

@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 class ShapeGroup
Parameters:
rshape - the replicated shape to add

insert

@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 class ShapeGroup
Parameters:
index - index at which the specified shape is to be inserted (from 0 to size(), inclusive)
shape - the shape to add

insert

@Deprecated
public void insert(int index,
 int shape)
Deprecated.
This function is deprecated and will be removed in the next release

insert

@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 class ShapeGroup
Parameters:
index - index at which the specified shape is to be inserted (from 0 to size(), inclusive)
rshape - the replicated shape to add

remove

@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 class ShapeGroup
Parameters:
shape - the shape to remove
Returns:
true if the group contained the shape, false otherwise

remove

@Deprecated
public boolean remove(int shape)
Deprecated.
This function is deprecated and will be removed in the next release

remove

@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 class ShapeGroup
Parameters:
rshape - the replicated shape to remove
Returns:
true if the group contained the shape, false otherwise

add

@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 class ShapeGroup
Parameters:
light - the light to add

remove

@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 class ShapeGroup
Parameters:
light - the light to remove
Returns:
true if the group contained the light, false otherwise

add

@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 class ShapeGroup
Parameters:
camera - the camera to add

remove

@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 class ShapeGroup
Parameters:
camera - the camera to remove
Returns:
true if the group contained the camera, false otherwise