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

@AnyLogicInternalAPI
public class ShapeEmbeddedObjectIcon
extends Shape
Persistent presentation of Embedded Object icon shape plus some info.
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Field Summary

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

UNKNOWN_NAME

Constructor Summary

ConstructorDescription
ShapeEmbeddedObjectIcon(Agent agent, boolean ispublic, double x, double y, Agent embeddedObject)
Constructs an embedded object presentation with specific attributes
ShapeEmbeddedObjectIcon(Agent agent, boolean ispublic, double x, double y, AgentList<?> population)
Constructs an embedded object presentation with specific attributes

Method Summary

Modifier and TypeMethodDescription
final Shapeclone()
This method is not supported and throws exception:
Embedded object icon cannot be cloned
booleancontains(double px, double py)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
voiddeactivate()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Tells the shape to forget about its current embedded object.
SVGElementfindSVGElement(long svgId)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
AgentgetEmbeddedObject()
Returns the embedded object drawn by this shape
AgentList<?>getPopulation() 
AgentgetPresentable()
Returns the presentable (Agent) where this shape belongs to.
voidresetSVGState()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
voidrestoreOwner(Object owner)
Deprecated.
booleanupdateDynamicPropertiesStructural(boolean publicOnly) 
SVGElementupdateSVGProperties(List<SVGCommand> output, ShapeDrawMode drawMode, boolean publicOnly, SVGElement owner, SVGElement elbehind)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Updates SVG properties of the element that are then sent to the rendering client.

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

Constructor Details

ShapeEmbeddedObjectIcon

public ShapeEmbeddedObjectIcon(Agent agent,
 boolean ispublic,
 double x,
 double y,
 AgentList<?> population)
Constructs an embedded object presentation with specific attributes
Parameters:
agent - the agent owning this shape
ispublic - if true, the shape is visible on container's presentation
x - the x coordinate of embedded presentation
y - the y coordinate of embedded presentation
embeddedObject - the embedded object

ShapeEmbeddedObjectIcon

public ShapeEmbeddedObjectIcon(Agent agent,
 boolean ispublic,
 double x,
 double y,
 Agent embeddedObject)
Constructs an embedded object presentation with specific attributes
Parameters:
agent - the agent owning this shape
ispublic - if true, the shape is visible on container's presentation
x - the x coordinate of embedded presentation
y - the y coordinate of embedded presentation
embeddedObject - the embedded object

Method Details

getPresentable

public Agent getPresentable()
Returns the presentable (Agent) where this shape belongs to.
Overrides:
getPresentable in class Shape
Returns:
the presentable where this shape belongs to

getPopulation

public AgentList<?> getPopulation()

getEmbeddedObject

public Agent getEmbeddedObject()
Returns the embedded object drawn by this shape
Returns:
the embedded object drawn by this shape

deactivate

@AnyLogicInternalAPI
public void deactivate()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Tells the shape to forget about its current embedded object. The shape itself continues to render (being empty) and may reactivate with new embedded object later.

restoreOwner

@AnyLogicInternalCodegenAPI
@Deprecated
public void restoreOwner(Object owner)
Deprecated.
Description copied from class: Shape
This method normally should not be called by user
This method restores owner of this object
The method is used in snapshot saving/loading
Specified by:
restoreOwner in interface com.anylogic.engine.internal.Child
Overrides:
restoreOwner in class Shape
Parameters:
owner - owner of this object, usually Agent, Experiment or ShapeGroup

updateDynamicPropertiesStructural

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

contains

public boolean contains(double px,
 double py)
Description copied from class: Shape
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e. in the same system with the coordinates of this shape, x and y)
Specified by:
contains in class Shape
Parameters:
px - the x coordinate relative to this shape's container
py - the y coordinate relative to this shape's container
Returns:
true if the shape contains the point with the given coordinates

clone

public final Shape clone()
This method is not supported and throws exception:
Embedded object icon cannot be cloned
Overrides:
clone in class Shape

updateSVGProperties

@AnyLogicInternalAPI
public SVGElement updateSVGProperties(List<SVGCommand> output,
 ShapeDrawMode drawMode,
 boolean publicOnly,
 SVGElement owner,
 SVGElement elbehind)
Description copied from interface: SVGElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Updates SVG properties of the element that are then sent to the rendering client. If the element is not yet in the SVG scene, generates "C" command, if it is there, but some properties are out of date, generates "U" command. If SVG drawing of this element is not needed because of public only settings, or permanently not needed, or not supported yet, returns false and does nothing.
Specified by:
updateSVGProperties in interface SVGElement
Overrides:
updateSVGProperties in class Shape
Parameters:
output - the list of commands to add to
drawMode - TODO
publicOnly - drawing context: if true, only shapes that are marked as public only are updated
owner - the SVG element that serves as a container for this element
elbehind - the SVG element behind this one, or null if none or if order is irrelevant
Returns:
the actual owner this element has been added to or null if element is not drawn (e.g. drawing of this element is not needed because of public only settings, permanently not needed or not supported - hence SVG id is not set). The actual owner may differ from the given owner when the svg element is added to a different place (e.g. GIS map).

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 Shape

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 Shape