Package org.gephi.desktop.statistics
Class StatisticsModelUIImpl
- java.lang.Object
-
- org.gephi.desktop.statistics.StatisticsModelUIImpl
-
- All Implemented Interfaces:
StatisticsModelUI
public class StatisticsModelUIImpl extends Object implements StatisticsModelUI
- Author:
- Mathieu Bastian
-
-
Field Summary
Fields Modifier and Type Field Description private List<org.gephi.statistics.spi.StatisticsUI>invisibleListprivate List<ChangeListener>listenersprivate Map<org.gephi.statistics.spi.StatisticsUI,String>resultMapprivate List<org.gephi.statistics.spi.Statistics>runningListprivate org.gephi.project.api.Workspaceworkspace
-
Constructor Summary
Constructors Constructor Description StatisticsModelUIImpl(org.gephi.project.api.Workspace workspace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChangeListener(ChangeListener changeListener)voidaddResult(org.gephi.statistics.spi.StatisticsUI ui)voidfireChangeEvent()StringgetReport(Class<? extends org.gephi.statistics.spi.Statistics> statistics)Returns the report for the given statistics class ornullif no report exists for this statistics.StringgetResult(org.gephi.statistics.spi.StatisticsUI statisticsUI)Returns the result string for the givenStatisticsUIclass ornullif no result string exists for this statistics.org.gephi.statistics.spi.StatisticsgetRunning(org.gephi.statistics.spi.StatisticsUI statisticsUI)Returns theStatisticsinstance currently running for the particularStatisticsUIregistered ornullif the statistics is not running.org.gephi.project.api.WorkspacegetWorkspace()booleanisRunning(org.gephi.statistics.spi.StatisticsUI statisticsUI)Returnstrueif the UI is in running state,falseotherwise.booleanisStatisticsUIVisible(org.gephi.statistics.spi.StatisticsUI statisticsUI)Returnstrueif the statistics front-end is visible,falseotherwise.voidreadXML(XMLStreamReader reader)voidremoveChangeListener(ChangeListener changeListener)voidsetRunning(org.gephi.statistics.spi.Statistics statistics, boolean running)voidsetVisible(org.gephi.statistics.spi.StatisticsUI statisticsUI, boolean visible)voidwriteXML(XMLStreamWriter writer)
-
-
-
Field Detail
-
workspace
private final org.gephi.project.api.Workspace workspace
-
invisibleList
private final List<org.gephi.statistics.spi.StatisticsUI> invisibleList
-
runningList
private final List<org.gephi.statistics.spi.Statistics> runningList
-
listeners
private final List<ChangeListener> listeners
-
-
Method Detail
-
addResult
public void addResult(org.gephi.statistics.spi.StatisticsUI ui)
-
getResult
public String getResult(org.gephi.statistics.spi.StatisticsUI statisticsUI)
Description copied from interface:StatisticsModelUIReturns the result string for the givenStatisticsUIclass ornullif no result string exists for this statistics.- Specified by:
getResultin interfaceStatisticsModelUI- Parameters:
statisticsUI- a statisticsUI class- Returns:
- the result or
nullif not found
-
getReport
public String getReport(Class<? extends org.gephi.statistics.spi.Statistics> statistics)
Description copied from interface:StatisticsModelUIReturns the report for the given statistics class ornullif no report exists for this statistics.- Specified by:
getReportin interfaceStatisticsModelUI- Parameters:
statistics- a statistics class- Returns:
- the report or
nullif not found
-
isStatisticsUIVisible
public boolean isStatisticsUIVisible(org.gephi.statistics.spi.StatisticsUI statisticsUI)
Description copied from interface:StatisticsModelUIReturnstrueif the statistics front-end is visible,falseotherwise.- Specified by:
isStatisticsUIVisiblein interfaceStatisticsModelUI- Parameters:
statisticsUI- an UI instance- Returns:
trueif the statistics front-end is visible,falseotherwise
-
isRunning
public boolean isRunning(org.gephi.statistics.spi.StatisticsUI statisticsUI)
Description copied from interface:StatisticsModelUIReturnstrueif the UI is in running state,falseotherwise.- Specified by:
isRunningin interfaceStatisticsModelUI- Parameters:
statisticsUI- an UI instance- Returns:
trueif the statistics is running,falseotherwise
-
setRunning
public void setRunning(org.gephi.statistics.spi.Statistics statistics, boolean running)
-
getRunning
public org.gephi.statistics.spi.Statistics getRunning(org.gephi.statistics.spi.StatisticsUI statisticsUI)
Description copied from interface:StatisticsModelUIReturns theStatisticsinstance currently running for the particularStatisticsUIregistered ornullif the statistics is not running.- Specified by:
getRunningin interfaceStatisticsModelUI- Parameters:
statisticsUI- an UI instance- Returns:
- the statistics instance if it is running, or
nullif not running
-
setVisible
public void setVisible(org.gephi.statistics.spi.StatisticsUI statisticsUI, boolean visible)
-
addChangeListener
public void addChangeListener(ChangeListener changeListener)
- Specified by:
addChangeListenerin interfaceStatisticsModelUI
-
removeChangeListener
public void removeChangeListener(ChangeListener changeListener)
- Specified by:
removeChangeListenerin interfaceStatisticsModelUI
-
fireChangeEvent
public void fireChangeEvent()
-
getWorkspace
public org.gephi.project.api.Workspace getWorkspace()
-
writeXML
public void writeXML(XMLStreamWriter writer) throws XMLStreamException
- Throws:
XMLStreamException
-
readXML
public void readXML(XMLStreamReader reader) throws XMLStreamException
- Throws:
XMLStreamException
-
-