Package jmri
Interface CabSignalManager
-
- All Known Implementing Classes:
AbstractCabSignalManager
,CbusCabSignalManager
,DefaultCabSignalManager
,LnCabSignalManager
public interface CabSignalManager
Interface for CabSignal Manager objects, which provide access to the existing CabSignals and allows for creation and destruction.
This file is part of JMRI.JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addCabSignalListListener(CabSignalListListener listener)
Register a CabSignalListListener object with this CabSignalManagervoid
delCabSignal(LocoAddress address)
Remove an old CabSignal.CabSignal
getCabSignal(LocoAddress address)
Find a CabSignal with the given address, and return it.CabSignal[]
getCabSignalArray()
Get an array of known cab signals.java.util.Set<LocoAddress>
getCabSignalList()
Get a list of known cab signal addresses.void
notifyCabSignalListChanged()
Notify the registered CabSignalListListener objects that the CabSignalList has changed.void
removeCabSignalListListener(CabSignalListListener listener)
Remove a CabSignalListListener object with this CabSignalManager
-
-
-
Method Detail
-
getCabSignal
CabSignal getCabSignal(LocoAddress address)
Find a CabSignal with the given address, and return it. If the CabSignal doesn't exit, create it.- Parameters:
address
- the cab signal for the address- Returns:
- an existing or new cab signal
-
delCabSignal
void delCabSignal(LocoAddress address)
Remove an old CabSignal.- Parameters:
address
- the address associated with the cab signal
-
getCabSignalList
java.util.Set<LocoAddress> getCabSignalList()
Get a list of known cab signal addresses.- Returns:
- list of cab signal addresses
-
getCabSignalArray
CabSignal[] getCabSignalArray()
Get an array of known cab signals.- Returns:
- array of cab signals
-
addCabSignalListListener
void addCabSignalListListener(CabSignalListListener listener)
Register a CabSignalListListener object with this CabSignalManager- Parameters:
listener
- a CabSignal List Listener object.
-
removeCabSignalListListener
void removeCabSignalListListener(CabSignalListListener listener)
Remove a CabSignalListListener object with this CabSignalManager- Parameters:
listener
- a CabSignal List Listener object.
-
notifyCabSignalListChanged
void notifyCabSignalListChanged()
Notify the registered CabSignalListListener objects that the CabSignalList has changed.
-
-