|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kvid.datadistributor.DataDistributor
public final class DataDistributor
This class organizes the distribution of the collected data to the objects that visualize it. This is the core class of the KViD Plugin. It collects the data provided by a data source and distributes it to all registered classes that might visualize it. This class is implemented as a singleton.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.ResourceSetListener |
---|
ResourceSetListener.Internal |
Method Summary | |
---|---|
HashMap<KvidUri,DataObject> |
getData()
Getter for the data table. |
DataObject |
getDataObjectByURI(KvidUri uri)
Getter for a DataObject by it's model element's URI. |
NotificationFilter |
getFilter()
|
static DataDistributor |
getInstance()
Gives the single instance of the DataDistributor. |
List<List<Point>> |
getPathsByNode(KvidUri uri)
Deprecated. Use KvidUtil#getPathsByElement(KvidUri, DiagramEditor, KNode) instead |
void |
initialize()
Method which prepares a new visualization. |
boolean |
isAggregatePrecommitListener()
|
boolean |
isPostcommitOnly()
|
boolean |
isPrecommitOnly()
|
void |
registerDataListener(IDataListener thelistener)
Registers a new listener which will be notified when the data changes. |
void |
removeDataListener(IDataListener thelistener)
Removes a listener from the listeners list. |
void |
resourceSetChanged(ResourceSetChangeEvent event)
|
Command |
transactionAboutToCommit(ResourceSetChangeEvent event)
|
void |
triggerInitialization()
Will be triggered when the current IDataProvider starts giving data. |
void |
triggerWrapup()
Will be triggered when the current IDataProvider stops giving data. |
void |
update(JSONObject data,
boolean isHistoryStep)
Call this every time the data to visualize has changed to trigger the visualization of the new data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DataDistributor getInstance()
public void initialize()
public void update(JSONObject data, boolean isHistoryStep)
update
in interface IProviderListener
data
- The new data for the next visualization step in JSONisHistoryStep
- Does the data need special handling because it is history data?public List<List<Point>> getPathsByNode(KvidUri uri)
KvidUtil#getPathsByElement(KvidUri, DiagramEditor, KNode)
instead
uri
- Referring URI, either in Ptolemy Notation or a Fragment URI
Point
spublic DataObject getDataObjectByURI(KvidUri uri)
DataObject
by it's model element's URI.
uri
- The URI of the model element
DataObject
associated with the model element. Might
be null if URI has no DataObjectpublic HashMap<KvidUri,DataObject> getData()
public void triggerInitialization()
IDataProvider
starts giving data.
triggerInitialization
in interface IProviderListener
public void triggerWrapup()
IDataProvider
stops giving data.
triggerWrapup
in interface IProviderListener
public void registerDataListener(IDataListener thelistener)
thelistener
- The IDataListener
to addpublic void removeDataListener(IDataListener thelistener)
thelistener
- The IDataListener
to removepublic NotificationFilter getFilter()
getFilter
in interface ResourceSetListener
public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException
transactionAboutToCommit
in interface ResourceSetListener
RollbackException
public void resourceSetChanged(ResourceSetChangeEvent event)
resourceSetChanged
in interface ResourceSetListener
public boolean isAggregatePrecommitListener()
isAggregatePrecommitListener
in interface ResourceSetListener
public boolean isPrecommitOnly()
isPrecommitOnly
in interface ResourceSetListener
public boolean isPostcommitOnly()
isPostcommitOnly
in interface ResourceSetListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |