|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.display.layoutEditor.LayoutEditorAuxTools
public class LayoutEditorAuxTools
LayoutEditorAuxTools provides tools making use of layout connectivity available in Layout Editor panels. (More tools are in LayoutEditorTools.java.)
This module manages block connectivity for its associated LayoutEditor.
The tools in this module are accessed via the Tools menu in Layout Editor, or directly from LayoutEditor or LayoutEditor specific modules.
| Field Summary | |
|---|---|
(package private) static org.slf4j.Logger |
log
|
(package private) ResourceBundle |
rb
|
| Constructor Summary | |
|---|---|
LayoutEditorAuxTools(LayoutEditor thePanel)
|
|
| Method Summary | |
|---|---|
void |
addBeanSettings(Path p,
LayoutConnectivity lc,
LayoutBlock layoutBlock)
Searches for and adds BeanSetting's to a Path as needed. |
ArrayList<LayoutConnectivity> |
getConnectivityList(LayoutBlock blk)
Get Connectivity involving a specific Layout Block This routine returns an ArrayList of BlockConnectivity objects involving the specified LayoutBlock. |
void |
initializeBlockConnectivity()
Initializes the block connectivity (block boundaries) for a Layout Editor panel. |
void |
setBlockConnectivityChanged()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
ResourceBundle rb
static org.slf4j.Logger log
| Constructor Detail |
|---|
public LayoutEditorAuxTools(LayoutEditor thePanel)
| Method Detail |
|---|
public void setBlockConnectivityChanged()
public ArrayList<LayoutConnectivity> getConnectivityList(LayoutBlock blk)
This routine returns an ArrayList of BlockConnectivity objects involving the specified LayoutBlock.
public void initializeBlockConnectivity()
This routine sets up the LayoutConnectivity objects needed to show the current connectivity. It gets its information from arrays contained in LayoutEditor.
One LayoutConnectivity object is created for each block boundary -- connection points where two blocks join. Block boundaries can occur whereever a track segment in one block joins with: 1) a track segment in another block -OR- 2) a connection point in a layout turnout in another block -OR- 3) a connection point in a level crossing in another block.
The first block is always a track segment. The direction set in the LayoutConnectivity is the direction of the track segment alone for cases 2) and 3) above. For case 1), two track segments, the direction reflects an "average" over the two track segments. See LayoutConnectivity for the allowed values of direction.
public void addBeanSettings(Path p,
LayoutConnectivity lc,
LayoutBlock layoutBlock)
This method starts at the entry point to the LayoutBlock given in the Path at the block boundary specified in the LayoutConnectivity. It follows the track looking for turnout settings that are required for a train entering on this block boundary point to exit the block. If a required turnout setting is found, the turnout and its required state are used to create a BeanSetting, which is added to the Path. Such a setting can occur, for example, if a track enters a right-handed turnout from either the diverging track or the continuing track.
If the track branches into two tracks (for example, by entering a right-handed turnout via the throat track), the search is stopped. The search is also stopped when the track reaches a different block (or an undefined block), or reaches an end bumper.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||