Position on Track is a graphical element that is used to define the exact position on the railway track.
Name – The name of this position on track. The name is used to identify and access this element from code and flowchart blocks properties.
Ignore – If selected, the position on track is excluded from the model.
Visible on upper agent – If selected, the position on track is also visible on the upper agent where this agent lives.
Visible – Here you specify whether the shape is visible on animation at model runtime, or not. Using the control, choose yes or no.
Train type - Here you can specify the custom train type.
On train enter – Here you can type Java code that will be executed when the first car of the train reaches the position on track. You can access the train type via local variable train.
On train exit – Here you can type Java code that will be executed when the last car of the train leaves the position on track. You can access the train type via local variable train.
Function |
Description |
RailwayTrack getTrack() |
Returns the railway track this element belongs to. |
RailwayNetwork getRailYard() |
Returns the railway network this element belongs to, or null if this element is not a part of a railway network. |
double getOffset() |
Returns the offset of this element from the start point of the railway track, measured in pixels. |
double getOffset(LengthUnits units) |
Returns the offset of this element from the start point of the railway track, measured in given length units. Parameter: |
double getX() |
Returns the X-coordinate of this element. |
double getY() |
Returns the Y-coordinate of this element. |
Level getLevel() |
Returns the level where this position on track is located. |
Function |
Description |
boolean isVisible() |
Returns true if this element is visible; returns false otherwise. |
void setVisible(boolean v) |
Sets the visibility of this element. Parameter: |
Function |
Description |
Paint getColor() |
Returns the color (or texture) of this element. |
void setColor(Paint color) |
Sets the color (or texture) of this element. Parameter: |
Function |
Description |
void remove() |
Removes this element from the presentation. If the element is not a part of presentation, the function does nothing. Note, that removal from the presentation does not necessarily mean removing from the model logic, since logical networks and routes may have been created before the removal and survive it. |