Class LayoutConnectivity


  • public class LayoutConnectivity
    extends java.lang.Object
    A LayoutConnectivity object represents a junction between two LayoutBlocks on a LayoutEditor panel.

    LayoutConnectivity objects do not persist (are not saved when panels are saved). Instead they are initialized when a panel is loaded and changed dynamically as a panel is edited.

    The direction stored here is the direction for proceeding across the block boundary from block1 to block2. The directions represent directions on the LayoutEditor panel. Allowed values (using Path object definitions) are: Path.NORTH (up on panel) Path.SOUTH (down on panel) Path.EAST (right on panel) Path.WEST (left on panel) and points in between: Path.NORTH + Path.EAST Path.NORTH_WEST, Path.SOUTH_EAST Path.SOUTH + Path.WEST

    The connected object in the first block is usually a track segment. This track segment is connected to an object in the second block. The connection point in the second block can be either one end of a track segment, or one of the connection points on a turnout, or one of the connection points on a level crossing. The allowed values for the connection points at the second block are defined in LayoutEditor.

    The exception to the above is when a crossover turnout has multiple blocks. If so, at least one block boundary is internal to the crossover turnout. Such cases are handled differently, as "crossover block boundary types", see definition of the type codes below. The first letter in the boundary type corresponds to the first block, and the second letter corresponds to the second block. All four block boundaries are possible for the double crossover. One of the crossed over boundaries is not possible with each single crossover.

    Note that each LayoutEditor panel has its own list of LayoutConnectivity objects, nominally called its "block connectivity". In contrast, there is only one set of LayoutBlocks, Blocks, and Paths, which are used by all LayoutEditor panels.