|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.desy.acop.displayers.chart.AcopChartConsumer
public class AcopChartConsumer
AcopChartConsumer
is the common consumer used by the
AcopChart
and AcopChartReorg
.
Each consumer can present one graph in the chart and can be added
or removed from the chart in runtime. This consumer works with
AcopGraphParameters
which specifiy all the properties
required to customize a particular graph.
AcopChart
,
AcopChartReorg
Field Summary | |
---|---|
protected AcopChartReorg |
acopChartReorg
|
protected int |
arraySize
|
protected java.awt.Color |
color
|
protected java.lang.Object |
disable
|
protected int |
dispalyMode
|
protected AcopGraphParameters |
displayerParameters
|
protected int |
displayHandle
|
protected long |
lastTimestamp
|
protected int |
maxNumber
|
protected java.lang.String |
name
|
static java.lang.String[] |
SUPPORTED_CHARACTERISTICS
|
static java.lang.Class[] |
SUPPORTED_CONSUMER_TYPES
|
protected int |
textHandle
|
protected int |
width
|
protected double[] |
xData
|
protected java.lang.String[] |
xLabels
|
protected double[] |
yData
|
Constructor Summary | |
---|---|
AcopChartConsumer(AcopChartReorg acopChartReorg,
java.lang.String name)
Constructs new AcopChartConsumer. |
Method Summary | |
---|---|
protected void |
applyParameters()
|
void |
destroy()
Removes the graph that this consumer shows from the chart. |
double[][] |
dumpData()
Returns all data from chart. |
AcopChartReorg |
getAcopChart()
Returns the parent chart component. |
int |
getArraySize()
Returns the array size of the consumer. |
java.awt.Color |
getColor()
Returns the color of this graph. |
DataConsumer |
getDataConsumer(java.lang.Class type)
Returns data consumer for requested data consumer type. |
DataConsumer |
getDefaultDataConsumer()
Returns the implementation of default consumer type supported by this data consumer. |
AcopGraphParameters |
getDisplayerParameters()
Returns the AcopGraphParameters associated with this consumer. |
AcopDisplayMode |
getDisplayMode()
Returns the display mode of this graph. |
long |
getLastTimestamp()
Returns the last timestamp when value was updated. |
java.lang.String |
getName()
Returns name of this data consumer. |
double |
getPreferredXMax()
Returns the preferred maximum of the horizontal axis. |
double |
getPreferredXMin()
Returns the preferred minimum of the horizontal axis. |
double |
getPreferredYMax()
Returns the preferred maximum of the vertical axis. |
double |
getPreferredYMin()
Returns the preferred minimum of the vertical axis. |
java.lang.String[] |
getSupportedCharacteristics()
Resturns array with names of supported characteristics. |
java.lang.Class<DataConsumer>[] |
getSupportedConsumerTypes()
Returns array of supported data consumer types, which can be used as parameter and returnned with getDataCosnumer(Class)
method. |
double[] |
getXData()
Returns the x data |
java.lang.String[] |
getXLabels()
Returns the horizotanl axis labels. |
double[] |
getYData()
Returns the y data. |
boolean |
isChubbyLines()
Returns true if this graph is drawn with a thicker line. |
boolean |
isDataDrawn()
Returns true if data is plotted on the chart. |
boolean |
isTrendChart()
Returns true if this graph is a trend. |
void |
refreshPlot()
Refreshes all drawn points. |
void |
reinitializePlot()
Redraws all graphs. |
void |
setCharacteristics(java.util.Map characteristics)
Sets new dynamic value characteristics to this data consumer. |
void |
setChubbyLines(boolean chubbyLines)
If true this graph is drawn with a thicker line. |
void |
setColor(java.awt.Color color)
Sets the color for this graph. |
void |
setDisplayerParameters(AcopGraphParameters displayerParameters)
Associates AcopGraphParameters with this consumer. |
void |
setDisplayMode(AcopDisplayMode displayMode)
Sets the display mode for this graph. |
void |
setPreferredYMax(double preferredYMax)
Sets the preferred maximum of the vertical axis. |
void |
setPreferredYMin(double preferredYMin)
Sets the preferred minimum of the vertical axis. |
void |
setTrendChart(boolean isTrendChart)
Sets the trend chart mode for this graph. |
void |
setXLabels(java.lang.String[] labels)
Sets the labels for the horizontal axis. |
protected void |
updateChart()
|
void |
updateDataState(DataState state)
Push data state (quality) update change for dynamic value. |
void |
updateValue(long timestamp,
double[] value)
Notifys this consumer about new dynamic value update. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Class[] SUPPORTED_CONSUMER_TYPES
public static final java.lang.String[] SUPPORTED_CHARACTERISTICS
protected java.lang.String name
protected AcopChartReorg acopChartReorg
protected double[] xData
protected double[] yData
protected int displayHandle
protected int textHandle
protected long lastTimestamp
protected java.awt.Color color
protected int width
protected int dispalyMode
protected java.lang.String[] xLabels
protected java.lang.Object disable
protected int arraySize
protected int maxNumber
protected AcopGraphParameters displayerParameters
Constructor Detail |
---|
public AcopChartConsumer(AcopChartReorg acopChartReorg, java.lang.String name)
acopChartReorg
- parent chartname
- the name of the consumerMethod Detail |
---|
public DataConsumer getDataConsumer(java.lang.Class type)
DataConsumer
Returns data consumer for requested data consumer type. If this data
consumer does not support required data consumer, null
is
returned.
If this data cosnumer does not support specific data consumer type, then it means, that it is not desirable to cast data of that type to any by this consumer supported data consumer types.
getDataConsumer
in interface DataConsumer
type
- Class of specific data consumer (e.g. DoubleConsumer)
null
if
not supportedpublic DataConsumer getDefaultDataConsumer()
DataConsumer
getDefaultDataConsumer
in interface DataConsumer
public void updateDataState(DataState state)
DataConsumer
updateDataState
in interface DataConsumer
state
- new data state(quality) descriptorpublic void setCharacteristics(java.util.Map characteristics)
DataConsumer
setCharacteristics
in interface DataConsumer
characteristics
- the Map
with attripublic java.lang.String getName()
DataConsumer
getName
in interface DataConsumer
public java.lang.String[] getSupportedCharacteristics()
DataConsumer
null
is returned, than
consumer expect all existing characteristics from data source.
getSupportedCharacteristics
in interface DataConsumer
public java.lang.Class<DataConsumer>[] getSupportedConsumerTypes()
DataConsumer
getDataCosnumer(Class)
method.
getSupportedConsumerTypes
in interface DataConsumer
protected void updateChart()
public void refreshPlot()
Acop.refreshScreen(Object, int, int, int, Object)
public void reinitializePlot()
public double[][] dumpData()
public void destroy()
public void updateValue(long timestamp, double[] value) throws CommonException
DoubleSeqConsumer
updateValue
in interface DoubleSeqConsumer
timestamp
- the time of dynamic value eventvalue
- new value
CommonException
public double[] getXData()
public double[] getYData()
public AcopChartReorg getAcopChart()
public long getLastTimestamp()
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
color
- the color of the graphpublic java.lang.String[] getXLabels()
public void setXLabels(java.lang.String[] labels)
labels
- new horizontal axis labelspublic int getArraySize()
public double getPreferredYMax()
public void setPreferredYMax(double preferredYMax)
preferredYMax
- new maximum for the vertical axis.public double getPreferredYMin()
public double getPreferredXMin()
public double getPreferredXMax()
public void setPreferredYMin(double preferredYMin)
preferredYMin
- new preferred minimumprotected void applyParameters()
public AcopGraphParameters getDisplayerParameters()
public void setDisplayerParameters(AcopGraphParameters displayerParameters)
displayerParameters
- public boolean isDataDrawn()
public boolean isTrendChart()
public void setTrendChart(boolean isTrendChart)
isTrendChart
- public boolean isChubbyLines()
public void setChubbyLines(boolean chubbyLines)
chubbyLines
- the chubbyLines to setpublic AcopDisplayMode getDisplayMode()
public void setDisplayMode(AcopDisplayMode displayMode)
displayMode
- new display mode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |