Package jmri.jmrit.throttle
Class ThrottleFrameManager
java.lang.Object
jmri.jmrit.throttle.ThrottleFrameManager
- All Implemented Interfaces:
Iterable<ThrottleControllersUIContainer>,InstanceManagerAutoDefault,ThrottleControllersUIContainersManager
public class ThrottleFrameManager
extends Object
implements InstanceManagerAutoDefault, ThrottleControllersUIContainersManager
Interface for allocating and deallocating throttles frames. Not to be
confused with ThrottleManager.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCreate a new throttle controllerTell this manager that a new ThrottleFrame was created.createThrottleFrame(ConnectionConfig connectionConfig) Tell this manager that a new ThrottleFrame was created.Tell this manager that a new ThrottleWindow was created.createThrottleWindow(ConnectionConfig connectionConfig) Tell this manager that a new ThrottleWindow was created.createThrottleWindow(org.jdom2.Element e) Tell this manager that a new ThrottleWindow was created.voidForce emergency stop of all managed throttles windowsintintReturn the number of active thottle windows.intGet the number of usages of a particular Loco Address.Return the thottle controller container at nth position in the listiterator()voidvoidvoidvoidRequest that this manager destroy a throttle frame.voidvoidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ThrottleFrameManager
public ThrottleFrameManager()Constructor for the ThrottleFrameManager object.
-
-
Method Details
-
createThrottleWindow
Tell this manager that a new ThrottleWindow was created.- Returns:
- The newly created ThrottleWindow
-
createThrottleWindow
Tell this manager that a new ThrottleWindow was created.- Parameters:
connectionConfig- the connection config- Returns:
- The newly created ThrottleWindow
-
createThrottleWindow
Tell this manager that a new ThrottleWindow was created.- Parameters:
e- the xml element for the throttle window- Returns:
- The newly created ThrottleWindow
-
createThrottleFrame
Tell this manager that a new ThrottleFrame was created.- Returns:
- The newly created ThrottleFrame
-
createThrottleController
Description copied from interface:ThrottleControllersUIContainersManagerCreate a new throttle controller- Specified by:
createThrottleControllerin interfaceThrottleControllersUIContainersManager- Returns:
- The newly created throttle controller
-
createThrottleFrame
Tell this manager that a new ThrottleFrame was created.- Parameters:
connectionConfig- the connection config- Returns:
- The newly created ThrottleFrame
-
requestThrottleWindowDestruction
Request that this manager destroy a throttle frame.- Parameters:
frame- The to-be-destroyed ThrottleFrame
-
requestAllThrottleWindowsDestroyed
-
generateUniqueFrameID
-
iterator
- Specified by:
iteratorin interfaceIterable<ThrottleControllersUIContainer>
-
getNbThrottleControllersContainers
Return the number of active thottle windows.- Specified by:
getNbThrottleControllersContainersin interfaceThrottleControllersUIContainersManager- Returns:
- the number of active thottle window.
-
getThrottleControllersContainerAt
Description copied from interface:ThrottleControllersUIContainersManagerReturn the thottle controller container at nth position in the list- Specified by:
getThrottleControllersContainerAtin interfaceThrottleControllersUIContainersManager- Parameters:
n- position of the throttle controller container- Returns:
- a thottle controller container
-
requestFocusForNextThrottleWindow
-
requestFocusForPreviousThrottleWindow
-
getCurrentThrottleFrame
-
getThrottlesListPanel
-
showThrottlesList
-
showThrottlesPreferences
-
applyPreferences
-
emergencyStopAll
Force emergency stop of all managed throttles windows -
getNumberOfEntriesFor
Get the number of usages of a particular Loco Address.- Specified by:
getNumberOfEntriesForin interfaceThrottleControllersUIContainersManager- Parameters:
la- the Loco Address, can be null.- Returns:
- 0 if no usages, else number of AddressPanel usages.
-