Class SimpleTurnoutStateEntry
Turnout numbering is the same as seen on a Digitrax throttle display; Tools using values from objects of this type must provide the appropriate transform to create turnout numbering which is suitable for use within LocoNet messaging.
-
Field Summary
FieldsModifier and TypeFieldDescriptionTracks the "user-friendly" turnout address.Tracks whether the associated turnout is "closed".Tracks whether the associated turnout is "thrown".Tracks whether the object is in-use or not, as seen in some aspects of DS64 configuration. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor used when the current address and position are not known.SimpleTurnoutStateEntry(Integer address, boolean isClosed) Constructor used when the current address and position are known.SimpleTurnoutStateEntry(Integer address, boolean closed, boolean unused) Constructor used when the current address, position, and "validity" state are known. -
Method Summary
Modifier and TypeMethodDescriptioncreateEntryPanel(String label) Creates a GUI Panel for managing the address and position of a turnout, as used in configuring the turnout address of a DS64 output.Retrieve the GUI element which holds a turnout addressvoidsetAddress(Integer addr) Sets the turnout address of the simpleTurnout object.final voidEstablish the most recent value known to be found in the hardware.voidsetIsClosed(boolean isclosed) Sets an object field to show the current position of a simpleTurnout object.Methods inherited from class jmri.jmrix.loconet.ds64.SimpleTurnout
getAddress, getIsClosed, getIsUnused, isValid, setIsUnused
-
Field Details
-
addressField
Tracks the "user-friendly" turnout address.Turnout numbering is the same as seen on a Digitrax throttle display; Tools using values from objects of this type must provide the appropriate transform to create turnout numbering which is suitable for use within LocoNet messaging.
-
thrownRadioButton
Tracks whether the associated turnout is "thrown". -
closedRadioButton
Tracks whether the associated turnout is "closed". -
unusedRadioButton
Tracks whether the object is in-use or not, as seen in some aspects of DS64 configuration.
-
-
Constructor Details
-
SimpleTurnoutStateEntry
public SimpleTurnoutStateEntry()Constructor used when the current address and position are not known. It is assumed that the turnout address is 1, that the turnout is "closed", and that the turnout is "valid".Turnout numbering is the same as seen on a Digitrax throttle display; Tools using values from objects of this type must provide the appropriate transform to create turnout numbering which is suitable for use within LocoNet messaging.
-
SimpleTurnoutStateEntry
Constructor used when the current address and position are known. Turnout "validity" is assumed to be "valid".Turnout numbering is the same as seen on a Digitrax throttle display; Tools using values from objects of this type must provide the appropriate transform to create turnout numbering which is suitable for use within LocoNet messaging.
- Parameters:
address- turnout addressisClosed- true if turnout is closed, else false
-
SimpleTurnoutStateEntry
Constructor used when the current address, position, and "validity" state are known.Turnout numbering is the same as seen on a Digitrax throttle display; Tools using values from objects of this type must provide the appropriate transform to create turnout numbering which is suitable for use within LocoNet messaging.
- Parameters:
address- turnout addressclosed- true if turnout is closed, else falseunused- true if turnout is unused, else false
-
-
Method Details
-
getEntryPanel
- Returns:
- the JPanel related to this object
-
createEntryPanel
Creates a GUI Panel for managing the address and position of a turnout, as used in configuring the turnout address of a DS64 output.- Parameters:
label- a text string to be displayed in the JPanel with the turnout address and position- Returns:
- a JPanel containing the label, the turnout address text field, and position GUI elements
-
getAddressField
Retrieve the GUI element which holds a turnout address- Returns:
- turnout address
-
setAddress
Description copied from class:SimpleTurnoutSets the turnout address of the simpleTurnout object.- Overrides:
setAddressin classSimpleTurnout- Parameters:
addr- address value
-
setAddressLastQueriedValue
Establish the most recent value known to be found in the hardware. Value is used to help determine colorization of the swing GUI text field.- Parameters:
addr- Turnout address
-
setIsClosed
Description copied from class:SimpleTurnoutSets an object field to show the current position of a simpleTurnout object. This position does not necessarily reflect the actual position of an associated physical turnout.- Overrides:
setIsClosedin classSimpleTurnout- Parameters:
isclosed- true if the object is to be marked as closed.
-