Interface StatisticsUI


  • public interface StatisticsUI
    Statistics and Metrics UI integration information. Implement this interface for defining a new metric in the user interface.

    One could define multiple StatisticsUI that relies on a single algorithm. StatisticsUIs therefore exist in the system alone, and wait for setup() method to be called to turn on with a compatible Statistics instance.

    Implementors must add @ServiceProvider annotation to be found by the system.

    Author:
    Patrick J. McSweeney
    See Also:
    StatisticsBuilder
    • Field Detail

      • CATEGORY_NETWORK_OVERVIEW

        static final String CATEGORY_NETWORK_OVERVIEW
      • CATEGORY_COMMUNITY_DETECTION

        static final String CATEGORY_COMMUNITY_DETECTION
      • CATEGORY_NODE_OVERVIEW

        static final String CATEGORY_NODE_OVERVIEW
      • CATEGORY_EDGE_OVERVIEW

        static final String CATEGORY_EDGE_OVERVIEW
      • CATEGORY_DYNAMIC

        static final String CATEGORY_DYNAMIC
    • Method Detail

      • getSettingsPanel

        JPanel getSettingsPanel()
        Returns a settings panel instance.
        Returns:
        a settings panel instance
      • setup

        void setup​(Statistics statistics)
        Push a statistics instance to the UI to load its settings. Note that this method is always called after getSettingsPanel and before the panel is displayed.
        Parameters:
        statistics - the statistics instance that is linked to the UI
      • unsetup

        void unsetup()
        Notify the settings panel has been closed and that the settings values can be saved to the statistics instance.
      • getStatisticsClass

        Class<? extends Statistics> getStatisticsClass()
        Returns the statistics' class this UI belongs to.
        Returns:
        the statistics' class this UI belongs to
      • getValue

        String getValue()
        Returns this statistics result as a String, if exists
        Returns:
        this statistics' result string
      • getDisplayName

        String getDisplayName()
        Returns this statistics display name
        Returns:
        this statistics' display name.
      • getShortDescription

        String getShortDescription()
        Returns this statistics short description
        Returns:
        this statistics' short description.
      Returns a custom String for defining a new category.
Returns:
this statistics' category