How can I change the colour of a place in a petri net model
  • MousaviMousavi
    Posts: 48

    Dear friends


     I'm using Prom6 as a developer,I want to change the colour of a place in a petri net model,how can I do it ? I need to know the code of that .


    thanks alot


    Mousavi

    Post edited by Mousavi at 2011-06-06 01:54:30
  • JBuijsJBuijs
    Posts: 389
    Hi Mousavi,

    Assuming that you are creating the Petri net, you can add an attribute to the attributemap of the place indicating the color.

    This would look something like this: (note: untested!)
    myPlace.getAttributeMap().put(AttributeMap.FILLCOLOR, new Color(0,0,0));

    Where attributemap comes from org.processmining.models.graphbased.AttributeMap;


    Let me know if this works!
    Joos Buijs
    Forum Admin
  • MousaviMousavi
    Posts: 48
    Hi Joos Buijs,

    Thank you, I tested it , and it solved this problem :)
    I tested below code :
    myPlace.getAttributeMap().put(org.processmining.models.graphbased.AttributeMap.FILLCOLOR,Color.RED);

    With best regards
    Mousavi

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Tagged