|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.gui.displayers.DataSourceSupport com.cosylab.gui.adapters.DataConsumerDispatcher com.cosylab.gui.adapters.AbstractConverter
public abstract class AbstractConverter
AbstractConverter
is implementation of
Converter
interface intended for convenience when implementing new converter.
Converter
,
Serialized FormField Summary | |
---|---|
protected NonblockingNumberDispatcher |
nonblDispatcher
DOCUMENT ME! |
Fields inherited from class com.cosylab.gui.adapters.DataConsumerDispatcher |
---|
name |
Fields inherited from class com.cosylab.gui.displayers.DataSourceSupport |
---|
types |
Constructor Summary | |
---|---|
AbstractConverter(java.lang.Class[] types)
Creates new converter. |
Method Summary | |
---|---|
void |
addConsumer(DataConsumer consumer)
In this method we investigate the following cases: if consumer is NonblockingNumberConsumer , the it comes from
peer data source and wants to receive notifications from peer cosnumer
about user change requests. |
protected void |
cacheLastCharacteristics(java.util.Map characteristics)
If converter implementation decides to change characteristics it is very advisable to cache unmodified characteristics. |
void |
clear()
Clears converter to initial state. |
java.lang.Object |
clone()
|
protected void |
consumerAdded(DataConsumer consumer)
This method is called when consumer has been added to this converter. |
protected java.util.Map |
getLastCharacteristics()
Returnes characcteristics whic was last time used on this data converter. |
protected NonblockingNumberDispatcher |
getNonblDisplatecher()
Override this method to provide own dispatcher, which forwards revers data flow (from consumer to source). |
void |
setCharacteristics(java.util.Map characteristics)
This is called by peer data source. |
void |
updateDataState(DataState state)
Push data state (quality) update change for dynamic value. |
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.displayers.DataSource |
---|
getAcceptableConsumerTypes, getConsumers, removeAllConsumers, removeConsumer |
Methods inherited from interface com.cosylab.gui.displayers.DataConsumer |
---|
getDataConsumer, getDefaultDataConsumer, getName, getSupportedCharacteristics, getSupportedConsumerTypes |
Field Detail |
---|
protected transient NonblockingNumberDispatcher nonblDispatcher
Constructor Detail |
---|
public AbstractConverter(java.lang.Class[] types)
Method Detail |
---|
public void setCharacteristics(java.util.Map characteristics)
setCharacteristics
in interface DataConsumer
setCharacteristics
in class DataConsumerDispatcher
characteristics
- the Map
with attriDataConsumer.setCharacteristics(java.util.Map)
protected NonblockingNumberDispatcher getNonblDisplatecher()
public void addConsumer(DataConsumer consumer) throws java.beans.PropertyVetoException
NonblockingNumberConsumer
, the it comes from
peer data source and wants to receive notifications from peer cosnumer
about user change requests.
DataSource
interface. It it does, we must notify listener
for user data change requests.
addConsumer
in interface DataSource
addConsumer
in class DataSourceSupport
consumer
- the data consumer to be regitered at this data source
java.beans.PropertyVetoException
DataSource.addConsumer(com.cosylab.gui.displayers.DataConsumer)
protected void consumerAdded(DataConsumer consumer)
consumer
- the consumer which was addedpublic void updateDataState(DataState state)
DataConsumer
updateDataState
in interface DataConsumer
updateDataState
in class DataConsumerDispatcher
state
- new data state(quality) descriptorprotected void cacheLastCharacteristics(java.util.Map characteristics)
If implementation does not change characteristic, than this method doesen't have to be used.
characteristics
- the unmodified characcteristics before
transformationprotected java.util.Map getLastCharacteristics()
cacheLastCharacteristics(Map)
to store
them.
cacheLastCharacteristics(Map)
public void clear()
clear
in class DataSourceSupport
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface Converter
clone
in class DataSourceSupport
java.lang.CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |