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)
    • 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 title,
                           int messageType)
      • 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:
        true if a mapcontext is supported.
      • getWorldPoint

        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

        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 HashMap of 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 HashMap of 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 a JComponent inside a window.
        Parameters:
        component - the component to show.
        windowTitle -