001package jmri.jmrit.throttle; 002 003 004import javax.annotation.CheckForNull; 005 006import jmri.DccLocoAddress; 007 008/** 009 * 010 * An interface for managers of containers of throttle controllers user interface 011 * (ThrottleFrameManager for Swing throttles for instance) 012 * 013 * @author Lionel Jeanson 2026 014 */ 015public interface ThrottleControllersUIContainersManager extends Iterable<ThrottleControllersUIContainer> { 016 017 /** 018 * Return the number of active thottle controller containers for that throttle contrainer manager 019 * 020 * @return the number of active thottle controller containers 021 */ 022 int getNbThrottleControllersContainers(); 023 024 /** 025 * Create a new throttle controller 026 * 027 * @return The newly created throttle controller 028 */ 029 ThrottleControllerUI createThrottleController(); 030 031 /** 032 * Return the thottle controller container at nth position in the list 033 * 034 * @param n position of the throttle controller container 035 * @return a thottle controller container 036 */ 037 ThrottleControllersUIContainer getThrottleControllersContainerAt(int n); 038 039 040 /** 041 * Return the number of throttle controllers for a LocoAddress, 042 * usefull to kno if a layout throttle object should actually be released 043 * 044 * @param la locoaddrress we're looking for 045 * @return the number of throttle controllers for that LocoAddress 046 */ 047 int getNumberOfEntriesFor(@CheckForNull DccLocoAddress la); 048 049}