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

public abstract class GISMarkupElement
extends AbstractMarkup
implements INetworkMarkupElement, java.io.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

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
abstract com.bbn.openmap.omGraphics.OMGraphic createOMGraphicObject()  
void discardOwner()  
java.lang.RuntimeException error​(java.lang.String errorText)  
static GISMarkupElement getFromOMGraphic​(com.bbn.openmap.omGraphics.OMGraphic omGraphic)  
java.awt.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)
LineStyle getLineStyle()
Returns the line style of the markup element: {LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED}
Texture getLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
double getLineWidth()
Returns the line width of the markup element.
INetwork<GISNode,​GISRoute> getNetwork()  
com.bbn.openmap.omGraphics.OMGraphic getOmGraphic​(boolean createIfNull)
Deprecated.
Agent getSpace()
Returns the agent where the markup element is defined
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.
void onAggregatorVisibilityChanged()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
void remove()
Removes the markup element from the presentation, if it is not a part of the presentation, does nothing.
void setLineColor​(java.awt.Paint lineColor)
Sets the line color (or Texture) of the markup element.
void setLineStyle​(LineStyle lineStyle)
Sets the line style of the markup element: {LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED}
void setLineWidth​(double width)
Sets the line width of the markup element, 0 means thinnest possible
void setOwner​(ShapeGISMap map)
Sets GIS map this element belongs to.
void setVisible​(boolean v)
Sets the visibility of the markup element.
Modifier and Type Method Description

Methods inherited from class com.anylogic.engine.markup.AbstractMarkup

executeUserAction, findSVGElement, getDrawMode, getName, getSVGId, initializeInternal, isPublic, isVisible, onAggregatorInitialized, removeSVGFromOwner, resetSVGState, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties

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 Detail

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 java.lang.RuntimeException error​(java.lang.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​(java.awt.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 java.awt.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)
How can we improve this article?