Interface ImporterUI


  • public interface ImporterUI
    Define importer settings user interface.

    Declared in the system as services (i.e. singleton), the role of UI classes is to provide user interface to configure importers and remember last used settings if needed.

    To be recognized by the system, implementations must just add the following annotation:

    @ServiceProvider(service=ImporterUI.class)
    Author:
    Mathieu Bastian
    See Also:
    Importer
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  ImporterUI.WithWizard
      Optional interface to implement for ImporterUI classes that need a Wizard
    • Method Detail

      • setup

        void setup​(Importer[] importers)
        Link the UI to the importers and therefore to settings values. This method is called after getPanel() to push settings.
        Parameters:
        importers - the importers that settings is to be set
      • getPanel

        JPanel getPanel()
        Returns the importer settings panel.
        Returns:
        a settings panel, or null
      • unsetup

        void unsetup​(boolean update)
        Notify UI the settings panel has been closed and that new values can be written.
        Parameters:
        update - true if user clicked OK or false if CANCEL.
      • getDisplayName

        String getDisplayName()
        Returns the importer display name
        Returns:
        the importer display name
      • isUIForImporter

        boolean isUIForImporter​(Importer importer)
        Returns true if this UI belongs to the given importer.
        Parameters:
        importer - the importer that has to be tested
        Returns:
        true if the UI is matching with importer, false otherwise.