Package jmri.jmrit.throttle.interfaces
Interface ThrottleControllersUIContainer
- All Known Implementing Classes:
SimpleThrottleWindow,ThrottleWindow
public interface ThrottleControllersUIContainer
An interface for containers of throttle controllers user interface
(ThrottleWindow for Swing throttles for instance)
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddThrottleControllerAt(ThrottleControllerUI tf, int n) Adds an existing throttle controller to that container list at position nvoiddispose()Dispose of the container and its resources.voidForce estop all throttles managed by that controllers containerGet the throttle controller being used now (or on top)intReturn the number of thottle controlS containerS (ThrottleWindows forinstance)intGet the number of usages of a particular Loco Address.getThrottleControllerAt(int n) Get the throttle controller at position nCreated a new throttle controllervoidRemove a throttle controller from that container
-
Method Details
-
getNbThrottlesControllers
Return the number of thottle controlS containerS (ThrottleWindows forinstance)- Returns:
- the number of active thottle controls containers.
-
newThrottleController
Created a new throttle controller- Returns:
- the newly created throttle controller
-
addThrottleControllerAt
Adds an existing throttle controller to that container list at position n- Parameters:
tf- the throttle controller to addn- position that it will inserted at
-
removeThrottleController
Remove a throttle controller from that container- Parameters:
tf- the throttle controller to add
-
getThrottleControllerAt
Get the throttle controller at position n- Parameters:
n- position- Returns:
- the throttle controller
-
getCurentThrottleController
Get the throttle controller being used now (or on top)- Returns:
- the throttle controller
-
emergencyStopAll
void emergencyStopAll()Force estop all throttles managed by that controllers container -
getNumberOfEntriesFor
Get the number of usages of a particular Loco Address.- Parameters:
la- the Loco Address, can be null.- Returns:
- 0 if no usages, else number of AddressPanel usages.
-
dispose
void dispose()Dispose of the container and its resources. This is called when the container is closed, and should clean up any resources used by the container, such as closing windows, releasing memory, etc. Particularly will release an ythrottle still in use.
-