org.keridwen.modelling.monitoring.model
Class AbstractMonitoringModel

java.lang.Object
  extended by org.jdesktop.swingx.treetable.AbstractTreeTableModel
      extended by org.jdesktop.swingx.treetable.DefaultTreeTableModel
          extended by org.keridwen.modelling.monitoring.model.AbstractMonitoringModel
All Implemented Interfaces:
Iterable<CategoryMonitoringNode>, TreeModel, org.jdesktop.swingx.treetable.TreeTableModel, MonitoringModel
Direct Known Subclasses:
DataMiningMonitoringModel, LiveMonitoringModel

public abstract class AbstractMonitoringModel
extends org.jdesktop.swingx.treetable.DefaultTreeTableModel
implements MonitoringModel

This abstract class is the model used to monitor simulation in real time to know informations about convergence parameters.


Field Summary
 
Fields inherited from class org.jdesktop.swingx.treetable.DefaultTreeTableModel
columnIdentifiers
 
Fields inherited from class org.jdesktop.swingx.treetable.AbstractTreeTableModel
modelSupport
 
Constructor Summary
AbstractMonitoringModel()
          Constructor of AbstractMonitoringModel.
 
Method Summary
 void addCategoryMonitoringNode(CategoryMonitoringNode currentNode)
          Add a category node in the monitoring model.
 void addChartViewerConfigurationListener(ChartViewerConfigurationListener chartViewerConfigurationListener)
          Add a ChartViewerConfigurationListener which listen the model.
 void addModelListener(MonitoringModelListener listener)
          Add an object which listen the monitoring model.
 void addNewCurves(MonitoringNode monitoringNode, String visualizerName, String curveName, String xUnitName, String yUnitName, String zUnitName, String chartTitle, String tabTitle)
          Add a new curve to the MonitoringModelListeners stored in this AbstractMonitoringModel.
 void addVisualizer(Visualizer visualizer)
          Add the visualizer(which displays the curves, spectrograms, ...) to the current perspective.
 void addVisualizerListener(Visualizer listener)
          Add an object which listen the monitoring model.
 void clearModel()
          Clear the MonitoringModel.
 void exportAll()
          Export all MonitoringNode contains in MonitoringModel.
protected  List<CategoryMonitoringNode> getCategoryMonitoringNodeList()
           
 int getLastCurveId()
           
 Map<URI,com.artenum.penelope.mesh.interfaces.Mesh> getMeshMap()
           
protected  List<MonitoringModelListener> getMonitoringModelListenerList()
           
 List<MonitoringNode> getSelectedMonitoringNodes()
           
protected  List<Visualizer> getVisualizerListenerList()
           
 Iterator<CategoryMonitoringNode> iterator()
           
 void notifyLastMeasuresRemoved()
          Notify the last measures recorded must be removed.
 void notifyMeasuresCleaned()
          Re-initialize all measures considered like last measures.
 void notifyModelChanged()
          Notify the model changed (add/removed node, ...).
 void notifyNewCurveAdded(MonitoringNode monitoringNode)
          Notify a new curve has been added to the mode.
 void notifyNewMeasure(int curveId, double time, double doubleValue, String curveName, MonitoringNode monitoringNode, String xUnitName, String yUnitName)
          Notify all listeners, a new measure is done.
 void notifyVisibilityChanged(MonitoringNode monitoringNode, boolean visibility)
          Notify the visibility of a node has been changed.
 void removeCategoryMonitoringNode(CategoryMonitoringNode categoryMonitoringNode)
           
 boolean removeMonitoringNode(MonitoringNode monitoringNode)
          Remove a MonitoringNode stores in the MonitoringNode.
 void removeVisualizerListener(Visualizer listener)
          Remove an object which listen the monitoring model.
 void setSelectedNodes(List<MonitoringNode> node)
           
 
Methods inherited from class org.jdesktop.swingx.treetable.DefaultTreeTableModel
getChild, getChildCount, getColumnCount, getColumnName, getIndexOfChild, getPathToRoot, getRoot, getValueAt, insertNodeInto, isCellEditable, isLeaf, removeNodeFromParent, setColumnIdentifiers, setRoot, setUserObject, setValueAt, valueForPathChanged
 
Methods inherited from class org.jdesktop.swingx.treetable.AbstractTreeTableModel
addTreeModelListener, getColumnClass, getHierarchicalColumn, getTreeModelListeners, removeTreeModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jdesktop.swingx.treetable.TreeTableModel
getColumnClass, getColumnCount, getColumnName, getHierarchicalColumn, getValueAt, isCellEditable, setValueAt
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged
 

Constructor Detail

AbstractMonitoringModel

public AbstractMonitoringModel()
Constructor of AbstractMonitoringModel.

Method Detail

getVisualizerListenerList

protected List<Visualizer> getVisualizerListenerList()

getMonitoringModelListenerList

protected List<MonitoringModelListener> getMonitoringModelListenerList()

getMeshMap

public Map<URI,com.artenum.penelope.mesh.interfaces.Mesh> getMeshMap()
Specified by:
getMeshMap in interface MonitoringModel

addChartViewerConfigurationListener

public void addChartViewerConfigurationListener(ChartViewerConfigurationListener chartViewerConfigurationListener)
Description copied from interface: MonitoringModel
Add a ChartViewerConfigurationListener which listen the model. For example when a new CategoryMonitoringNode is added.

Specified by:
addChartViewerConfigurationListener in interface MonitoringModel
Parameters:
chartViewerConfigurationListener - the ChartViewerConfigurationListener which must be added.

addCategoryMonitoringNode

public void addCategoryMonitoringNode(CategoryMonitoringNode currentNode)
Description copied from interface: MonitoringModel
Add a category node in the monitoring model.

Specified by:
addCategoryMonitoringNode in interface MonitoringModel
Parameters:
currentNode - the CategoryMonitoringNode which must be added.

addModelListener

public void addModelListener(MonitoringModelListener listener)
Description copied from interface: MonitoringModel
Add an object which listen the monitoring model.

Specified by:
addModelListener in interface MonitoringModel
Parameters:
listener - the MonitoringModelListener which must be added.

addVisualizerListener

public void addVisualizerListener(Visualizer listener)
Description copied from interface: MonitoringModel
Add an object which listen the monitoring model.

Specified by:
addVisualizerListener in interface MonitoringModel
Parameters:
listener - the Visualizer which must be added.

removeVisualizerListener

public void removeVisualizerListener(Visualizer listener)
Description copied from interface: MonitoringModel
Remove an object which listen the monitoring model.

Specified by:
removeVisualizerListener in interface MonitoringModel
Parameters:
listener - the MonitoringModelListener which must be removed.

iterator

public Iterator<CategoryMonitoringNode> iterator()
Specified by:
iterator in interface Iterable<CategoryMonitoringNode>

getCategoryMonitoringNodeList

protected List<CategoryMonitoringNode> getCategoryMonitoringNodeList()
Returns:
The list of CategoryMonitoringNode stored in the AbstractMonitoringModel.

notifyNewMeasure

public void notifyNewMeasure(int curveId,
                             double time,
                             double doubleValue,
                             String curveName,
                             MonitoringNode monitoringNode,
                             String xUnitName,
                             String yUnitName)
Description copied from interface: MonitoringModel
Notify all listeners, a new measure is done.

Specified by:
notifyNewMeasure in interface MonitoringModel
Parameters:
curveId - the id of the curve plotted in the JFreeChart object.
time - the new time measure done.
doubleValue - the new valued computed associated to the time.
curveName - the name of the curve.

setSelectedNodes

public void setSelectedNodes(List<MonitoringNode> node)
Specified by:
setSelectedNodes in interface MonitoringModel
Parameters:
node - The selected MonitoringNodes.

getSelectedMonitoringNodes

public List<MonitoringNode> getSelectedMonitoringNodes()
Specified by:
getSelectedMonitoringNodes in interface MonitoringModel
Returns:
The MonitoringNode selected.

exportAll

public void exportAll()
Description copied from interface: MonitoringModel
Export all MonitoringNode contains in MonitoringModel.

Specified by:
exportAll in interface MonitoringModel

removeCategoryMonitoringNode

public void removeCategoryMonitoringNode(CategoryMonitoringNode categoryMonitoringNode)

clearModel

public void clearModel()
Description copied from interface: MonitoringModel
Clear the MonitoringModel. It will be empty after this method.

Specified by:
clearModel in interface MonitoringModel

removeMonitoringNode

public boolean removeMonitoringNode(MonitoringNode monitoringNode)
Description copied from interface: MonitoringModel
Remove a MonitoringNode stores in the MonitoringNode.

Specified by:
removeMonitoringNode in interface MonitoringModel
Parameters:
monitoringNode - the MonitoringNode which must be removed.
Returns:
true if the MonitoringNode is correctly removed, else return false.

addVisualizer

public void addVisualizer(Visualizer visualizer)
Description copied from interface: MonitoringModel
Add the visualizer(which displays the curves, spectrograms, ...) to the current perspective.

Specified by:
addVisualizer in interface MonitoringModel
Parameters:
visualizer - is the Visualizer which must be added.

addNewCurves

public void addNewCurves(MonitoringNode monitoringNode,
                         String visualizerName,
                         String curveName,
                         String xUnitName,
                         String yUnitName,
                         String zUnitName,
                         String chartTitle,
                         String tabTitle)
Add a new curve to the MonitoringModelListeners stored in this AbstractMonitoringModel.

Parameters:
monitoringNode - the MonitoringNode which contains informations ( DataField ) used to create the new curve.
visualizerName - the name of the visualizer used to know where the new curves must be added.
curveName - the name of the curve used to define the legend.
xUnitName - the name of the x-axis of the new curve.
yUnitName - the name of the y-axis of the new curve.
zUnitName - the name of the z-axis of the new curve.
tabTitle - the name of the tab where is strored this visualizer. It is used to know if you must add the new curve in this visualizer or not.

getLastCurveId

public int getLastCurveId()
Returns:
a unique identifier used to define the id of a new curve which must be added to a view.

notifyModelChanged

public void notifyModelChanged()
Description copied from interface: MonitoringModel
Notify the model changed (add/removed node, ...).

Specified by:
notifyModelChanged in interface MonitoringModel

notifyLastMeasuresRemoved

public void notifyLastMeasuresRemoved()
Notify the last measures recorded must be removed.


notifyMeasuresCleaned

public void notifyMeasuresCleaned()
Re-initialize all measures considered like last measures.


notifyVisibilityChanged

public void notifyVisibilityChanged(MonitoringNode monitoringNode,
                                    boolean visibility)
Description copied from interface: MonitoringModel
Notify the visibility of a node has been changed.

Specified by:
notifyVisibilityChanged in interface MonitoringModel
Parameters:
monitoringNode - the MonitoringNode which has the visibility changed.
visibility - the new visibility of the MonitoringNode. True if the node must be visible, false if the node must NOT be visible.

notifyNewCurveAdded

public void notifyNewCurveAdded(MonitoringNode monitoringNode)
Description copied from interface: MonitoringModel
Notify a new curve has been added to the mode.

Specified by:
notifyNewCurveAdded in interface MonitoringModel
Parameters:
monitoringNode - the new MonitoringNode added.


Copyright © 2012-2013 Artenum. All Rights Reserved.