AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, INetworkMarkupElement, SVGElement, Serializable
Direct Known Subclasses:
GISNode, GISRoute

public abstract class GISMarkupElement
extends AbstractMarkup
implements INetworkMarkupElement, Serializable
Basic GIS markup element could be a part of GISNetwork. GIS map is able to draw GIS markup element in geographic coordinate system (latitude, longitude).
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Method Summary

Modifier and TypeMethodDescription
abstract com.bbn.openmap.omGraphics.OMGraphiccreateOMGraphicObject() 
voiddiscardOwner() 
RuntimeExceptionerror(String errorText) 
static GISMarkupElementgetFromOMGraphic(com.bbn.openmap.omGraphics.OMGraphic omGraphic) 
ColorgetLineColor()
Returns the line color of the markup element, or null if markup element has no line color or has textured line (in this case getLineTexture() should be used instead)
LineStylegetLineStyle()
Returns the line style of the markup element: {LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED}
TexturegetLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
doublegetLineWidth()
Returns the line width of the markup element.
INetwork<GISNode,GISRoute>getNetwork() 
com.bbn.openmap.omGraphics.OMGraphicgetOmGraphic(boolean createIfNull)
Deprecated.
AgentgetSpace()
Returns the agent where the markup element is defined
voidinitialize()
Prepares the object after setting parameters/adding segments.
This function should be called after setup of markup element initially created using constructor without arguments.
voidonAggregatorVisibilityChanged()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
voidremove()
Removes the markup element from the presentation, if it is not a part of the presentation, does nothing.
voidsetLineColor(Paint lineColor)
Sets the line color (or Texture) of the markup element.
voidsetLineStyle(LineStyle lineStyle)
Sets the line style of the markup element: {LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED}
voidsetLineWidth(double width)
Sets the line width of the markup element, 0 means thinnest possible
voidsetOwner(ShapeGISMap map)
Sets GIS map this element belongs to.
voidsetVisible(boolean v)
Sets the visibility of the markup element.

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

postInitialize

Methods inherited from interface com.anylogic.engine.markup.INetworkMarkupElement

contains, getNearestPoint, randomPointInside, randomPointInside, randomPointInside, randomPointInside

Method Details

getNetwork

public INetwork<GISNode,GISRoute> getNetwork()
Specified by:
getNetwork in interface INetworkMarkupElement
Returns:
network this markup element belongs to or null if this element isn't a part of a network

error

public RuntimeException error(String errorText)
Specified by:
error in class AbstractMarkup

discardOwner

@AnyLogicInternalAPI
public void discardOwner()
Overrides:
discardOwner in class AbstractMarkup

setOwner

public void setOwner(ShapeGISMap map)
Sets GIS map this element belongs to.
Parameters:
map - the GIS map object

initialize

public void initialize()
Prepares the object after setting parameters/adding segments.
This function should be called after setup of markup element initially created using constructor without arguments.

setVisible

public void setVisible(boolean v)
Description copied from class: AbstractMarkup
Sets the visibility of the markup element.
Overrides:
setVisible in class AbstractMarkup
Parameters:
v - visibility: true - visible, false - not

onAggregatorVisibilityChanged

@AnyLogicInternalAPI
public void onAggregatorVisibilityChanged()
Description copied from interface: AggregatableAnimationElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Specified by:
onAggregatorVisibilityChanged in interface AggregatableAnimationElement
Overrides:
onAggregatorVisibilityChanged in class AbstractMarkup

getSpace

public Agent getSpace()
Description copied from class: AbstractMarkup
Returns the agent where the markup element is defined
Specified by:
getSpace in interface INetworkMarkupElement
Specified by:
getSpace in class AbstractMarkup
Returns:
the agent associated with this element

remove

public void remove()
Description copied from class: AbstractMarkup
Removes the markup element from the presentation, if it is not a part of the presentation, does nothing. Please note that removal from presentation does not necessarily mean removing from the model logic as logical networks and routes may have been created before the removal and survive it.
Specified by:
remove in class AbstractMarkup

setLineColor

public void setLineColor(Paint lineColor)
Sets the line color (or Texture) of the markup element.
Parameters:
lineColor - the new line color, null = do not draw the markup element line

getLineColor

public Color getLineColor()
Returns the line color of the markup element, or null if markup element has no line color or has textured line (in this case getLineTexture() should be used instead)
Returns:
the line color of the markup element

getLineTexture

public Texture getLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
Returns:
the line texture of the markup element

getLineWidth

public double getLineWidth()
Returns the line width of the markup element.
Returns:
the line width of the markup element

setLineWidth

public void setLineWidth(double width)
Sets the line width of the markup element, 0 means thinnest possible
Parameters:
width - the new line width of the markup element

setLineStyle

public void setLineStyle(LineStyle lineStyle)
Sets the line style of the markup element: {LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED}
Parameters:
lineStyle - the new style of the markup element

getLineStyle

public LineStyle getLineStyle()
Returns the line style of the markup element: {LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED}
Returns:
the line style of the markup element

getOmGraphic

@Deprecated
@AnyLogicInternalAPI
public com.bbn.openmap.omGraphics.OMGraphic getOmGraphic(boolean createIfNull)
Deprecated.

createOMGraphicObject

@AnyLogicInternalAPI
public abstract com.bbn.openmap.omGraphics.OMGraphic createOMGraphicObject()

getFromOMGraphic

@AnyLogicInternalAPI
public static GISMarkupElement getFromOMGraphic(com.bbn.openmap.omGraphics.OMGraphic omGraphic)