Class AdvancedPreference
- java.lang.Object
-
- org.openstreetmap.josm.gui.preferences.DefaultPreferenceSetting
-
- org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting
-
- org.openstreetmap.josm.gui.preferences.advanced.AdvancedPreference
-
- All Implemented Interfaces:
PreferenceSetting,TabPreferenceSetting
public final class AdvancedPreference extends DefaultTabPreferenceSetting
Advanced preferences, allowing to set preference entries directly.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classAdvancedPreference.EditBoundariesActionRequiresLogging.isDebugEnabled(), otherwise dataset is unloadedstatic classAdvancedPreference.FactoryFactory used to create a newAdvancedPreference.private classAdvancedPreference.ImportProfileActionprivate classAdvancedPreference.ResetPreferencesActionprivate static classAdvancedPreference.UnclearableOsmDataLayer
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<PrefEntry>allDataprivate java.util.Comparator<PrefEntry>customComparatorprivate java.util.List<PrefEntry>displayDataprivate java.util.Map<java.lang.String,java.lang.String>profileTypesprivate PreferencesTabletableprivate JosmTextFieldtxtFilter
-
Constructor Summary
Constructors Modifier Constructor Description privateAdvancedPreference()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGui(PreferenceTabbedPane gui)Add the GUI elements to the dialog.private voidapplyFilter()private static java.io.File[]askUserForCustomSettingsFiles(boolean saveFileFlag, java.lang.String title)private javax.swing.JPopupMenubuildPopupMenu()private voidexportSelectedToXML()java.lang.StringgetHelpContext()Returns the help context for this preferences settings tab.private javax.swing.JMenugetProfileMenu()booleanisExpert()Called to know if the preferences tab has only to be displayed in expert mode.booleanok()Called when OK is pressed to save the setting in the preferences file.private java.util.List<PrefEntry>prepareData(java.util.Map<java.lang.String,Setting<?>> loaded, java.util.Map<java.lang.String,Setting<?>> orig, java.util.Map<java.lang.String,Setting<?>> defaults)private voidreadPreferences(Preferences tmpPrefs)private voidreadPreferencesFromXML()-
Methods inherited from class org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting
addSubTab, addSubTab, canBeHidden, createPreferenceTabWithScrollPane, getDescription, getIconName, getSelectedSubTab, getSubTab, getTabPane, getTitle, getTooltip, registerSubTab, selectSubTab
-
Methods inherited from class org.openstreetmap.josm.gui.preferences.DefaultPreferenceSetting
saveBoolean, saveDouble, saveInt
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.gui.preferences.TabPreferenceSetting
getIcon
-
-
-
-
Field Detail
-
displayData
private final java.util.List<PrefEntry> displayData
-
txtFilter
private JosmTextField txtFilter
-
table
private PreferencesTable table
-
profileTypes
private final java.util.Map<java.lang.String,java.lang.String> profileTypes
-
customComparator
private final java.util.Comparator<PrefEntry> customComparator
-
-
Constructor Detail
-
AdvancedPreference
private AdvancedPreference()
-
-
Method Detail
-
isExpert
public boolean isExpert()
Description copied from interface:PreferenceSettingCalled to know if the preferences tab has only to be displayed in expert mode.- Specified by:
isExpertin interfacePreferenceSetting- Overrides:
isExpertin classDefaultPreferenceSetting- Returns:
- true if the tab has only to be displayed in expert mode, false otherwise.
-
addGui
public void addGui(PreferenceTabbedPane gui)
Description copied from interface:PreferenceSettingAdd the GUI elements to the dialog. The elements should be initialized after the current preferences.- Parameters:
gui- the preferences tab pane
-
readPreferences
private void readPreferences(Preferences tmpPrefs)
-
askUserForCustomSettingsFiles
private static java.io.File[] askUserForCustomSettingsFiles(boolean saveFileFlag, java.lang.String title)
-
exportSelectedToXML
private void exportSelectedToXML()
-
readPreferencesFromXML
private void readPreferencesFromXML()
-
prepareData
private java.util.List<PrefEntry> prepareData(java.util.Map<java.lang.String,Setting<?>> loaded, java.util.Map<java.lang.String,Setting<?>> orig, java.util.Map<java.lang.String,Setting<?>> defaults)
-
buildPopupMenu
private javax.swing.JPopupMenu buildPopupMenu()
-
getProfileMenu
private javax.swing.JMenu getProfileMenu()
-
applyFilter
private void applyFilter()
-
ok
public boolean ok()
Description copied from interface:PreferenceSettingCalled when OK is pressed to save the setting in the preferences file. Return true when restart is required.- Returns:
trueif restart is required
-
getHelpContext
public java.lang.String getHelpContext()
Description copied from interface:TabPreferenceSettingReturns the help context for this preferences settings tab.- Specified by:
getHelpContextin interfaceTabPreferenceSetting- Overrides:
getHelpContextin classDefaultTabPreferenceSetting- Returns:
- the help context for this preferences settings tab
-
-