public class OverpassServerPreference extends Object implements SubPreferenceSetting
Modifier and Type | Class and Description |
---|---|
static class |
OverpassServerPreference.Factory
Factory used to create a new
OverpassServerPreference . |
Modifier and Type | Field and Description |
---|---|
private static BooleanProperty |
FOR_MULTI_FETCH |
private JCheckBox |
forMultiFetch |
private static StringProperty |
OVERPASS_SERVER |
private static CollectionProperty |
OVERPASS_SERVER_HISTORY |
private HistoryComboBox |
overpassServer |
Constructor and Description |
---|
OverpassServerPreference() |
Modifier and Type | Method and Description |
---|---|
void |
addGui(PreferenceTabbedPane gui)
Add the GUI elements to the dialog.
|
static String |
getOverpassServer()
Returns the URL of the currently selected Overpass server.
|
TabPreferenceSetting |
getTabPreferenceSetting(PreferenceTabbedPane gui)
Returns the preference setting (displayed in the specified preferences tab pane) that contains this preference setting.
|
boolean |
isExpert()
Called to know if the preferences tab has only to be displayed in expert mode.
|
boolean |
ok()
Called when OK is pressed to save the setting in the preferences file.
|
static boolean |
useForMultiFetch()
Returns true if objects should be fetched from an Overpass server instead of the OSM API.
|
private static final StringProperty OVERPASS_SERVER
private static final CollectionProperty OVERPASS_SERVER_HISTORY
private static final BooleanProperty FOR_MULTI_FETCH
private HistoryComboBox overpassServer
private final JCheckBox forMultiFetch
public OverpassServerPreference()
public TabPreferenceSetting getTabPreferenceSetting(PreferenceTabbedPane gui)
SubPreferenceSetting
getTabPreferenceSetting
in interface SubPreferenceSetting
gui
- preferences tabbed panepublic void addGui(PreferenceTabbedPane gui)
PreferenceSetting
addGui
in interface PreferenceSetting
gui
- the preferences tab panepublic boolean ok()
PreferenceSetting
ok
in interface PreferenceSetting
true
if restart is requiredpublic boolean isExpert()
PreferenceSetting
isExpert
in interface PreferenceSetting
public static String getOverpassServer()
public static boolean useForMultiFetch()