Interface ProjectionChoice

    • Method Detail

      • getId

        String getId()
        Get a unique id for the projection choice. Will be used to save the user selection to the preference file.
        Returns:
        the string identifier
      • setPreferences

        void setPreferences​(Collection<String> args)
        Set the internal state to match the preferences. Will be called before getPreferencePanel and when the listener from getPreferencePanel is invoked.
        Parameters:
        args - preferences as a list of strings; may be null to reset everything.
      • getProjection

        Projection getProjection()
        Get the projection that matches the internal state.
        Returns:
        the effective projection
      • getPreferencePanel

        JPanel getPreferencePanel​(ActionListener listener)
        Generate and provide the GUI. It will be displayed to the user. Call the listener, when the user makes changes in the GUI, so the projection info in the top panel gets updated.
        Parameters:
        listener - listener for any change of preferences
        Returns:
        the GUI panel
      • allCodes

        String[] allCodes()
        Return all projection codes supported by this projection choice.
        Returns:
        all supported projection codes
      • getPreferencesFromCode

        Collection<StringgetPreferencesFromCode​(String code)
        Get Preferences from projection code.
        Parameters:
        code - projection code
        Returns:
        null when code is not part of this projection choice. An empty Collection as return value indicates, that the code is supported, but no preferences are required to set it up.
      • toString

        String toString()
        Short name of the projection choice as shown in the GUI (combo box).
        Overrides:
        toString in class Object
        Returns:
        the name