Class ThrottleUICore
java.lang.Object
jmri.jmrit.throttle.implementation.ThrottleUICore
- All Implemented Interfaces:
EventListener,AddressListener
Inner class of a throttle UI holding most of the logic.
Used by classes actually implementing a throttle view (ThrottleFrame, SimpleThrottlePanel, ConsistFunctionPanel)
This file is part of JMRI.
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 Summary
ConstructorsConstructorDescriptionThrottleUICore(ThrottleManager tm, ThrottleControllerUI tc, boolean withPopupMenu) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Handle my own destruction.voideStop()static Stringstatic StringvoidCollect the prefs of this object into the given XML Element arraybooleanvoidorg.jdom2.ElementloadThrottle(String sfile) voidReceive notification that a new address has been selected and validated.voidReceive notification that an address has been released/dispatchedvoidReceive notification that a throttle has been foundvoidReceive notification that a new Consist address has been selected.voidReceive notification that a consist address has been released/dispatched.voidnotifyConsistAddressThrottleFound(DccThrottle throttle) Receive notification that a throttle has been foundvoidReceive notification that a new roster entry has been selected (and not validated yet).voidvoidsaveThrottle(org.jdom2.Element throttleElement) voidsaveThrottleAs(org.jdom2.Element throttleElement) voidvoidvoidsetLastUsedSaveFile(String lusf) voidvoidsetXml(org.jdom2.Element e) Set the preferences based on the XML Element.
-
Constructor Details
-
ThrottleUICore
-
ThrottleUICore
-
-
Method Details
-
getDefaultThrottleFolder
-
getDefaultThrottleFilename
-
getAddressPanel
-
getThrottle
-
getFunctionThrottle
-
getRosterEntry
-
getFunctionRosterEntry
-
getControlPanel
-
getFunctionPanel
-
getSpeedPanel
-
getConsistFunctionsPanel
-
getBackgroundPanel
-
getLocoIconPanel
-
hasActiveFunction
-
setRosterEntry
-
setAddress
-
getAddress
-
setConsistAddress
-
eStop
-
dispose
Handle my own destruction.- dispose of sub windows.
- notify my manager of my demise.
-
saveRosterChanges
-
getXml
Collect the prefs of this object into the given XML Element array- Parameters:
children- the array to fill with the XML Elements for this object. The caller will add these to the parent element as needed.
-
setXml
Set the preferences based on the XML Element.- Window prefs
- Frame title
- ControlPanel
- FunctionPanel
- AddressPanel
- SpeedPanel
- Parameters:
e- The Element for this object.
-
saveThrottleAs
-
saveThrottle
-
loadThrottle
public org.jdom2.Element loadThrottle(String sfile) throws IOException, NullPointerException, org.jdom2.JDOMException, FileNotFoundException - Throws:
IOExceptionNullPointerExceptionorg.jdom2.JDOMExceptionFileNotFoundException
-
loadDefaultThrottle
-
notifyAddressChosen
Description copied from interface:AddressListenerReceive notification that a new address has been selected and validated.- Specified by:
notifyAddressChosenin interfaceAddressListener- Parameters:
l- The address that is now selected and validated.
-
notifyRosterEntrySelected
Description copied from interface:AddressListenerReceive notification that a new roster entry has been selected (and not validated yet). In the RosterEntry combobox for example.- Specified by:
notifyRosterEntrySelectedin interfaceAddressListener- Parameters:
re- The roster entry that is now selected.
-
notifyAddressReleased
Description copied from interface:AddressListenerReceive notification that an address has been released/dispatched- Specified by:
notifyAddressReleasedin interfaceAddressListener- Parameters:
la- The address released/dispatched
-
notifyAddressThrottleFound
Description copied from interface:AddressListenerReceive notification that a throttle has been found- Specified by:
notifyAddressThrottleFoundin interfaceAddressListener- Parameters:
t- The throttle
-
notifyConsistAddressChosen
Description copied from interface:AddressListenerReceive notification that a new Consist address has been selected.- Specified by:
notifyConsistAddressChosenin interfaceAddressListener- Parameters:
l- The address that is now selected.
-
notifyConsistAddressReleased
Description copied from interface:AddressListenerReceive notification that a consist address has been released/dispatched.- Specified by:
notifyConsistAddressReleasedin interfaceAddressListener- Parameters:
la- The address that is now selected.
-
notifyConsistAddressThrottleFound
Description copied from interface:AddressListenerReceive notification that a throttle has been found- Specified by:
notifyConsistAddressThrottleFoundin interfaceAddressListener- Parameters:
throttle- The throttle
-
getLastUsedSaveFile
-
setLastUsedSaveFile
-