|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel org.keridwen.modelling.monitoring.visualizer.AbstractLiveMonitoringMap2DViewer
public abstract class AbstractLiveMonitoringMap2DViewer
This abstract class pools concepts used to show a 2D map with JFreeChart technology. A 2D map has a x-axis, a y-axis, and a z-axis which is a color map.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
AbstractLiveMonitoringMap2DViewer(CategoryMonitoringNode categoryMonitoringModel)
Constructor of AbstractLiveMonitoringMap2DViewer . |
Method Summary | |
---|---|
void |
addMonitoringNode(MonitoringNode monitoringNode,
String curveName,
String xUnitName,
String yUnitName,
String zUnitName,
String chartTitle)
Add monitoringNode used to display a new f(x)=y curve/spectrogram/2D map. |
void |
categoryMonitoringNodeAdded(CategoryMonitoringNode categoryMonitoringNode)
A new MonitoringNode is added in the model. |
void |
cleanLastMeasures()
Re-initialize all measures considered like last measures. |
static void |
computeGradient(Color firstColor,
Color secondColor,
org.jfree.chart.renderer.LookupPaintScale paintScale,
int nbDifferentInterval,
int colorIndex,
Double minZValue,
Double maxZValue)
Add a gradient color to a LookupPaintScale between 2 colors, it is possible the LookupPaintScale
has already colors recorded inside it, so this method required information about the number of color already
recorded. |
protected abstract void |
displayMonitoring(MonitoringNode monitoringNode,
String xUnitName,
String yUnitName,
String zUnitName,
String chartTitle)
|
CategoryMonitoringNode |
getCategoryMonitoringNode()
|
JComponent |
getComponent()
|
protected org.jfree.chart.JFreeChart |
getjFreeChart()
|
int |
getLastCurveId()
|
List<MonitoringNode> |
getLastMeasures()
|
protected double |
getMaxZValue()
|
protected double |
getMinZValue()
|
String |
getNodeName()
|
void |
monitoringNodeColorChanged(MonitoringNode monitoringNode,
Color newColor)
The color of the curve represented by a MonitoringNode stored in the MonitoringModel has changed. |
void |
notifyModelChanged()
Notify the model changed. |
void |
notifyNewCurves(MonitoringNode monitoringNode,
String visualizerName,
String curveName,
String xUnitName,
String yUnitName,
String zUnitName,
String chartTitle,
String tabTitle)
Notify a new curve is added to the MonitoringModelListener s stored in this
AbstractMonitoringModel . |
void |
notifyNewMeasure(int curveId,
double time,
double doubleValue,
String curveName,
MonitoringNode monitoringNode,
String xUnitName,
String yUnitName)
Notify listeners, a new measure is done. |
void |
removeLastMeasures()
Remove last measures computed. |
protected void |
setMaxZValue(double maxZValue)
Sets the maximum value of z-axis, this variable is used to compute the color map of the z-axis. |
protected void |
setMinZValue(double minZValue)
Sets the minimum value of z-axis, this variable is used to compute the color map of the z-axis. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.keridwen.modelling.monitoring.model.MonitoringModelListener |
---|
monitoringNodeRemoved, monitoringNodeVisibilityChanged |
Constructor Detail |
---|
public AbstractLiveMonitoringMap2DViewer(CategoryMonitoringNode categoryMonitoringModel)
AbstractLiveMonitoringMap2DViewer
.
categoryMonitoringModel
- The reference to the CategoryMonitoringNode
represented by this viewer.Method Detail |
---|
public void categoryMonitoringNodeAdded(CategoryMonitoringNode categoryMonitoringNode)
MonitoringModelListener
MonitoringNode
is added in the model.
categoryMonitoringNodeAdded
in interface MonitoringModelListener
public void monitoringNodeColorChanged(MonitoringNode monitoringNode, Color newColor)
MonitoringModelListener
MonitoringNode
stored in the MonitoringModel
has changed.
monitoringNodeColorChanged
in interface MonitoringModelListener
monitoringNode
- The MonitoringNode
which has this color which has changed.newColor
- the new value of the color.public void notifyNewMeasure(int curveId, double time, double doubleValue, String curveName, MonitoringNode monitoringNode, String xUnitName, String yUnitName)
MonitoringModelListener
notifyNewMeasure
in interface MonitoringModelListener
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 curvepublic JComponent getComponent()
getComponent
in interface Visualizer
Component
of this MonitoringModelListener
.public String getNodeName()
getNodeName
in interface Visualizer
MonitoringModelListener
.public void notifyNewCurves(MonitoringNode monitoringNode, String visualizerName, String curveName, String xUnitName, String yUnitName, String zUnitName, String chartTitle, String tabTitle)
MonitoringModelListener
MonitoringModelListener
s stored in this
AbstractMonitoringModel
.
notifyNewCurves
in interface MonitoringModelListener
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.public int getLastCurveId()
getLastCurveId
in interface MonitoringModelListener
getLastCurveId
in interface Visualizer
public void addMonitoringNode(MonitoringNode monitoringNode, String curveName, String xUnitName, String yUnitName, String zUnitName, String chartTitle)
Visualizer
addMonitoringNode
in interface Visualizer
monitoringNode
- is the MonitoringNode
used to store informations used to plot the new curves.curveName
- the name of the curve.xUnitName
- the unit of the x-axis.yUnitName
- the unit of the y-axis.protected abstract void displayMonitoring(MonitoringNode monitoringNode, String xUnitName, String yUnitName, String zUnitName, String chartTitle)
public static void computeGradient(Color firstColor, Color secondColor, org.jfree.chart.renderer.LookupPaintScale paintScale, int nbDifferentInterval, int colorIndex, Double minZValue, Double maxZValue)
LookupPaintScale
between 2 colors, it is possible the LookupPaintScale
has already colors recorded inside it, so this method required information about the number of color already
recorded.
firstColor
- the first Color
used to compute the gradient.secondColor
- the second Color
used to compute the gradient.paintScale
- the LookupPaintScale
where the gradient color must be added.nbDifferentInterval
- the number of gradient already recorded in the LookupPaintScale
.colorIndex
- the index of the gradient in the LookupPaintScale
.public CategoryMonitoringNode getCategoryMonitoringNode()
getCategoryMonitoringNode
in interface Visualizer
CategoryMonitoringNode
visualize by this Visualizer
.public void notifyModelChanged()
MonitoringModelListener
notifyModelChanged
in interface MonitoringModelListener
public List<MonitoringNode> getLastMeasures()
getLastMeasures
in interface Visualizer
public void removeLastMeasures()
MonitoringModelListener
removeLastMeasures
in interface MonitoringModelListener
public void cleanLastMeasures()
MonitoringModelListener
cleanLastMeasures
in interface MonitoringModelListener
protected org.jfree.chart.JFreeChart getjFreeChart()
JFreeChart
where is plotted the 2D map.protected double getMaxZValue()
protected double getMinZValue()
protected void setMaxZValue(double maxZValue)
maxZValue
- is the new maximum value of z-axis, this variable is used to compute the color map of the z-axis.protected void setMinZValue(double minZValue)
minZValue
- is the new minimum value of z-axis, this variable is used to compute the color map of the z-axis.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |