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

@AnyLogicInternalAPI
public class ElevatorShaft
extends Shape3D
implements HasBoundingRectangle
See Also:
Serialized Form

Field Summary

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

UNKNOWN_NAME

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

ID_NOT_SET

Constructor Summary

ConstructorDescription
ElevatorShaft(Elevator<?> elevator, Level level) 

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.
SVGElementfindSVGElement(long svgId)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
BoundingRectanglegetBoundingRectangle() 
Elevator<?>getElevator() 
ShapeInspectgetInspect() 
booleanisFrontDoorOpen() 
booleanisRearDoorOpen() 
booleanonClick(double clickx, double clicky)
Should be overridden to define the shape reaction on mouse click.
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)
voidsetFrontDoorOpen(boolean frontDoorOpen) 
voidsetLineColor(Paint lineColor) 
voidsetPlatformColor(Paint platformColor) 
voidsetRearDoorOpen(boolean rearDoorOpen) 
voidsetZHeight(double zHeight) 
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 com.anylogic.engine.presentation.Shape3D

canHandleClick, getDrawMode, getScaleZ, getZ, getZOffset, setDrawMode, setPos, setPos, setPos, setRotation, 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.Locatable2D

getX, getY

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

getSVGComponent

Constructor Details

ElevatorShaft

public ElevatorShaft(Elevator<?> elevator,
 Level level)

Method Details

setZHeight

public void setZHeight(double zHeight)

setLineColor

public void setLineColor(Paint lineColor)

setPlatformColor

public void setPlatformColor(Paint platformColor)

setFrontDoorOpen

public void setFrontDoorOpen(boolean frontDoorOpen)

setRearDoorOpen

public void setRearDoorOpen(boolean rearDoorOpen)

isFrontDoorOpen

public boolean isFrontDoorOpen()

isRearDoorOpen

public boolean isRearDoorOpen()

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

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

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)

getInspect

public ShapeInspect getInspect()
Overrides:
getInspect in class Shape

findSVGElement

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

getBoundingRectangle

@AnyLogicInternalAPI
public BoundingRectangle getBoundingRectangle()
Specified by:
getBoundingRectangle in interface HasBoundingRectangle

getElevator

public Elevator<?> getElevator()

onClick

@AnyLogicInternalCodegenAPI
public boolean onClick(double clickx,
 double clicky)
Description copied from class: Shape
Should be overridden to define the shape reaction on mouse click. The click coordinates are definitely within the shape bounds if this method is called. By default, does nothing and returns false.
Overrides:
onClick in class Shape
Parameters:
clickx - the x coordinate of the click relative to the shape
clicky - the y coordinate of the click relative to the shape
Returns:
return true to indicate that this shape is a part of agent's icon and define user's interaction with icon in model runtime. Single click will display agent's inspect window, while double click will open the agent's presentation in the model window.