public class DefaultGuiBridgeImpl extends Object implements GuiBridgeHandler
GuiBridgeHandler.DEBUG_KEY, GEOPAPARAZZI_PREFERENCES_KEY, HEAP_KEY, LAST_GP_PROJECTS_PATH, PREFS_NODE_NAME, SPATIAL_TOOLBOX_PREFERENCES_KEY| Constructor and Description |
|---|
DefaultGuiBridgeImpl() |
DefaultGuiBridgeImpl(Component rootComponent) |
| Modifier and Type | Method and Description |
|---|---|
int |
confirmDialog(String message,
String title,
int optionType,
int messageType) |
HashMap<String,String> |
getGeopaparazziProjectViewerPreferencesMap()
Get the map of user preferences.
|
File |
getLibsFolder()
Get the folder inside which the libraries to browse are contained.
|
protected Component |
getRootComponent() |
HashMap<String,String> |
getSpatialToolboxPreferencesMap()
Get the map of user preferences.
|
Point2D |
getWorldPoint(int x,
int y)
Get the world
Point2D from and screen pixel x/y (ex. |
String |
inputDialog(String message,
String title) |
String |
inputDialog(String message,
String title,
int messageType,
String initialValue) |
void |
messageDialog(String message,
String[] messageArgs,
String title,
int messageType) |
void |
messageDialog(String message,
String title,
int messageType) |
String |
promptForCrs()
Open a dialog to prompt for a CRS.
|
void |
setGeopaparazziProjectViewerPreferencesMap(HashMap<String,String> prefsMap)
Save SpatialToolbox preferences map.
|
void |
setLibsFolder(File libsFolder) |
void |
setSpatialToolboxPreferencesMap(HashMap<String,String> prefsMap)
Save SpatialToolbox preferences map.
|
File[] |
showChooserDialog(String title,
int type,
int selectionMode,
boolean multiselection,
File initialPath,
FileFilter filter,
boolean fileHidingEnabled) |
File[] |
showOpenDirectoryDialog(String title,
File initialPath)
Open a directory selection dialog.
|
File[] |
showOpenFileDialog(String title,
File initialPath,
FileFilter filter)
Open an open file dialog.
|
File[] |
showSaveFileDialog(String title,
File initialPath,
FileFilter filter)
Open a save file dialog.
|
JFrame |
showWindow(JComponent component,
String windowTitle)
Show a
JComponent inside a window. |
boolean |
supportsMapContext()
A check to see if this handler supports a map context.
|
public DefaultGuiBridgeImpl()
public DefaultGuiBridgeImpl(Component rootComponent)
protected Component getRootComponent()
public int confirmDialog(String message, String title, int optionType, int messageType)
public String inputDialog(String message, String title, int messageType, String initialValue)
public void messageDialog(String message, String title, int messageType)
messageDialog in interface GuiBridgeHandlerpublic void messageDialog(String message, String[] messageArgs, String title, int messageType)
messageDialog in interface GuiBridgeHandlerpublic File[] showChooserDialog(String title, int type, int selectionMode, boolean multiselection, File initialPath, FileFilter filter, boolean fileHidingEnabled)
public File[] showOpenDirectoryDialog(String title, File initialPath)
GuiBridgeHandlershowOpenDirectoryDialog in interface GuiBridgeHandlerpublic File[] showOpenFileDialog(String title, File initialPath, FileFilter filter)
GuiBridgeHandlershowOpenFileDialog in interface GuiBridgeHandlerpublic File[] showSaveFileDialog(String title, File initialPath, FileFilter filter)
GuiBridgeHandlershowSaveFileDialog in interface GuiBridgeHandlerpublic Point2D getWorldPoint(int x, int y)
GuiBridgeHandlerPoint2D from and screen pixel x/y (ex. coming from a mouse event).getWorldPoint in interface GuiBridgeHandlerx - the screen X.y - the screen Y.null.public String promptForCrs()
GuiBridgeHandlerpromptForCrs in interface GuiBridgeHandlernull.public boolean supportsMapContext()
GuiBridgeHandlerThis also defines if conversion between screen and world coordinates and prompting for a crs are supported.
supportsMapContext in interface GuiBridgeHandlertrue if a mapcontext is supported.public HashMap<String,String> getSpatialToolboxPreferencesMap()
GuiBridgeHandlergetSpatialToolboxPreferencesMap in interface GuiBridgeHandlerHashMap of preferences.public void setSpatialToolboxPreferencesMap(HashMap<String,String> prefsMap)
GuiBridgeHandlersetSpatialToolboxPreferencesMap in interface GuiBridgeHandlerpublic HashMap<String,String> getGeopaparazziProjectViewerPreferencesMap()
GuiBridgeHandlergetGeopaparazziProjectViewerPreferencesMap in interface GuiBridgeHandlerHashMap of preferences.public void setGeopaparazziProjectViewerPreferencesMap(HashMap<String,String> prefsMap)
GuiBridgeHandlersetGeopaparazziProjectViewerPreferencesMap in interface GuiBridgeHandlerpublic void setLibsFolder(File libsFolder)
setLibsFolder in interface GuiBridgeHandlerpublic File getLibsFolder()
GuiBridgeHandlergetLibsFolder in interface GuiBridgeHandlerpublic JFrame showWindow(JComponent component, String windowTitle)
GuiBridgeHandlerJComponent inside a window.showWindow in interface GuiBridgeHandlercomponent - the component to show.Copyright © 2005-2019 HydroloGIS. All Rights Reserved.