|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cosylab.gui.displayers.DataSourceSupport
com.cosylab.gui.adapters.DataConsumerDispatcher
com.cosylab.gui.adapters.AbstractConverter
com.cosylab.gui.adapters.SimpleConverterSupport
com.cosylab.gui.adapters.LinearConverter
public class LinearConverter
MulitplierConverter acts as data source and data consumer in
the same time. This converter performas on all data flow linear
transformation with user defined multiplication factor and shift. Value
transfirmation performs x multiplicationFactor + shift.
Note! This implementation works only with data sources and consumers,
whcih support double as value type.
Converter,
SimpleConverterSupport,
Serialized Form| Field Summary | |
|---|---|
static java.lang.String |
SHORT_NAME
|
| Fields inherited from class com.cosylab.gui.adapters.SimpleConverterSupport |
|---|
arrayIndex |
| 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 | |
|---|---|
LinearConverter()
Creates new multiplyer with default factor 1.0 and shift 0.0. |
|
LinearConverter(double factor,
double shift)
Creates new multiplyer with defined factor and shift. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
double |
getMultiplicationFactor()
Returns factor by which all data from input will be multiplied |
java.lang.String |
getName()
Returns name of this data consumer. |
double |
getShift()
Returns the shift of transformed value. |
protected double |
inverseTransform(double value)
Here we implement invers transformation of our transformation function. |
void |
setCharacteristics(java.util.Map characteristics)
This is called by peer data source. |
void |
setMultiplicationFactor(double d)
Sets factor by which all data from input will be multiplied |
void |
setShift(double d)
Sets the shift of transformed value |
java.lang.String |
toString()
|
protected double |
transform(double value)
Here we implement our transformation function. |
| Methods inherited from class com.cosylab.gui.adapters.SimpleConverterSupport |
|---|
getArrayIndex, getNonblDisplatecher, setArrayIndex, updateValue, updateValue |
| Methods inherited from class com.cosylab.gui.adapters.AbstractConverter |
|---|
addConsumer, cacheLastCharacteristics, clear, clone, consumerAdded, getLastCharacteristics, updateDataState |
| Methods inherited from class com.cosylab.gui.adapters.DataConsumerDispatcher |
|---|
getDataConsumer, getDefaultDataConsumer, getSupportedCharacteristics, getSupportedConsumerTypes |
| Methods inherited from class com.cosylab.gui.displayers.DataSourceSupport |
|---|
extractSupportedCharacteristics, getAcceptableConsumerTypes, getConsumers, removeAllConsumers, removeConsumer |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.cosylab.gui.displayers.DoubleConsumer |
|---|
updateValue |
| Methods inherited from interface com.cosylab.gui.displayers.DataConsumer |
|---|
getDataConsumer, getDefaultDataConsumer, getSupportedCharacteristics, getSupportedConsumerTypes, updateDataState |
| Methods inherited from interface com.cosylab.gui.adapters.Converter |
|---|
clone |
| Methods inherited from interface com.cosylab.gui.displayers.DataSource |
|---|
addConsumer, getAcceptableConsumerTypes, getConsumers, removeAllConsumers, removeConsumer |
| Field Detail |
|---|
public static final java.lang.String SHORT_NAME
| Constructor Detail |
|---|
public LinearConverter()
public LinearConverter(double factor,
double shift)
factor - new multiplicationfactorshift - new shift| Method Detail |
|---|
public void setCharacteristics(java.util.Map characteristics)
setCharacteristics in interface DataConsumersetCharacteristics in class AbstractConvertercharacteristics - the Map with attriDataConsumer.setCharacteristics(java.util.Map)public double getMultiplicationFactor()
public void setMultiplicationFactor(double d)
d - new multiplication factorprotected double transform(double value)
transform in class SimpleConverterSupportvalue - the value to be transfirmed
SimpleConverterSupport.transform(double)protected double inverseTransform(double value)
inverseTransform in class SimpleConverterSupportvalue - the value to be transfirmed with inverse function
SimpleConverterSupport.inverseTransform(double)public double getShift()
public void setShift(double d)
d - new shift valuepublic java.lang.String getName()
DataConsumer
getName in interface DataConsumergetName in class DataConsumerDispatcherpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||