Interface ProcessorUI


  • public interface ProcessorUI
    Define processor settings user interface.

    Declared in the system as services (i.e. singleton), the role of UI classes is to provide user interface to configure processors and remember last used settings if needed. User interface for processors are shown when the import report is closed and can access the container before the process started.

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

    @ServiceProvider(service=ProcessorUI.class)
    Author:
    Mathieu Bastian
    See Also:
    Processor
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      JPanel getPanel()
      Returns the processor settings panel.
      boolean isUIFoProcessor​(Processor processor)
      Returns true if this UI belongs to the given processor.
      boolean isValid​(Container[] containers)
      Returns true if the processor this UI represents is valid for containers.
      void setup​(Processor processor)
      Link the UI to the processor and therefore to settings values.
      void unsetup()
      Notify UI the settings panel has been closed and that new values can be written.
    • Method Detail

      • setup

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

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

        void unsetup()
        Notify UI the settings panel has been closed and that new values can be written.
      • isUIFoProcessor

        boolean isUIFoProcessor​(Processor processor)
        Returns true if this UI belongs to the given processor.
        Parameters:
        processor - the processor that has to be tested
        Returns:
        true if the UI is matching with processor, false otherwise.
      • isValid

        boolean isValid​(Container[] containers)
        Returns true if the processor this UI represents is valid for containers. Processors could be specific to some type of data and this method can provide this information.
        Parameters:
        containers - containers that are to be processed
        Returns:
        true if the processor this UI represents is valid for containers.