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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add an AddressListener.java.lang.String
getDefaultThrottleFilePath()
ThrottlesPreferencesWindowKeyboardControls
getThrottlesKeyboardControls()
java.awt.Dimension
getWindowDimension()
boolean
isAutoLoading()
boolean
isDirty()
boolean
isEnablingRosterSearch()
boolean
isHidingSpeedStepSelector()
boolean
isHidingUndefinedFuncButt()
boolean
isIgnoringThrottlePosition()
boolean
isResizingWindow()
boolean
isSavingThrottleOnLayoutSave()
boolean
isSilentShare()
boolean
isSilentSteal()
boolean
isUsingExThrottle()
boolean
isUsingFunctionIcon()
Check if function icons are in use.boolean
isUsingLargeSpeedSlider()
boolean
isUsingRosterImage()
boolean
isUsingToolBar()
void
load(org.jdom2.Element e)
void
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove an AddressListener.void
save()
void
set(ThrottlesPreferences tp)
void
setAutoLoad(boolean b)
void
setDefaultThrottleFilePath(java.lang.String p)
void
setEnableRosterSearch(boolean b)
void
setHideSpeedStepSelector(boolean b)
void
setHideUndefinedFuncButt(boolean b)
void
setIgnoreThrottlePosition(boolean b)
void
setResizeWindow(boolean winImg)
void
setSaveThrottleOnLayoutSave(boolean b)
void
setSilentShare(boolean b)
void
setSilentSteal(boolean b)
void
setThrottlesKeyboardControls(ThrottlesPreferencesWindowKeyboardControls tpwkc)
Set the throttles keyboard controls preferencesvoid
setUseExThrottle(boolean exThrottle)
void
setUseLargeSpeedSlider(boolean b)
void
setUseRosterImage(boolean rosterImage)
void
setUsingFunctionIcon(boolean useFunctionIcon)
void
setUsingToolBar(boolean win4all)
void
setWindowDimension(java.awt.Dimension d)
org.jdom2.Element
store()
-
-
-
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.
-
-