Interface GuiBridgeHandler

All Known Implementing Classes:
DefaultGuiBridgeImpl

public interface GuiBridgeHandler
A 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 java.lang.String DEBUG_KEY  
    static java.lang.String GEOPAPARAZZI_PREFERENCES_KEY  
    static java.lang.String HEAP_KEY  
    static java.lang.String LAST_GP_PROJECTS_PATH  
    static java.lang.String SPATIAL_TOOLBOX_PREFERENCES_KEY  
  • Method Summary

    Modifier and Type Method Description
    java.util.HashMap<java.lang.String,​java.lang.String> getGeopaparazziProjectViewerPreferencesMap()
    Get the map of user preferences.
    java.io.File getLibsFolder()
    Get the folder inside which the libraries to browse are contained.
    java.util.HashMap<java.lang.String,​java.lang.String> getSpatialToolboxPreferencesMap()
    Get the map of user preferences.
    java.awt.geom.Point2D getWorldPoint​(int x, int y)
    Get the world Point2D from and screen pixel x/y (ex.
    void messageDialog​(java.lang.String message, java.lang.String[] messageArgs, java.lang.String title, int messageType)  
    void messageDialog​(java.lang.String message, java.lang.String title, int messageType)  
    java.lang.String promptForCrs()
    Open a dialog to prompt for a CRS.
    void setGeopaparazziProjectViewerPreferencesMap​(java.util.HashMap<java.lang.String,​java.lang.String> prefsMap)
    Save SpatialToolbox preferences map.
    void setLibsFolder​(java.io.File libsFolder)  
    void setSpatialToolboxPreferencesMap​(java.util.HashMap<java.lang.String,​java.lang.String> prefsMap)
    Save SpatialToolbox preferences map.
    java.io.File[] showOpenDirectoryDialog​(java.lang.String title, java.io.File initialPath)
    Open a directory selection dialog.
    java.io.File[] showOpenFileDialog​(java.lang.String title, java.io.File initialPath, javax.swing.filechooser.FileFilter filter)
    Open an open file dialog.
    java.io.File[] showSaveFileDialog​(java.lang.String title, java.io.File initialPath, javax.swing.filechooser.FileFilter filter)
    Open a save file dialog.
    javax.swing.JFrame showWindow​(javax.swing.JComponent component, java.lang.String windowTitle)
    Show a JComponent inside a window.
    boolean supportsMapContext()
    A check to see if this handler supports a map context.
  • Field Details

  • Method Details

    • showOpenDirectoryDialog

      java.io.File[] showOpenDirectoryDialog​(java.lang.String title, java.io.File initialPath)
      Open a directory selection dialog.
      Parameters:
      title -
      initialPath -
      Returns:
    • showOpenFileDialog

      java.io.File[] showOpenFileDialog​(java.lang.String title, java.io.File initialPath, javax.swing.filechooser.FileFilter filter)
      Open an open file dialog.
      Parameters:
      title -
      initialPath -
      Returns:
    • showSaveFileDialog

      java.io.File[] showSaveFileDialog​(java.lang.String title, java.io.File initialPath, javax.swing.filechooser.FileFilter filter)
      Open a save file dialog.
      Parameters:
      title -
      initialPath -
      Returns:
    • messageDialog

      void messageDialog​(java.lang.String message, java.lang.String title, int messageType)
    • messageDialog

      void messageDialog​(java.lang.String message, java.lang.String[] messageArgs, java.lang.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:
      true if a mapcontext is supported.
    • getWorldPoint

      java.awt.geom.Point2D getWorldPoint​(int x, int y)
      Get the world Point2D from 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

      java.lang.String promptForCrs()
      Open a dialog to prompt for a CRS.
      Returns:
      the selected epsg code or null.
    • getSpatialToolboxPreferencesMap

      java.util.HashMap<java.lang.String,​java.lang.String> getSpatialToolboxPreferencesMap()
      Get the map of user preferences.
      Returns:
      the HashMap of preferences.
    • setSpatialToolboxPreferencesMap

      void setSpatialToolboxPreferencesMap​(java.util.HashMap<java.lang.String,​java.lang.String> prefsMap)
      Save SpatialToolbox preferences map.
      Parameters:
      prefsMap -
    • getGeopaparazziProjectViewerPreferencesMap

      java.util.HashMap<java.lang.String,​java.lang.String> getGeopaparazziProjectViewerPreferencesMap()
      Get the map of user preferences.
      Returns:
      the HashMap of preferences.
    • setGeopaparazziProjectViewerPreferencesMap

      void setGeopaparazziProjectViewerPreferencesMap​(java.util.HashMap<java.lang.String,​java.lang.String> prefsMap)
      Save SpatialToolbox preferences map.
      Parameters:
      prefsMap -
    • getLibsFolder

      java.io.File getLibsFolder()
      Get the folder inside which the libraries to browse are contained.
      Returns:
      the file to the libraries folder.
    • setLibsFolder

      void setLibsFolder​(java.io.File libsFolder)
      Parameters:
      libsFolder -
    • showWindow

      javax.swing.JFrame showWindow​(javax.swing.JComponent component, java.lang.String windowTitle)
      Show a JComponent inside a window.
      Parameters:
      component - the component to show.
      windowTitle -