Package org.hortonmachine.gui.utils
Interface GuiBridgeHandler
-
- All Known Implementing Classes:
DefaultGuiBridgeImpl
public interface GuiBridgeHandlerA class to help to bridge with extenral softwares.Implementing apps need to create the wrapper for this bridge
.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEBUG_KEYstatic StringGEOPAPARAZZI_PREFERENCES_KEYstatic StringHEAP_KEYstatic StringLAST_GP_PROJECTS_PATHstatic StringSPATIAL_TOOLBOX_PREFERENCES_KEY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HashMap<String,String>getGeopaparazziProjectViewerPreferencesMap()Get the map of user preferences.FilegetLibsFolder()Get the folder inside which the libraries to browse are contained.HashMap<String,String>getSpatialToolboxPreferencesMap()Get the map of user preferences.Point2DgetWorldPoint(int x, int y)Get the worldPoint2Dfrom and screen pixel x/y (ex.voidmessageDialog(String message, String[] messageArgs, String title, int messageType)voidmessageDialog(String message, String title, int messageType)StringpromptForCrs()Open a dialog to prompt for a CRS.voidsetGeopaparazziProjectViewerPreferencesMap(HashMap<String,String> prefsMap)Save SpatialToolbox preferences map.voidsetLibsFolder(File libsFolder)voidsetSpatialToolboxPreferencesMap(HashMap<String,String> prefsMap)Save SpatialToolbox preferences map.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.JFrameshowWindow(JComponent component, String windowTitle)Show aJComponentinside a window.booleansupportsMapContext()A check to see if this handler supports a map context.
-
-
-
Field Detail
-
SPATIAL_TOOLBOX_PREFERENCES_KEY
static final String SPATIAL_TOOLBOX_PREFERENCES_KEY
- See Also:
- Constant Field Values
-
GEOPAPARAZZI_PREFERENCES_KEY
static final String GEOPAPARAZZI_PREFERENCES_KEY
- See Also:
- Constant Field Values
-
HEAP_KEY
static final String HEAP_KEY
- See Also:
- Constant Field Values
-
DEBUG_KEY
static final String DEBUG_KEY
- See Also:
- Constant Field Values
-
LAST_GP_PROJECTS_PATH
static final String LAST_GP_PROJECTS_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
showOpenDirectoryDialog
File[] showOpenDirectoryDialog(String title, File initialPath)
Open a directory selection dialog.- Parameters:
title-initialPath-- Returns:
-
showOpenFileDialog
File[] showOpenFileDialog(String title, File initialPath, FileFilter filter)
Open an open file dialog.- Parameters:
title-initialPath-- Returns:
-
showSaveFileDialog
File[] showSaveFileDialog(String title, File initialPath, FileFilter filter)
Open a save file dialog.- Parameters:
title-initialPath-- Returns:
-
messageDialog
void messageDialog(String message, String[] messageArgs, String title, int messageType)
-
supportsMapContext
boolean supportsMapContext()
A check to see if this handler supports a map context.This also defines if conversion between screen and world coordinates and prompting for a crs are supported.
- Returns:
trueif a mapcontext is supported.
-
getWorldPoint
Point2D getWorldPoint(int x, int y)
Get the worldPoint2Dfrom and screen pixel x/y (ex. coming from a mouse event).- Parameters:
x- the screen X.y- the screen Y.- Returns:
- the world position or
null.
-
promptForCrs
String promptForCrs()
Open a dialog to prompt for a CRS.- Returns:
- the selected epsg code or
null.
-
getSpatialToolboxPreferencesMap
HashMap<String,String> getSpatialToolboxPreferencesMap()
Get the map of user preferences.- Returns:
- the
HashMapof preferences.
-
setSpatialToolboxPreferencesMap
void setSpatialToolboxPreferencesMap(HashMap<String,String> prefsMap)
Save SpatialToolbox preferences map.- Parameters:
prefsMap-
-
getGeopaparazziProjectViewerPreferencesMap
HashMap<String,String> getGeopaparazziProjectViewerPreferencesMap()
Get the map of user preferences.- Returns:
- the
HashMapof preferences.
-
setGeopaparazziProjectViewerPreferencesMap
void setGeopaparazziProjectViewerPreferencesMap(HashMap<String,String> prefsMap)
Save SpatialToolbox preferences map.- Parameters:
prefsMap-
-
getLibsFolder
File getLibsFolder()
Get the folder inside which the libraries to browse are contained.- Returns:
- the file to the libraries folder.
-
setLibsFolder
void setLibsFolder(File libsFolder)
- Parameters:
libsFolder-
-
showWindow
JFrame showWindow(JComponent component, String windowTitle)
Show aJComponentinside a window.- Parameters:
component- the component to show.windowTitle-
-
-