|
Re: change color with code [message #1733331 is a reply to message #1733087] |
Thu, 26 May 2016 14:00   |
Eclipse User |
|
|
|
Yes, please have a look at the org.eclipse.bpmn2.modeler.examples.dynamic sample project, specifically the SampleCustomTaskFeatureContainer's getAddFeature() method. This describes how to change the shape of a BPMN2 element as well as adding icons and changing the gradient color.
HTH,
Bob
|
|
|
|
Re: change color with code [message #1733494 is a reply to message #1733471] |
Sat, 28 May 2016 14:20   |
Eclipse User |
|
|
|
Hi everyone,
I'm changing the color of my elements through AbstractCustomFeature. It's available here [Line 93]
The issue here is that the new color is not have been persisting. When I close the model and open again, the new color was replaced by default color.
I guess the setFillColor method [Line 93] should be added in another place to persist the changes. Which place should be?
|
|
|
|
Re: change color with code [message #1733505 is a reply to message #1733503] |
Sat, 28 May 2016 23:08   |
Eclipse User |
|
|
|
When you say to reload the file, is it means just refresh the file or something else? I made a screencast, the editor just applies the default color if the file was closed and reopened. Nothing happened when I refresh the file.
|
|
|
Re: change color with code [message #1734132 is a reply to message #1733505] |
Sat, 04 June 2016 16:21  |
Eclipse User |
|
|
|
To solve the problem I added the setFillColor() at org.eclipse.bpmn2.modeler.ui.features.activity.task.TaskFeatureContainer.getAddFeature(...).new AddTaskFeature() {...}.decorateShape(IAddContext, ContainerShape, Task).
Now, when I close the diagram and open again, I won't lose the previous changes.
|
|
|
Powered by
FUDForum. Page generated in 0.03552 seconds