DESY ACOP Beans Home

com.cosylab.gui.adapters
Class SimpleArrayConverterSupport

java.lang.Object
  extended by com.cosylab.gui.displayers.DataSourceSupport
      extended by com.cosylab.gui.adapters.DataConsumerDispatcher
          extended by com.cosylab.gui.adapters.AbstractConverter
              extended by com.cosylab.gui.adapters.SimpleArrayConverterSupport
All Implemented Interfaces:
Converter, DataConsumer, DataSource, DoubleSeqConsumer, java.io.Serializable, java.lang.Cloneable

public abstract class SimpleArrayConverterSupport
extends AbstractConverter
implements Converter, DoubleSeqConsumer

SimpleConverterSupport is implementation of Converter interface intended for simple implementation, which use transfromation function on double data flow.

Note! This implementation works only with data sources and consumers, whcih support double[] as value type.

Since:
Feb 14, 2004.
Version:
$Id: SimpleArrayConverterSupport.java,v 1.4 2008-04-22 12:31:02 jbobnar Exp $
Author:
Igor Kriznar
See Also:
Converter, Serialized Form

Field Summary
 
Fields inherited from class com.cosylab.gui.adapters.AbstractConverter
nonblDispatcher
 
Fields inherited from class com.cosylab.gui.adapters.DataConsumerDispatcher
name
 
Fields inherited from class com.cosylab.gui.displayers.DataSourceSupport
types
 
Constructor Summary
SimpleArrayConverterSupport()
          Creates new converter.
 
Method Summary
protected abstract  double[] transform(double[] value)
          User must implement this method and from prvided parameter calculate with own transfromatin function new value and return it.
 void updateValue(long timestamp, double[] value)
          This is called by peer data source.
 
Methods inherited from class com.cosylab.gui.adapters.AbstractConverter
addConsumer, cacheLastCharacteristics, clear, clone, consumerAdded, getLastCharacteristics, getNonblDisplatecher, setCharacteristics, updateDataState
 
Methods inherited from class com.cosylab.gui.adapters.DataConsumerDispatcher
getDataConsumer, getDefaultDataConsumer, getName, getSupportedCharacteristics, getSupportedConsumerTypes
 
Methods inherited from class com.cosylab.gui.displayers.DataSourceSupport
extractSupportedCharacteristics, getAcceptableConsumerTypes, getConsumers, removeAllConsumers, removeConsumer
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cosylab.gui.adapters.Converter
clone
 
Methods inherited from interface com.cosylab.gui.displayers.DataSource
addConsumer, getAcceptableConsumerTypes, getConsumers, removeAllConsumers, removeConsumer
 
Methods inherited from interface com.cosylab.gui.displayers.DataConsumer
getDataConsumer, getDefaultDataConsumer, getName, getSupportedCharacteristics, getSupportedConsumerTypes, setCharacteristics, updateDataState
 

Constructor Detail

SimpleArrayConverterSupport

public SimpleArrayConverterSupport()
Creates new converter.

Method Detail

updateValue

public void updateValue(long timestamp,
                        double[] value)
                 throws CommonException
This is called by peer data source. Call is delegated to contained consumers.

Specified by:
updateValue in interface DoubleSeqConsumer
Parameters:
timestamp - the time of dynamic value event
value - new value
Throws:
CommonException
See Also:
DoubleConsumer.updateValue(long, double)

transform

protected abstract double[] transform(double[] value)
User must implement this method and from prvided parameter calculate with own transfromatin function new value and return it.

Parameters:
value - the value to be transfirmed
Returns:
the transformed value


Copyright © 2010. All Rights Reserved.