Gephi Toolkit Javadoc

org.gephi.statistics.spi
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 Summary
static java.lang.String CATEGORY_DYNAMIC
           
static java.lang.String CATEGORY_EDGE_OVERVIEW
           
static java.lang.String CATEGORY_NETWORK_OVERVIEW
           
static java.lang.String CATEGORY_NODE_OVERVIEW
           
 
Method Summary
 java.lang.String getCategory()
          Returns the category of this metric.
 java.lang.String getDisplayName()
          Returns this statistics display name
 int getPosition()
          Returns a position value, around 1 and 1000, that indicates the position of the Statistics in the UI.
 javax.swing.JPanel getSettingsPanel()
          Returns a settings panel instance.
 java.lang.Class<? extends Statistics> getStatisticsClass()
          Returns the statistics' class this UI belongs to.
 java.lang.String getValue()
          Returns this statistics result as a String, if exists
 void setup(Statistics statistics)
          Push a statistics instance to the UI to load its settings.
 void unsetup()
          Notify the settings panel has been closed and that the settings values can be saved to the statistics instance.
 

Field Detail

CATEGORY_NETWORK_OVERVIEW

static final java.lang.String CATEGORY_NETWORK_OVERVIEW

CATEGORY_NODE_OVERVIEW

static final java.lang.String CATEGORY_NODE_OVERVIEW

CATEGORY_EDGE_OVERVIEW

static final java.lang.String CATEGORY_EDGE_OVERVIEW

CATEGORY_DYNAMIC

static final java.lang.String CATEGORY_DYNAMIC
Method Detail

getSettingsPanel

javax.swing.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

java.lang.Class<? extends Statistics> getStatisticsClass()
Returns the statistics' class this UI belongs to.

Returns:
the statistics' class this UI belongs to

getValue

java.lang.String getValue()
Returns this statistics result as a String, if exists

Returns:
this statistics' result string

getDisplayName

java.lang.String getDisplayName()
Returns this statistics display name

Returns:
this statistics' display name.

getCategory

java.lang.String getCategory()
Returns the category of this metric. Default category can be used, see Returns a custom String for defining a new category.

Returns:
this statistics' category

getPosition

int getPosition()
Returns a position value, around 1 and 1000, that indicates the position of the Statistics in the UI. Less means upper.

Returns:
this statistics' position value

Gephi Toolkit Javadoc