Package 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 forsetup()
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
Fields Modifier and Type Field Description static String
CATEGORY_COMMUNITY_DETECTION
static String
CATEGORY_DYNAMIC
static String
CATEGORY_EDGE_OVERVIEW
static String
CATEGORY_NETWORK_OVERVIEW
static String
CATEGORY_NODE_OVERVIEW
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getCategory()
Returns the category of this metric.String
getDisplayName()
Returns this statistics display nameint
getPosition()
Returns a position value, around 1 and 1000, that indicates the position of the Statistics in the UI.JPanel
getSettingsPanel()
Returns a settings panel instance.String
getShortDescription()
Returns this statistics short descriptionClass<? extends Statistics>
getStatisticsClass()
Returns the statistics' class this UI belongs to.String
getValue()
Returns this statistics result as a String, if existsvoid
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 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 aftergetSettingsPanel
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.
-
getCategory
String getCategory()
Returns the category of this metric. Default category can be used, see Returns a custom String for defining a new category.CATEGORY_COMMUNITY_DETECTION
- 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
-
-