Class MapPaintPreference
- java.lang.Object
-
- org.openstreetmap.josm.gui.preferences.DefaultPreferenceSetting
-
- org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting
-
- org.openstreetmap.josm.gui.preferences.map.MapPaintPreference
-
- All Implemented Interfaces:
PreferenceSetting,TabPreferenceSetting
public class MapPaintPreference extends DefaultTabPreferenceSetting
Preference settings for map paint styles.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMapPaintPreference.FactoryFactory used to create a newMapPaintPreference.(package private) static classMapPaintPreference.MapPaintSourceEditor
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JCheckBoxenableIconDefaultprivate SourceEditorsourcesprivate static java.util.List<SourceProvider>styleSourceProviders
-
Constructor Summary
Constructors Constructor Description MapPaintPreference()
-
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.java.lang.StringgetHelpContext()Returns the help context for this preferences settings tab.static java.lang.StringgetTitleFromSourceEntry(SourceEntry entry)Returns title from a source entry.static voidinitialize()Initialize the stylesbooleanisExpert()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.static booleanregisterSourceProvider(SourceProvider provider)Registers a new additional style source provider.-
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
-
sources
private SourceEditor sources
-
enableIconDefault
private javax.swing.JCheckBox enableIconDefault
-
styleSourceProviders
private static final java.util.List<SourceProvider> styleSourceProviders
-
-
Constructor Detail
-
MapPaintPreference
MapPaintPreference()
-
-
Method Detail
-
registerSourceProvider
public static boolean registerSourceProvider(SourceProvider provider)
Registers a new additional style source provider.- Parameters:
provider- The style source provider- Returns:
true, if the provider has been added,falseotherwise
-
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
-
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
-
getTitleFromSourceEntry
public static java.lang.String getTitleFromSourceEntry(SourceEntry entry)
Returns title from a source entry.- Parameters:
entry- source entry- Returns:
- title
- See Also:
SourceEntry.title
-
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
-
initialize
public static void initialize()
Initialize the styles
-
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.
-
-