On 24/02/2010 18:09, Daniel Kuc wrote:
> Hello All,
> 
> I want to highlight a processor when a certain event happens.  Is there a way 
> I can change the color of the border of a processor or something similar?

Processors are represented in the diagram as GraphElements
(net.sf.taverna.t2.workbench.models.graph.GraphElement) and the colour
of the border can be changed with the method setColor(Color).

To map from a Processor to a GraphElement the GraphController has a
method 'GraphElement getElement(String id)' which returns a GraphElement
given the id of a workflow object. The id for a processor would be the
name of its containing dataflow concatenated with the name of the
processor, i.e.

id = dataflow.getLocalName() + processor.getLocalName();

You can get the GraphController for a Dataflow from GraphViewComponent
or MonitorViewComponent depending on whether you want the design or
monitor diagram.

The code for these classes is in these modules:

net.sf.taverna.t2.ui-components:graph-model
net.sf.taverna.t2.ui-components:graph-view
net.sf.taverna.t2.ui-components:monitor-view

David.
-- 
David Withers
School of Computer Science, University of Manchester,
Oxford Road, Manchester, M13 9PL, UK.
+44 (0)161 275 0683

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
taverna-hackers mailing list
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/taverna-mailing-lists/
Developers Guide: http://www.mygrid.org.uk/tools/developer-information

Reply via email to