|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.AbstractManager
jmri.jmrit.display.LayoutBlockManager
public class LayoutBlockManager
Implementation of a Manager to handle LayoutBlocks Note: that the same LayoutBlocks may appear in multiple LayoutEditor panels.
This manager does not enforce any particular system naming convention.
LayoutBlocks are usually addressed by userName. The systemName is hidden from the user for the most part.
| Field Summary |
|---|
| Fields inherited from class jmri.AbstractManager |
|---|
_tsys, _tuser |
| Constructor Summary | |
|---|---|
LayoutBlockManager()
|
|
| Method Summary | |
|---|---|
void |
addBadBeanError()
|
LayoutBlock |
createNewLayoutBlock(String systemName,
String userName)
Method to create a new LayoutBlock if the LayoutBlock does not exist Returns null if a LayoutBlock with the same systemName or userName already exists, or if there is trouble creating a new LayoutBlock. |
void |
deleteLayoutBlock(LayoutBlock block)
Remove an existing LayoutBlock. |
LayoutBlock |
getBlockWithSensorAssigned(Sensor s)
Method to find a LayoutBlock with a specified Sensor assigned as its occupancy sensor. |
LayoutBlock |
getBySystemName(String name)
|
LayoutBlock |
getByUserName(String key)
|
SignalHead |
getFacingSignalHead(Block facingBlock,
Block protectedBlock)
Method to return the Signal Head facing into a specified Block from a specified protected Block. |
LayoutBlock |
getLayoutBlock(String name)
Method to get an existing LayoutBlock. |
void |
initializeLayoutBlockPaths()
Initializes/checks the Paths of all Blocks associated with LayoutBlocks. |
static LayoutBlockManager |
instance()
|
char |
systemLetter()
|
void |
turnOffWarning()
|
char |
typeLetter()
|
boolean |
warn()
Controls switching off incompatible block connectivity messages Warnings are always on when program starts up. |
| Methods inherited from class jmri.AbstractManager |
|---|
addPropertyChangeListener, deregister, dispose, firePropertyChange, getInstanceBySystemName, getInstanceByUserName, getSystemNameList, makeSystemName, propertyChange, register, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LayoutBlockManager()
| Method Detail |
|---|
public char systemLetter()
public char typeLetter()
public LayoutBlock createNewLayoutBlock(String systemName,
String userName)
public void deleteLayoutBlock(LayoutBlock block)
public LayoutBlock getLayoutBlock(String name)
public LayoutBlock getBySystemName(String name)
public LayoutBlock getByUserName(String key)
public static LayoutBlockManager instance()
public LayoutBlock getBlockWithSensorAssigned(Sensor s)
public void initializeLayoutBlockPaths()
This routine should be called when loading panels, after all Layout Editor panels have been loaded.
public void addBadBeanError()
public SignalHead getFacingSignalHead(Block facingBlock,
Block protectedBlock)
This method is primarily designed for use with scripts to get information initially residing in a Layout Editor panel. If either of the input Blocks is null, or if the two blocks do not join at a block boundary, or if either of the input Blocks are not Layout Editor panel blocks, an error message is logged, and "null" is returned. If the signal at the block boundary has two heads--is located at the facing point of a turnout-- the Signal Head that applies for the current setting of turnout (THROWN or CLOSED) is returned. If the turnout state is UNKNOWN or INCONSISTENT, an error message is logged, and "null" is returned.
public boolean warn()
Warnings are always on when program starts up. Once stopped by the user, these messages may not be switched on again until program restarts.
public void turnOffWarning()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||