Package jmri.jmrit.ctc.ctcserialdata
Class CTCSerialData
- java.lang.Object
-
- jmri.jmrit.ctc.ctcserialdata.CTCSerialData
-
public class CTCSerialData extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CTCSerialData.CTCTurnoutData
"Return" value from function "getCTCTurnoutData":
-
Constructor Summary
Constructors Constructor Description CTCSerialData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCodeButtonHandlerData(CodeButtonHandlerData codeButtonHandlerData)
int
findHighestColumnNumberUsedSoFar()
int
findHighestSwitchNumberUsedSoFar()
CodeButtonHandlerData
getCodeButtonHandlerData(int index)
java.util.ArrayList<CodeButtonHandlerData>
getCodeButtonHandlerDataArrayList()
int
getCodeButtonHandlerDataSize()
CodeButtonHandlerData
getCodeButtonHandlerDataViaUniqueID(int uniqueID)
CTCSerialData.CTCTurnoutData
getCTCTurnoutData(Turnout turnout)
Routine to search our _mCodeButtonHandlerDataArrayList for the O.S. section that contains the passed turnout.java.util.HashSet<java.lang.String>
getHashSetOfAllLockedTurnoutsExcludingPassedOne(CodeButtonHandlerData excludedOne)
This routine is used to support FrmTUL.java.int
getIndexOfUniqueID(int uniqueID)
java.lang.String
getMyShortStringNoCommaViaUniqueID(int uniqueID)
OtherData
getOtherData()
int
getUniqueNumber()
void
moveDown(int index)
void
moveUp(int index)
void
removeCodeButtonHandlerData(int index)
void
setCodeButtonHandlerData(int index, CodeButtonHandlerData codeButtonHandlerData)
void
setOtherData(OtherData otherData)
void
updateSwitchAndSignalEtcNumbersEverywhere(int index, int newSwitchNumber, int newSignalEtcNumber, int newGUIColumnNumber, boolean newGUIGeneratedAtLeastOnceAlready)
Change the identifying attributes with the exception of the uniqueID.
-
-
-
Constructor Detail
-
CTCSerialData
public CTCSerialData()
-
-
Method Detail
-
getOtherData
public OtherData getOtherData()
-
getUniqueNumber
public int getUniqueNumber()
-
getCodeButtonHandlerDataViaUniqueID
public CodeButtonHandlerData getCodeButtonHandlerDataViaUniqueID(int uniqueID)
-
getMyShortStringNoCommaViaUniqueID
public java.lang.String getMyShortStringNoCommaViaUniqueID(int uniqueID)
-
getIndexOfUniqueID
public int getIndexOfUniqueID(int uniqueID)
-
setOtherData
public void setOtherData(OtherData otherData)
-
getCodeButtonHandlerDataArrayList
public java.util.ArrayList<CodeButtonHandlerData> getCodeButtonHandlerDataArrayList()
-
addCodeButtonHandlerData
public void addCodeButtonHandlerData(CodeButtonHandlerData codeButtonHandlerData)
-
removeCodeButtonHandlerData
public void removeCodeButtonHandlerData(int index)
-
getCodeButtonHandlerData
public CodeButtonHandlerData getCodeButtonHandlerData(int index)
-
getCodeButtonHandlerDataSize
public int getCodeButtonHandlerDataSize()
-
moveUp
public void moveUp(int index)
-
moveDown
public void moveDown(int index)
-
updateSwitchAndSignalEtcNumbersEverywhere
public void updateSwitchAndSignalEtcNumbersEverywhere(int index, int newSwitchNumber, int newSignalEtcNumber, int newGUIColumnNumber, boolean newGUIGeneratedAtLeastOnceAlready)
Change the identifying attributes with the exception of the uniqueID. The potential primary changes are the switch and signal numbers.- Parameters:
index
- The row being changed.newSwitchNumber
- The new switch number which is always odd.newSignalEtcNumber
- The new signal number which is always one more than the switch number.newGUIColumnNumber
- The location on the panel. Used by the GUI export process.newGUIGeneratedAtLeastOnceAlready
- A flag to indicate whether the GUI export should include this column.
-
setCodeButtonHandlerData
public void setCodeButtonHandlerData(int index, CodeButtonHandlerData codeButtonHandlerData)
-
findHighestSwitchNumberUsedSoFar
public int findHighestSwitchNumberUsedSoFar()
-
findHighestColumnNumberUsedSoFar
public int findHighestColumnNumberUsedSoFar()
-
getCTCTurnoutData
public CTCSerialData.CTCTurnoutData getCTCTurnoutData(Turnout turnout)
Routine to search our _mCodeButtonHandlerDataArrayList for the O.S. section that contains the passed turnout.- Parameters:
turnout
- The turnout to search for in our table.- Returns:
- CTCTurnoutData, else if turnout not found, null.
-
getHashSetOfAllLockedTurnoutsExcludingPassedOne
public java.util.HashSet<java.lang.String> getHashSetOfAllLockedTurnoutsExcludingPassedOne(CodeButtonHandlerData excludedOne)
This routine is used to support FrmTUL.java. It generates a HashSet (which prevents duplicate strings) of all such locked turnouts, EXCLUDING the passed "excludedOne", since that one will be handled locally in the calling code.- Parameters:
excludedOne
- The one to NOT include in the returned information.- Returns:
- All locked turnouts NOT INCLUDING excludedOne.
-
-