Package com.anylogic.engine.presentation
- java.lang.Object
- com.anylogic.engine.presentation.Shape
- com.anylogic.engine.presentation.ShapeEmbeddedObjectIcon
- All Implemented Interfaces:
com.anylogic.engine.internal.Child
,Locatable2D
,AggregatableAnimationElement
,HasLevel
,LevelElement
,SVGElement
,UsdElement
,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
Constructor | Description |
---|---|
ShapeEmbeddedObjectIcon |
Constructs an embedded object presentation with specific attributes
|
ShapeEmbeddedObjectIcon |
Constructs an embedded object presentation with specific attributes
|
Modifier and Type | Method | Description |
---|---|---|
final Shape | clone() |
This method is not supported and throws exception:
Embedded object icon cannot be cloned |
boolean | contains |
Test if the shape contains the point with the given coordinates
(relative to this shape's container, i.e.
|
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. |
SVGElement | findSVGElement |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
Agent | getEmbeddedObject() |
Returns the embedded object drawn by this shape
|
AgentList<?> | getPopulation() | |
Agent | getPresentable() |
Returns the presentable (
Agent ) where this shape belongs to. |
void | resetSVGState() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
void | restoreOwner |
Deprecated.
|
boolean | updateDynamicPropertiesStructural | |
SVGElement | updateSVGProperties |
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. |
canHandleClick, executeUserAction, getDrawMode, getGroup, getLevel, getName, getOrGenerateUSDId, getRotation, getScaleX, getScaleY, getSVGId, getUsdVersion, getX, getY, isJava2DSwingPresentation, isPublic_xjal, isSVGPresentation, isVisible, isVisibleCurrently, onAggregatorVisibilityChanged, onClick, postSVGShapeSpecificAttributes, randomPointInside, randomPointInside, removeSVGFromOwner, removeSVGImage, setChangedUsdVersion, setLevel, setNextChangedUsdVersion, setPos, setPos, setPublic_xjal, setRotation, setScale, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties
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 shapeispublic
- iftrue
, the shape is visible on container's presentationx
- the x coordinate of embedded presentationy
- the y coordinate of embedded presentationembeddedObject
- the embedded object
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 shapeispublic
- iftrue
, the shape is visible on container's presentationx
- the x coordinate of embedded presentationy
- the y coordinate of embedded presentationembeddedObject
- the embedded object
public Agent getPresentable()
Returns the presentable (
Agent
) where this shape belongs to.- Overrides:
getPresentable
in classShape
- Returns:
- the presentable where this shape belongs to
public AgentList<?> getPopulation()
public Agent getEmbeddedObject()
Returns the embedded object drawn by this shape
- Returns:
- the embedded object drawn by this shape
@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.
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.
@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
This method restores owner of this object
The method is used in snapshot saving/loading
- Specified by:
restoreOwner
in interfacecom.anylogic.engine.internal.Child
- Overrides:
restoreOwner
in classShape
- Parameters:
owner
- owner of this object, usuallyAgent
,Experiment
orShapeGroup
@AnyLogicInternalAPI public boolean updateDynamicPropertiesStructural(boolean publicOnly)
- Overrides:
updateDynamicPropertiesStructural
in classShape
- 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 boolean contains(double px, double py)
Description copied from class:
Shape
public final Shape clone()
This method is not supported and throws exception:
Embedded object icon cannot be cloned
Embedded object icon cannot be cloned
@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.
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 interfaceSVGElement
- Overrides:
updateSVGProperties
in classShape
- Parameters:
output
- the list of commands to add todrawMode
- TODOpublicOnly
- drawing context: if true, only shapes that are marked as public only are updatedowner
- the SVG element that serves as a container for this elementelbehind
- 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 givenowner
when the svg element is added to a different place (e.g. GIS map).
@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 classShape
@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 classShape