DESY ACOP Beans Home

com.cosylab.gui.adapters
Interface Converter

All Superinterfaces:
java.lang.Cloneable, DataConsumer, DataSource, java.io.Serializable
All Known Implementing Classes:
AbstractConverter, ConverterChain, ExponentialConverter, IdentityConverter, LinearConverter, LogarithmicConverter, MultiplierConverter, PotentialConverter, SimpleArrayConverterSupport, SimpleConverterSupport

public interface Converter
extends DataSource, DataConsumer, java.lang.Cloneable, java.io.Serializable

Converter interface distinguishes objects that wish to act as data converters for data flow betwean some arbitrary DataSource and DataConsumer. To accomplish this they must represent itself as data consumer to peer data source, thus implementing DataConsumer interface, and on the other side accept peer data consumer as data source, thus implementing at the same time DataSource interface. With such approach it is possible to chain multiple Converters in a single data flow line from source to consumer.

Besides implementing DataSource and DataConsumer interfaces converter must comply to the following contract:

To clear the things there is simple exemplatory implementation MultiplierConverter. This example is fully functional and performs convertions in which any incoming number is multiplied by some user defined factor. To see how this example converter is used run con.cosylab.showcase.CalculationPanel showcase demo.

The SimpleConverterSupport class could be used as implementation base for most of transformations.

Since:
Feb 14, 2004.
Version:
$Id: Converter.java,v 1.10 2008-04-22 12:31:02 jbobnar Exp $
Author:
Igor Kriznar
See Also:
Displayer, DataSource, DataConsumer, SimpleConverterSupport, MultiplierConverter

Method Summary
 java.lang.Object 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
 

Method Detail

clone

java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException


Copyright © 2010. All Rights Reserved.