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 class
ThrottlesPreferences.ThrottlesPrefsXml
An extension of the abstract XmlFile.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
dirty
-
Constructor Summary
Constructors Constructor Description ThrottlesPreferences()
-
Method Summary
-
-
-
Field Detail
-
dirty
protected boolean dirty
-
-
Constructor Detail
-
ThrottlesPreferences
public ThrottlesPreferences()
-
-
Method Detail
-
isDirty
public boolean isDirty()
- Returns:
- true if preferences need to be saved
-
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()
-
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.
-
-