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

public class ShapeInspect
extends Shape
See Also:
Serialized Form

Nested Class Summary

Modifier and TypeClassDescription
static final record ShapeInspect.FakeInspectedShape 

Field Summary

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

UNKNOWN_NAME

Fields inherited from interface com.anylogic.engine.presentation.UsdElement

ID_NOT_SET

Method Summary

Modifier and TypeMethodDescription
booleancontains(double px, double py)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
voidexecuteUserAction(String value)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
ShapeGroupgetGroup()
Returns the group containing this shape.
ObjectgetInspectedShape() 
PresentablegetPresentable()
Returns the Presentable object (Agent or Experiment) where this shape belongs to, or null.
booleanisVisibleCurrently()
Takes into account visibility of the Level
voidresetSVGState(SVGElement elementBeingDeleted, boolean delete, Consumer<SVGCommand> commandOutput)
Reset SVG state goes through the entire shape hierarchy and delete (generate "D" command) child shapes if needed (for example we need to delete Shape3DObjects for instanced objects explicitly in case of deletion group or other hierarchy parent) resetSVGState for children must be called before parent (to generate delete "D" command for children first)
voidsetSize(double width, double height) 
SVGElementupdateSVGProperties(List<SVGCommand> output, ShapeDrawMode drawMode, boolean publicOnly, SVGElement owner, SVGElement elbehind, boolean isInReplicatedShape)
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

Methods inherited from interface com.anylogic.engine.presentation.SVGElement

getSVGComponent

Method Details

executeUserAction

@AnyLogicInternalAPI
public void executeUserAction(String value)
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:
executeUserAction in interface SVGElement
Overrides:
executeUserAction in class Shape

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

getGroup

public ShapeGroup getGroup()
Description copied from class: Shape
Returns the group containing this shape.
Overrides:
getGroup in class Shape
Returns:
the group containing this shape

getPresentable

public Presentable getPresentable()
Description copied from class: Shape
Returns the Presentable object (Agent or Experiment) where this shape belongs to, or null.
Specified by:
getPresentable in interface SVGElement
Overrides:
getPresentable in class Shape
Returns:
the Presentable that owns this shape, or null

isVisibleCurrently

@AnyLogicInternalCodegenAPI
public boolean isVisibleCurrently()
Description copied from class: Shape
Takes into account visibility of the Level
Overrides:
isVisibleCurrently in class Shape

updateSVGProperties

public SVGElement updateSVGProperties(List<SVGCommand> output,
 ShapeDrawMode drawMode,
 boolean publicOnly,
 SVGElement owner,
 SVGElement elbehind,
 boolean isInReplicatedShape)
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(SVGElement elementBeingDeleted,
 boolean delete,
 Consumer<SVGCommand> commandOutput)
Description copied from class: Shape
Reset SVG state goes through the entire shape hierarchy and delete (generate "D" command) child shapes if needed (for example we need to delete Shape3DObjects for instanced objects explicitly in case of deletion group or other hierarchy parent) resetSVGState for children must be called before parent (to generate delete "D" command for children first)
Specified by:
resetSVGState in interface SVGElement
Overrides:
resetSVGState in class Shape
Parameters:
elementBeingDeleted - top-level element that is being deleted
delete - flag if method was called during shape deletion (delete "D" commands can be generated)

setSize

public void setSize(double width,
 double height)

getInspectedShape

public Object getInspectedShape()