Package jmri.jmrit.throttle
Class ThrottlesPreferences
- java.lang.Object
-
- jmri.jmrit.throttle.ThrottlesPreferences
-
- All Implemented Interfaces:
InstanceManagerAutoDefault
public class ThrottlesPreferences extends java.lang.Object implements InstanceManagerAutoDefault
A class to store JMRI throttles preferences.A singleton instance is provided by a call to
jmri.InstanceManager.getDefault(ThrottlesPreferences.class);orjmri.InstanceManager.getNullableDefault(ThrottlesPreferences.class);
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classThrottlesPreferences.ThrottlesPrefsXmlAn extension of the abstract XmlFile.
-
Field Summary
Fields Modifier and Type Field Description protected booleandirty
-
Constructor Summary
Constructors Constructor Description ThrottlesPreferences()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener l)Add an AddressListener.java.lang.StringgetDefaultThrottleFilePath()ThrottlesPreferencesWindowKeyboardControlsgetThrottlesKeyboardControls()java.awt.DimensiongetWindowDimension()booleanisAutoLoading()booleanisDirty()booleanisEnablingRosterSearch()booleanisHidingSpeedStepSelector()booleanisHidingUndefinedFuncButt()booleanisIgnoringThrottlePosition()booleanisResizingWindow()booleanisSavingThrottleOnLayoutSave()booleanisSilentShare()booleanisSilentSteal()booleanisUsingExThrottle()booleanisUsingFunctionIcon()Check if function icons are in use.booleanisUsingLargeSpeedSlider()booleanisUsingRosterImage()booleanisUsingToolBar()voidload(org.jdom2.Element e)voidremovePropertyChangeListener(java.beans.PropertyChangeListener l)Remove an AddressListener.voidsave()voidset(ThrottlesPreferences tp)voidsetAutoLoad(boolean b)voidsetDefaultThrottleFilePath(java.lang.String p)voidsetEnableRosterSearch(boolean b)voidsetHideSpeedStepSelector(boolean b)voidsetHideUndefinedFuncButt(boolean b)voidsetIgnoreThrottlePosition(boolean b)voidsetResizeWindow(boolean winImg)voidsetSaveThrottleOnLayoutSave(boolean b)voidsetSilentShare(boolean b)voidsetSilentSteal(boolean b)voidsetThrottlesKeyboardControls(ThrottlesPreferencesWindowKeyboardControls tpwkc)Set the throttles keyboard controls preferencesvoidsetUseExThrottle(boolean exThrottle)voidsetUseLargeSpeedSlider(boolean b)voidsetUseRosterImage(boolean rosterImage)voidsetUsingFunctionIcon(boolean useFunctionIcon)voidsetUsingToolBar(boolean win4all)voidsetWindowDimension(java.awt.Dimension d)org.jdom2.Elementstore()
-
-
-
Field Detail
-
dirty
protected boolean dirty
-
-
Constructor Detail
-
ThrottlesPreferences
public ThrottlesPreferences()
-
-
Method Detail
-
load
public void load(org.jdom2.Element e)
-
isDirty
public boolean isDirty()
- Returns:
- true if preferences need to be saved
-
store
public org.jdom2.Element store()
-
set
public void set(ThrottlesPreferences tp)
-
save
public void save()
-
getWindowDimension
public java.awt.Dimension getWindowDimension()
-
setWindowDimension
public void setWindowDimension(java.awt.Dimension d)
-
isUsingExThrottle
public boolean isUsingExThrottle()
-
setUseExThrottle
public void setUseExThrottle(boolean exThrottle)
-
isUsingToolBar
public boolean isUsingToolBar()
-
setUsingToolBar
public void setUsingToolBar(boolean win4all)
-
isUsingFunctionIcon
public boolean isUsingFunctionIcon()
Check if function icons are in use.- Returns:
- user preference to use function icons.
-
setUsingFunctionIcon
public void setUsingFunctionIcon(boolean useFunctionIcon)
-
isResizingWindow
public boolean isResizingWindow()
-
setResizeWindow
public void setResizeWindow(boolean winImg)
-
isUsingRosterImage
public boolean isUsingRosterImage()
-
setUseRosterImage
public void setUseRosterImage(boolean rosterImage)
-
isEnablingRosterSearch
public boolean isEnablingRosterSearch()
-
setEnableRosterSearch
public void setEnableRosterSearch(boolean b)
-
setAutoLoad
public void setAutoLoad(boolean b)
-
isAutoLoading
public boolean isAutoLoading()
-
setHideUndefinedFuncButt
public void setHideUndefinedFuncButt(boolean b)
-
isHidingUndefinedFuncButt
public boolean isHidingUndefinedFuncButt()
-
setIgnoreThrottlePosition
public void setIgnoreThrottlePosition(boolean b)
-
isIgnoringThrottlePosition
public boolean isIgnoringThrottlePosition()
-
setSaveThrottleOnLayoutSave
public void setSaveThrottleOnLayoutSave(boolean b)
-
isSavingThrottleOnLayoutSave
public boolean isSavingThrottleOnLayoutSave()
-
isSilentSteal
public boolean isSilentSteal()
-
isSilentShare
public boolean isSilentShare()
-
setSilentSteal
public void setSilentSteal(boolean b)
-
setSilentShare
public void setSilentShare(boolean b)
-
setUseLargeSpeedSlider
public void setUseLargeSpeedSlider(boolean b)
-
isUsingLargeSpeedSlider
public boolean isUsingLargeSpeedSlider()
-
setDefaultThrottleFilePath
public void setDefaultThrottleFilePath(java.lang.String p)
-
getDefaultThrottleFilePath
public java.lang.String getDefaultThrottleFilePath()
-
isHidingSpeedStepSelector
public boolean isHidingSpeedStepSelector()
-
setHideSpeedStepSelector
public void setHideSpeedStepSelector(boolean b)
-
getThrottlesKeyboardControls
public ThrottlesPreferencesWindowKeyboardControls getThrottlesKeyboardControls()
- Returns:
- the throttles keyboard controls preferences
-
setThrottlesKeyboardControls
public void setThrottlesKeyboardControls(ThrottlesPreferencesWindowKeyboardControls tpwkc)
Set the throttles keyboard controls preferences- Parameters:
tpwkc- the new keyboard preferences
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add an AddressListener. AddressListeners are notified when the user selects a new address and when a Throttle is acquired for that address.- Parameters:
l- listener to add.
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove an AddressListener.- Parameters:
l- listener to remove.
-
-