|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
jmri.jmrit.display.layoutEditor.LayoutBlock
public class LayoutBlock
A LayoutBlock is a group of track segments and turnouts on a LayoutEditor panel corresponding to a 'block'. LayoutBlock is a LayoutEditor specific extension of the JMRI Block object.
LayoutBlocks may have an occupancy Sensor. The getOccupancy method returns the occupancy state of the LayoutBlock - OCCUPIED, EMPTY, or UNKNOWN. If no occupancy sensor is provided, UNKNOWN is returned. The occupancy sensor if there is one, is the same as the occupancy sensor of the corresponding JMRI Block.
The name of each Layout Block is the same as that of the corresponding block as defined in Layout Editor . A corresponding JMRI Block object is created when a LayoutBlock is created. The JMRI Block uses the name of the block defined in Layout Editor as its user name and a unique IBnnn system name. The JMRI Block object and its associated Path objects are useful in tracking a train around the layout. Blocks may be viewed in the Block Table.
A LayoutBlock may have an associated Memory object. This Memory object contains a string representing the current "value" of the corresponding JMRI Block object. If the value contains a train name, for example, displaying Memory objects associated with LayoutBlocks, and displayed near each Layout Block can follow a train around the layout, displaying its name when it is in the . LayoutBlock.
LayoutBlocks are "cross-panel", similar to sensors and turnouts. A LayoutBlock may be used by more than one Layout Editor panel simultaneously. As a consequence, LayoutBlocks are saved with the configuration, not with a panel.
LayoutBlocks are used by TrackSegments, LevelXings, and LayoutTurnouts. LevelXings carry two LayoutBlock designations, which may be the same. LayoutTurnouts carry LayoutBlock designations also, one per turnout, except for double crossovers which can have up to four.
LayoutBlocks carry a use count. The use count counts the number of track segments, layout turnouts, and levelcrossings which use the LayoutBlock. Only LayoutBlocks which have a use count greater than zero are saved when the configuration is saved.
| Field Summary | |
|---|---|
(package private) ArrayList<Integer> |
actedUponUpdates
|
(package private) boolean |
active
|
(package private) ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.ThroughPaths> |
activePaths
|
(package private) static int |
ADDITION
|
(package private) JComboBox |
attachedBlocks
|
(package private) LayoutEditorAuxTools |
auxTool
|
(package private) JButton |
blockEditCancel
|
(package private) JButton |
blockEditDone
|
Color |
blockExtraColor
|
String |
blockName
|
Color |
blockOccupiedColor
|
(package private) JComboBox |
blockSpeedBox
|
Color |
blockTrackColor
|
(package private) JLabel |
blockUseLabel
|
(package private) Component |
callingPane
|
(package private) Color[] |
colorCode
|
(package private) String[] |
colorText
Methods and data to support initialization of color Combo box |
(package private) ConnectivityUtil |
connection
|
(package private) boolean |
defaultMetric
|
(package private) JmriJFrame |
editLayoutBlockFrame
|
(package private) boolean |
editOpen
|
static int |
EMPTY
|
boolean |
enableAddRouteLogging
|
boolean |
enableDeleteRouteLogging
|
boolean |
enableSearchRouteLogging
|
boolean |
enableUpdateRouteLogging
|
(package private) JComboBox |
extraColorBox
|
(package private) boolean |
layoutConnectivity
|
String |
lbSystemName
|
protected Vector<PropertyChangeListener> |
listeners
|
(package private) static org.slf4j.Logger |
log
|
String |
memoryName
|
(package private) JTextField |
memoryNameField
|
(package private) int |
metric
|
(package private) JTextField |
metricField
|
(package private) ArrayList<JComboBox> |
neighbourDir
|
(package private) ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Adjacencies> |
neighbours
|
(package private) static int |
NONE
|
(package private) int |
numColors
|
String |
occupancySensorName
|
static int |
OCCUPIED
|
(package private) JComboBox |
occupiedColorBox
|
int |
occupiedSense
|
(package private) PropertyChangeSupport |
pcs
|
(package private) JCheckBox |
permissiveCheck
|
(package private) ResourceBundle |
rb
|
(package private) static int |
REMOVAL
|
static int |
RESERVED
|
(package private) ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Routes> |
routes
|
(package private) static int |
RXONLY
|
(package private) static int |
RXTX
|
(package private) int |
senseActiveIndex
|
(package private) JComboBox |
senseBox
|
(package private) int |
senseInactiveIndex
|
(package private) JTextField |
sensorDebounceActiveField
|
(package private) JCheckBox |
sensorDebounceGlobalCheck
|
(package private) JTextField |
sensorDebounceInactiveField
|
(package private) JTextField |
sensorNameField
|
(package private) ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.ThroughPaths> |
throughPaths
|
(package private) static long |
time
|
(package private) JComboBox |
trackColorBox
|
(package private) static int |
TXONLY
|
static int |
UNKNOWN
|
(package private) static int |
UPDATE
|
(package private) static ArrayList<Integer> |
updateReferences
|
(package private) String[] |
working
|
| Fields inherited from class jmri.implementation.AbstractNamedBean |
|---|
mSystemName, mUserName |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT |
| Constructor Summary | |
|---|---|
LayoutBlock(String sName,
String uName)
|
|
| Method Summary | |
|---|---|
(package private) void |
addAdjacency(Path addPath)
|
void |
addAllThroughPaths()
|
void |
addLayoutEditor(LayoutEditor panel)
Keeps track of LayoutEditor panels that are using this LayoutBlock |
(package private) void |
addNeighbour(Block addBlock,
int direction,
int workingDirection)
|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
(package private) void |
addRouteFromNeighbour(LayoutBlock src,
jmri.jmrit.display.layoutEditor.LayoutBlock.RoutingPacket update)
|
(package private) void |
addRouteToNeighbours(jmri.jmrit.display.layoutEditor.LayoutBlock.Routes ro)
|
(package private) void |
addThroughPath(Block srcBlock,
Block dstBlock)
|
(package private) void |
addThroughPath(Block srcBlock,
Block dstBlock,
LayoutEditor panel)
This is used to add a through path on this layout block, going from the source block to the destination block, using a specific panel. |
(package private) void |
addThroughPath(jmri.jmrit.display.layoutEditor.LayoutBlock.Adjacencies adj)
|
(package private) void |
blockEditCancelPressed(ActionEvent a)
|
(package private) void |
blockEditDonePressed(ActionEvent a)
|
(package private) boolean |
checkIsRouteOnValidThroughPath(jmri.jmrit.display.layoutEditor.LayoutBlock.Routes r)
|
static String |
colorToString(Color color)
Utility methods for converting between string and color Note: These names are only used internally, so don't need a resource bundle |
(package private) String |
decodePacketFlow(int value)
|
void |
decrementUse()
|
void |
deleteLayoutEditor(LayoutEditor panel)
|
(package private) int |
determineAdjPacketFlow(int our,
int neigh)
|
void |
disableDeleteRouteLog()
|
protected void |
editLayoutBlock(Component callingPane)
Edit a Layout Block |
void |
enableDeleteRouteLog()
|
protected void |
firePropertyChange(String p,
Object old,
Object n)
|
ArrayList<Block> |
getActiveNextBlocks(Block source)
|
(package private) jmri.jmrit.display.layoutEditor.LayoutBlock.Adjacencies |
getAdjacency(Block blk)
|
(package private) int |
getAdjacencyPacketFlow(Block blk)
|
(package private) jmri.jmrit.display.layoutEditor.LayoutBlock.Routes |
getBestRouteByHop(Block dest)
|
(package private) jmri.jmrit.display.layoutEditor.LayoutBlock.Routes |
getBestRouteByLength(Block dest)
|
(package private) jmri.jmrit.display.layoutEditor.LayoutBlock.Routes |
getBestRouteByMetric(Block dest)
|
Block |
getBlock()
Get the jmri.Block corresponding to this LayoutBlock |
Color |
getBlockColor()
Returns the color for drawing items in this block. |
Color |
getBlockExtraColor()
|
int |
getBlockHopCount(Block destination,
Block nextBlock)
Returns the number of layout blocks to our desintation block going from the next directly connected block. |
float |
getBlockLength(Block destination,
Block nextBlock)
Returns the distance to our desintation block going from the next directly connected block. |
int |
getBlockMetric()
Returns the layout block metric cost |
int |
getBlockMetric(Block destination,
Block nextBlock)
Returns the metric to our desintation block going from the next directly connected block. |
Color |
getBlockOccupiedColor()
|
(package private) int |
getBlockStatus()
|
Color |
getBlockTrackColor()
|
int |
getConnectedBlockRouteIndex(Block destBlock,
int direction)
|
(package private) ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Routes> |
getDestRoutes(Block dstBlock)
Returns a list of valid Routes to our destination block |
String |
getID()
Accessor methods |
LayoutEditor |
getMaxConnectedPanel()
Get the Layout Editor panel with the highest connectivity to this Layout Block |
Memory |
getMemory()
Returns Memory |
String |
getMemoryName()
Returns Memory name |
Block |
getNeighbourAtIndex(int i)
Get the neighbouring block at index i |
int |
getNeighbourDirection(Block neighbourBlock)
|
int |
getNeighbourDirection(int i)
Get the direction of travel to neighbouring block at index i |
int |
getNeighbourDirection(LayoutBlock neigh)
Gets the direction of travel to our neighbouring block. |
(package private) int |
getNeighbourIndex(jmri.jmrit.display.layoutEditor.LayoutBlock.Adjacencies adj)
|
int |
getNeighbourMetric(int i)
Get the metric/cost to neighbouring block at index i |
String |
getNeighbourPacketFlowAsString(int i)
Get the flow of traffic to and from neighbouring block at index i RXTX - Means Traffic can flow both ways between the blocks RXONLY - Means we can only recieve traffic from our neighbour, we can not send traffic to it TXONLY - Means we do not recieve traffic from our neighbour, but can send traffic to it. |
int |
getNextBestBlock(Block previousBlock,
Block destBlock,
List<Integer> excludeBlock,
int routingMethod)
last index - the index of the last block we returned ie we last returned index 10, so we don't want to return it again. |
Block |
getNextBlock(Block previousBlock,
Block destBlock)
Used if we already know the block prior to our block, and the destination block. |
Block |
getNextBlock(Block destBlock,
int direction)
|
int |
getNextBlockByIndex(Block previousBlock,
Block destBlock,
int offSet)
|
int |
getNextBlockByIndex(Block destBlock,
int direction,
int offSet)
|
(package private) Integer |
getNextPacketID()
|
(package private) ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Routes> |
getNextRoutes(Block nxtBlock)
Returns a list of valid Routes via our next block |
int |
getNumberOfNeighbours()
Get the number of neighbour blocks attached to this block |
int |
getNumberOfRoutes()
Get the number of routes that the block has registered. |
int |
getNumberOfThroughPaths()
Returns the number of valid through paths on this block. |
int |
getOccupancy()
Test block occupancy |
Sensor |
getOccupancySensor()
Returns occupancy Sensor |
String |
getOccupancySensorName()
Returns occupancy Sensor name |
int |
getOccupiedSense()
Get/Set occupied sense |
(package private) jmri.jmrit.display.layoutEditor.LayoutBlock.Routes |
getRouteByDestBlock(Block blk)
|
(package private) ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Routes> |
getRouteByNeighbour(Block blk)
|
Block |
getRouteDestBlockAtIndex(int i)
Get the destination block at route i |
int |
getRouteDirectionAtIndex(int i)
Get the direction of route i. |
int |
getRouteHopCountAtIndex(int i)
Get the hop count of route i. |
(package private) int |
getRouteIndex(jmri.jmrit.display.layoutEditor.LayoutBlock.Routes r)
|
float |
getRouteLengthAtIndex(int i)
Get the length of route i. |
int |
getRouteMetric(int i)
Get the metric/cost at route i |
Block |
getRouteNextBlockAtIndex(int i)
Get the next block at route i |
int |
getRouteState(int i)
Gets the state (Occupied, unoccupied) of the destination layout block at index i |
String |
getRouteStateAsString(int i)
Gets the state of the destination layout block at index i as a string |
boolean |
getRouteValid(int i)
Is the route to the destination potentially valid from our block. |
int |
getState()
Provide generic access to internal state. |
Block |
getThroughPathDestination(int i)
Returns the destination block at index i |
(package private) ArrayList<Block> |
getThroughPathDestinationBySource(Block source)
|
Path |
getThroughPathDestinationPathAtIndex(int i)
|
int |
getThroughPathIndex(Block sourceBlock,
Block destinationBlock)
|
Block |
getThroughPathSource(int i)
Returns the source block at index i |
(package private) ArrayList<Block> |
getThroughPathSourceByDestination(Block dest)
|
Path |
getThroughPathSourcePathAtIndex(int i)
|
int |
getUseCount()
|
boolean |
getUseExtraColor()
|
(package private) jmri.jmrit.display.layoutEditor.LayoutBlock.Routes |
getValidRoute(Block nxtBlock,
Block dstBlock)
Returns a valid Routes, based upon the next block and destination block |
(package private) void |
handleBlockChange(PropertyChangeEvent e)
Handle tasks when block changes |
void |
incrementUse()
|
(package private) boolean |
informNeighbourOfAttachment(LayoutBlock lBlock,
Block block,
int workingDirection)
|
(package private) void |
informNeighbourOfValidRoutes(Block newblock)
|
protected void |
initializeLayoutBlock()
|
protected void |
initializeLayoutBlockRouting()
|
boolean |
isActive()
"active" means that the object is still displayed, and should be stored. |
boolean |
isNeighbourMutual(int i)
Is our neighbouring block at index i a mutual neighbour, ie both blocks have each other registered as neighbours and are exchaning information. |
boolean |
isOnPanel(LayoutEditor panel)
|
boolean |
isRouteToDestValid(Block protecting,
Block destination)
Is the route to the destination block, going via our neighbouring block valid. |
Boolean |
isThroughPathActive(int i)
Is the through path at index i active |
(package private) boolean |
isValidNeighbour(Block blk)
|
(package private) void |
notifiedNeighbourNoLongerMutual(LayoutBlock srcBlock)
|
(package private) void |
notifyNeighboursOfRemoval(ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Routes> routesToRemove,
Block notifyingblk)
|
void |
printAdjacencies()
Provides an output to the console of all our neighbouring blocks |
void |
printRoutes()
Provides an output to the console of all the remote blocks reachable from our block |
void |
printRoutes(String blockName)
Provides an output to the console of how to reach a specific block from our block |
void |
printValidThroughPaths()
Provides an output to the console of all the valid paths through this block |
void |
propertyChange(PropertyChangeEvent e)
|
void |
redrawLayoutBlockPanels()
Redraws panels using this layout block |
void |
refreshValidRoutes()
|
(package private) void |
remove()
Removes this object from display and persistance |
(package private) void |
removeAdjacency(LayoutBlock layoutBlock)
|
(package private) void |
removeAdjacency(Path removedPath)
|
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a request for a call-back when a bound property changes. |
(package private) void |
removeRouteFromNeighbour(LayoutBlock src,
jmri.jmrit.display.layoutEditor.LayoutBlock.RoutingPacket update)
|
(package private) ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Routes> |
removeRouteRecievedFromNeighbour(Block removedBlock)
|
void |
setBlockExtraColor(Color color)
|
(package private) void |
setBlockMetric()
Used to set the block metric based upon the track segment that the block is associated with if the (200 if Side, 50 if Main). |
void |
setBlockMetric(int m)
Sets a metric cost against a block, this is used in the calculation of a path between two location on the layout, a lower path cost is always preferred For Layout blocks defined as Mainline the default metric is 50. |
void |
setBlockOccupiedColor(Color color)
|
void |
setBlockTrackColor(Color color)
|
void |
setMemoryName(String name)
Add Memory by name |
void |
setOccupancySensorName(String name)
Add occupancy sensor by name |
void |
setOccupiedSense(int sense)
|
(package private) void |
setRoutesValid(Block nxtHopActive,
boolean state)
|
void |
setState(int i)
Provide generic access to internal state. |
void |
setSuppressNameUpdate(boolean set)
Sets/resets update of memory name when block goes from occupied to unoccupied or vice versa. |
void |
setUseExtraColor(boolean b)
|
(package private) void |
stateUpdate()
|
static Color |
stringToColor(String string)
|
(package private) void |
updateActiveThroughPaths(jmri.jmrit.display.layoutEditor.LayoutBlock.ThroughPaths tp,
boolean active)
|
(package private) void |
updateNeighbourPacketFlow(Block neighbour,
int flow)
|
protected void |
updateNeighbourPacketFlow(jmri.jmrit.display.layoutEditor.LayoutBlock.Adjacencies neighbour,
int flow)
|
(package private) boolean |
updatePacketActedUpon(Integer packetID)
|
void |
updatePaths()
Check/Update Path objects for the attached jmri.Block If multiple panels are present, Paths are set according to the panel with the highest connectivity (most LayoutConnectivity objects); |
void |
updatePathsUsingPanel(LayoutEditor panel)
Check/Update Path objects for the attached jmri.Block using the connectivity in the specified Layout Editor panel. |
(package private) void |
updateRoutesToNeighbours(ArrayList<Block> messageRecipients,
jmri.jmrit.display.layoutEditor.LayoutBlock.Routes ro,
jmri.jmrit.display.layoutEditor.LayoutBlock.RoutingPacket update)
|
(package private) void |
updateRoutingInfo(jmri.jmrit.display.layoutEditor.LayoutBlock.Routes route)
|
(package private) void |
updateRoutingInfo(LayoutBlock src,
jmri.jmrit.display.layoutEditor.LayoutBlock.RoutingPacket update)
|
boolean |
useDefaultMetric()
|
void |
useDefaultMetric(boolean boo)
|
Memory |
validateMemory(String memName,
Component openFrame)
Validates that the memory name corresponds to an existing memory. |
Sensor |
validateSensor(String sensorName,
Component openFrame)
Validates that the supplied occupancy sensor name corresponds to an existing sensor and is unique among all blocks. |
boolean |
validThroughPath(Block sourceBlock,
Block destinationBlock)
|
| Methods inherited from class jmri.implementation.AbstractNamedBean |
|---|
addPropertyChangeListener, dispose, getComment, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyKeys, getSystemName, getUserName, removeProperty, setComment, setProperty, setUserName, updateListenerRef |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean enableAddRouteLogging
public boolean enableUpdateRouteLogging
public boolean enableDeleteRouteLogging
public boolean enableSearchRouteLogging
static ArrayList<Integer> updateReferences
ArrayList<Integer> actedUponUpdates
ResourceBundle rb
public static final int OCCUPIED
public static final int EMPTY
public static final int UNKNOWN
public String blockName
public String lbSystemName
public String occupancySensorName
public String memoryName
public int occupiedSense
public Color blockTrackColor
public Color blockOccupiedColor
public Color blockExtraColor
JmriJFrame editLayoutBlockFrame
Component callingPane
JTextField sensorNameField
JTextField sensorDebounceInactiveField
JTextField sensorDebounceActiveField
JCheckBox sensorDebounceGlobalCheck
JTextField memoryNameField
JTextField metricField
JComboBox senseBox
JCheckBox permissiveCheck
int senseActiveIndex
int senseInactiveIndex
JComboBox trackColorBox
JComboBox occupiedColorBox
JComboBox extraColorBox
JComboBox blockSpeedBox
JLabel blockUseLabel
JButton blockEditDone
JButton blockEditCancel
boolean editOpen
JComboBox attachedBlocks
String[] working
ArrayList<JComboBox> neighbourDir
String[] colorText
Color[] colorCode
int numColors
boolean active
boolean defaultMetric
static long time
LayoutEditorAuxTools auxTool
ConnectivityUtil connection
boolean layoutConnectivity
public static final int RESERVED
ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Adjacencies> neighbours
ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.ThroughPaths> throughPaths
ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Routes> routes
protected Vector<PropertyChangeListener> listeners
PropertyChangeSupport pcs
static final int ADDITION
static final int UPDATE
static final int REMOVAL
static final int RXTX
static final int RXONLY
static final int TXONLY
static final int NONE
int metric
ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.ThroughPaths> activePaths
static org.slf4j.Logger log
| Constructor Detail |
|---|
public LayoutBlock(String sName,
String uName)
| Method Detail |
|---|
public void enableDeleteRouteLog()
public void disableDeleteRouteLog()
protected void initializeLayoutBlock()
protected void initializeLayoutBlockRouting()
public String getID()
public Color getBlockTrackColor()
public void setBlockTrackColor(Color color)
public Color getBlockOccupiedColor()
public void setBlockOccupiedColor(Color color)
public Color getBlockExtraColor()
public void setBlockExtraColor(Color color)
public boolean getUseExtraColor()
public void setUseExtraColor(boolean b)
public void incrementUse()
public void decrementUse()
public int getUseCount()
public void addLayoutEditor(LayoutEditor panel)
public void deleteLayoutEditor(LayoutEditor panel)
public boolean isOnPanel(LayoutEditor panel)
public void redrawLayoutBlockPanels()
public Sensor validateSensor(String sensorName,
Component openFrame)
public Memory validateMemory(String memName,
Component openFrame)
public Color getBlockColor()
public Block getBlock()
public String getMemoryName()
public Memory getMemory()
public void setMemoryName(String name)
public String getOccupancySensorName()
public Sensor getOccupancySensor()
public void setOccupancySensorName(String name)
public int getOccupiedSense()
public void setOccupiedSense(int sense)
public int getOccupancy()
public int getState()
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. getCommandedState in Turnout) This provided to make Jython script access easier to read.
getState in interface NamedBeanpublic void setState(int i)
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. setCommandedState in Turnout) This provided to make Jython script access easier to read.
setState in interface NamedBeanpublic LayoutEditor getMaxConnectedPanel()
public void updatePaths()
If multiple panels are present, Paths are set according to the panel with the highest connectivity (most LayoutConnectivity objects);
public void updatePathsUsingPanel(LayoutEditor panel)
void handleBlockChange(PropertyChangeEvent e)
public void setSuppressNameUpdate(boolean set)
protected void editLayoutBlock(Component callingPane)
void blockEditDonePressed(ActionEvent a)
void blockEditCancelPressed(ActionEvent a)
public static String colorToString(Color color)
public static Color stringToColor(String string)
void remove()
public boolean isActive()
void setBlockMetric()
public boolean useDefaultMetric()
public void useDefaultMetric(boolean boo)
public void setBlockMetric(int m)
public int getBlockMetric()
public void addAllThroughPaths()
void addNeighbour(Block addBlock,
int direction,
int workingDirection)
boolean informNeighbourOfAttachment(LayoutBlock lBlock,
Block block,
int workingDirection)
int determineAdjPacketFlow(int our,
int neigh)
void informNeighbourOfValidRoutes(Block newblock)
void addAdjacency(Path addPath)
void removeAdjacency(Path removedPath)
void removeAdjacency(LayoutBlock layoutBlock)
void removeRouteFromNeighbour(LayoutBlock src,
jmri.jmrit.display.layoutEditor.LayoutBlock.RoutingPacket update)
ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Routes> removeRouteRecievedFromNeighbour(Block removedBlock)
void updateNeighbourPacketFlow(Block neighbour,
int flow)
protected void updateNeighbourPacketFlow(jmri.jmrit.display.layoutEditor.LayoutBlock.Adjacencies neighbour,
int flow)
void notifyNeighboursOfRemoval(ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Routes> routesToRemove,
Block notifyingblk)
void addThroughPath(jmri.jmrit.display.layoutEditor.LayoutBlock.Adjacencies adj)
void addThroughPath(Block srcBlock,
Block dstBlock)
void addThroughPath(Block srcBlock,
Block dstBlock,
LayoutEditor panel)
void notifiedNeighbourNoLongerMutual(LayoutBlock srcBlock)
void stateUpdate()
int getBlockStatus()
Integer getNextPacketID()
boolean updatePacketActedUpon(Integer packetID)
public ArrayList<Block> getActiveNextBlocks(Block source)
public Path getThroughPathSourcePathAtIndex(int i)
public Path getThroughPathDestinationPathAtIndex(int i)
public boolean validThroughPath(Block sourceBlock,
Block destinationBlock)
public int getThroughPathIndex(Block sourceBlock,
Block destinationBlock)
String decodePacketFlow(int value)
public void printValidThroughPaths()
public void printAdjacencies()
public void printRoutes()
public void printRoutes(String blockName)
public Block getNextBlock(Block destBlock,
int direction)
destBlock - - is the destination of the block we are followingdirection - - is the direction of travel from the previous block
public Block getNextBlock(Block previousBlock,
Block destBlock)
public int getConnectedBlockRouteIndex(Block destBlock,
int direction)
public int getNextBlockByIndex(Block destBlock,
int direction,
int offSet)
public int getNextBlockByIndex(Block previousBlock,
Block destBlock,
int offSet)
public int getNextBestBlock(Block previousBlock,
Block destBlock,
List<Integer> excludeBlock,
int routingMethod)
jmri.jmrit.display.layoutEditor.LayoutBlock.Routes getRouteByDestBlock(Block blk)
ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Routes> getRouteByNeighbour(Block blk)
int getAdjacencyPacketFlow(Block blk)
boolean isValidNeighbour(Block blk)
public void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener in interface NamedBeanaddPropertyChangeListener in class AbstractNamedBeanpublic void removePropertyChangeListener(PropertyChangeListener l)
NamedBean
removePropertyChangeListener in interface NamedBeanremovePropertyChangeListener in class AbstractNamedBean
protected void firePropertyChange(String p,
Object old,
Object n)
firePropertyChange in class AbstractNamedBeanpublic void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListener
jmri.jmrit.display.layoutEditor.LayoutBlock.Routes getValidRoute(Block nxtBlock,
Block dstBlock)
public boolean isRouteToDestValid(Block protecting,
Block destination)
ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Routes> getDestRoutes(Block dstBlock)
ArrayList<jmri.jmrit.display.layoutEditor.LayoutBlock.Routes> getNextRoutes(Block nxtBlock)
void updateRoutingInfo(jmri.jmrit.display.layoutEditor.LayoutBlock.Routes route)
void updateRoutingInfo(LayoutBlock src,
jmri.jmrit.display.layoutEditor.LayoutBlock.RoutingPacket update)
void updateRoutesToNeighbours(ArrayList<Block> messageRecipients,
jmri.jmrit.display.layoutEditor.LayoutBlock.Routes ro,
jmri.jmrit.display.layoutEditor.LayoutBlock.RoutingPacket update)
jmri.jmrit.display.layoutEditor.LayoutBlock.Routes getBestRouteByMetric(Block dest)
jmri.jmrit.display.layoutEditor.LayoutBlock.Routes getBestRouteByHop(Block dest)
jmri.jmrit.display.layoutEditor.LayoutBlock.Routes getBestRouteByLength(Block dest)
void addRouteToNeighbours(jmri.jmrit.display.layoutEditor.LayoutBlock.Routes ro)
void addRouteFromNeighbour(LayoutBlock src,
jmri.jmrit.display.layoutEditor.LayoutBlock.RoutingPacket update)
public int getNeighbourDirection(LayoutBlock neigh)
public int getNeighbourDirection(Block neighbourBlock)
jmri.jmrit.display.layoutEditor.LayoutBlock.Adjacencies getAdjacency(Block blk)
public int getNumberOfNeighbours()
public Block getNeighbourAtIndex(int i)
public int getNeighbourDirection(int i)
public int getNeighbourMetric(int i)
public String getNeighbourPacketFlowAsString(int i)
public boolean isNeighbourMutual(int i)
int getNeighbourIndex(jmri.jmrit.display.layoutEditor.LayoutBlock.Adjacencies adj)
public int getNumberOfRoutes()
public int getRouteDirectionAtIndex(int i)
public Block getRouteDestBlockAtIndex(int i)
public Block getRouteNextBlockAtIndex(int i)
public int getRouteHopCountAtIndex(int i)
public float getRouteLengthAtIndex(int i)
public int getRouteMetric(int i)
public int getRouteState(int i)
public boolean getRouteValid(int i)
public String getRouteStateAsString(int i)
int getRouteIndex(jmri.jmrit.display.layoutEditor.LayoutBlock.Routes r)
public int getBlockHopCount(Block destination,
Block nextBlock)
public int getBlockMetric(Block destination,
Block nextBlock)
public float getBlockLength(Block destination,
Block nextBlock)
public int getNumberOfThroughPaths()
public Block getThroughPathSource(int i)
public Block getThroughPathDestination(int i)
public Boolean isThroughPathActive(int i)
ArrayList<Block> getThroughPathSourceByDestination(Block dest)
ArrayList<Block> getThroughPathDestinationBySource(Block source)
boolean checkIsRouteOnValidThroughPath(jmri.jmrit.display.layoutEditor.LayoutBlock.Routes r)
public void refreshValidRoutes()
void updateActiveThroughPaths(jmri.jmrit.display.layoutEditor.LayoutBlock.ThroughPaths tp,
boolean active)
void setRoutesValid(Block nxtHopActive,
boolean state)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||