Class ThrottleFrameManager

java.lang.Object
jmri.jmrit.throttle.ThrottleFrameManager
All Implemented Interfaces:
InstanceManagerAutoDefault

Interface for allocating and deallocating throttles frames. Not to be confused with ThrottleManager.
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.

  • Constructor Details

    • ThrottleFrameManager

      Constructor for the ThrottleFrameManager object.
  • Method Details

    • createThrottleWindow

      Ask this manager to create a new Throttle Window
      Returns:
      The newly created ThrottleWindow
    • createThrottleWindow

      Ask this manager to create a new Throttle Window
      Parameters:
      connectionConfig - the connection config
      Returns:
      The newly created ThrottleWindow
    • createThrottleWindow

      public ThrottleWindow createThrottleWindow(org.jdom2.Element e)
      Ask this manager to create a new Throttle Window
      Parameters:
      e - the xml element for the throttle window
      Returns:
      The newly created ThrottleWindow
    • createThrottleFrame

      Ask this manager to create a new Throttle Frame A ThrottleWindow will be created, but the inner Panel (ThrottleFrame) will be returned. This method is backward compatible with the first implementation of JMRI throttle (200x).
      Returns:
      The newly created ThrottleFrame
    • createThrottleFrame

      Ask this manager to create a new Throttle Frame A ThrottleWindow will be created, but the inner Panel (ThrottleFrame) will be returned. This method is backward compatible with the first implementation of JMRI throttle (200x).
      Parameters:
      connectionConfig - the connection config
      Returns:
      The newly created ThrottleFrame
    • createSimpleThrottleFrame

      Ask this manager to create a new Simple Throttle Frame A SimpleThrottleWindow will be created, but the inner Panel (SimpleThrottleFrame) will be returned.
      Parameters:
      re - the RosterEntry that this throttle should control
      Returns:
      The newly created SimpleThrottleFrame
    • createSimpleThrottleFrame

      Ask this manager to create a new Simple Throttle Frame A SimpleThrottleWindow will be created, but the inner Panel (SimpleThrottleFrame) will be returned.
      Parameters:
      la - the loco address that this throttle should control
      Returns:
      The newly created SimpleThrottleFrame
    • createSimpleThrottleFrame

      Ask this manager to create a new Simple Throttle Frame A SimpleThrottleWindow will be created, but the inner Panel (SimpleThrottleFrame) will be returned.
      Parameters:
      connectionConfig - the connection config
      la - the loco address that this throttle should control
      Returns:
      The newly created SimpleThrottleFrame
    • requestThrottleWindowDestruction

      Request that this manager destroy a ThrottleControllersUIContainer. Is called by the ThrottleWindow, or SimpleThrottleWindow, when it is disposed
      Parameters:
      throtCont - The to-be-destroyed Throttle Container
    • requestAllThrottleWindowsDestroyed

      Request that this manager destroy all throttle containers.
    • generateUniqueFrameID

      public int generateUniqueFrameID()
      Request this manager for a unique identifier (used by ThrottleWindow to identify themselves).
      Returns:
      a unique identifier
    • iterator

      Gets an iterator over all the Throttle UI containers
      Returns:
      an iterator over all the Throttle UI containers
    • getNbThrottleControllersContainers

      Return the number of active thottle UI containers
      Returns:
      the number of active thottle UI containers
    • getThrottleControllersContainerAt

      Return the thottle controller container at nth position in the list
      Parameters:
      n - position of the throttle controller container
      Returns:
      a thottle controller container
    • requestFocusForNextThrottleWindow

    • requestFocusForPreviousThrottleWindow

    • getCurentThrottleController

    • getThrottlesListPanel

    • showThrottlesList

      public void showThrottlesList()
    • showThrottlesPreferences

      public void showThrottlesPreferences()
    • emergencyStopAll

      public void emergencyStopAll()
      Force emergency stop of all managed throttles windows
    • getNumberOfEntriesFor

      Return the number of throttle controllers for a LocoAddress, usefull to know if a layout throttle object should actually be released
      Parameters:
      la - locoaddrress we're looking for
      Returns:
      the number of throttle controllers for that LocoAddress