Package com.anylogic.engine.presentation
- java.lang.Object
- com.anylogic.engine.presentation.Shape
- com.anylogic.engine.presentation.ShapeInspect
- 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
| Modifier and Type | Class | Description |
|---|---|---|
static final record | ShapeInspect.FakeInspectedShape |
| Modifier and Type | Method | Description |
|---|---|---|
boolean | contains |
Test if the shape contains the point with the given coordinates
(relative to this shape's container, i.e.
|
void | executeUserAction |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
ShapeGroup | getGroup() |
Returns the group containing this shape.
|
Object | getInspectedShape() | |
Presentable | getPresentable() |
Returns the Presentable object (
Agent or Experiment) where
this shape belongs to, or null. |
boolean | isVisibleCurrently() |
Takes into account visibility of the
Level |
void | resetSVGState |
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)
|
void | setSize | |
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, clone, findSVGElement, getDrawMode, getGroupOrOwner, getInspect, getLevel, getName, getOrGenerateUSDId, getRotation, getScaleX, getScaleY, getSVGId, getUsdVersion, getX, getY, isJava2DSwingPresentation, isOnly3D, isPublic_xjal, isSVGPresentation, isVisible, onAggregatorVisibilityChanged, onClick, postSVGShapeSpecificAttributes, randomPointInside, randomPointInside, removeSVGFromOwner, removeSVGImage, restoreOwner, setChangedUsdVersion, setInspect, setLevel, setNextChangedUsdVersion, setPos, setPos, setPublic_xjal, setRotation, setScale, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties, updateDynamicPropertiesStructural@AnyLogicInternalAPI public void executeUserAction(String value)
Description copied from interface:
SVGElementThis 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:
executeUserActionin interfaceSVGElement- Overrides:
executeUserActionin classShape
public boolean contains(double px, double py)
Description copied from class:
Shapepublic ShapeGroup getGroup()
Description copied from class:
ShapeReturns the group containing this shape.
public Presentable getPresentable()
Description copied from class:
ShapeReturns the Presentable object (
Agent or Experiment) where
this shape belongs to, or null.- Specified by:
getPresentablein interfaceSVGElement- Overrides:
getPresentablein classShape- Returns:
- the Presentable that owns this shape, or null
@AnyLogicInternalCodegenAPI public boolean isVisibleCurrently()
Description copied from class:
ShapeTakes into account visibility of the
Level- Overrides:
isVisibleCurrentlyin classShape
public SVGElement updateSVGProperties(List<SVGCommand> output, ShapeDrawMode drawMode, boolean publicOnly, SVGElement owner, SVGElement elbehind, boolean isInReplicatedShape)
Description copied from interface:
SVGElementThis 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:
updateSVGPropertiesin interfaceSVGElement- Overrides:
updateSVGPropertiesin 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
nullif 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 givenownerwhen the svg element is added to a different place (e.g. GIS map).
@AnyLogicInternalAPI public void resetSVGState(SVGElement elementBeingDeleted, boolean delete, Consumer<SVGCommand> commandOutput)
Description copied from class:
ShapeReset 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:
resetSVGStatein interfaceSVGElement- Overrides:
resetSVGStatein classShape- Parameters:
elementBeingDeleted- top-level element that is being deleteddelete- flag if method was called during shape deletion (delete "D" commands can be generated)
public void setSize(double width, double height)
public Object getInspectedShape()