Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BPMN Modeler » modifying the look of an activity
modifying the look of an activity [message #1142] Tue, 30 September 2008 09:38 Go to next message
faroun is currently offline farounFriend
Messages: 41
Registered: July 2009
Member
Hi Everybody ,

i'm creating a diagram using the bpmn modeler.
Because of my domain specific usage i need to decorate the bpmn object
before displaying them.
how can i do that before the generateView() call.

Best Regards ,

Dali.
Re: modifying the look of an activity [message #1169 is a reply to message #1142] Tue, 30 September 2008 09:58 Go to previous messageGo to next message
Till Essers is currently offline Till EssersFriend
Messages: 92
Registered: July 2009
Member
dali schrieb:
> Hi Everybody ,
>
> i'm creating a diagram using the bpmn modeler.
> Because of my domain specific usage i need to decorate the bpmn object
> before displaying them.
> how can i do that before the generateView() call.
>
> Best Regards ,
>
> Dali.
>
>
Hi

Maybe this will satisfy your needs:
http://wiki.eclipse.org/STP/BPMN_Component/Developing_with_t he_STP_BPMN_modeler#Annotation_decoration
Re: modifying the look of an activity [message #1196 is a reply to message #1169] Tue, 30 September 2008 10:17 Go to previous messageGo to next message
faroun is currently offline farounFriend
Messages: 41
Registered: July 2009
Member
Hi till ,

the problem with this issue is that i need to create an annotation before
i can decorate my bpmn object.

in my case i need just to make some basic decoration (background color,..)
before displaying my object.

Best Regards ,

Dali
Re: modifying the look of an activity [message #1220 is a reply to message #1196] Tue, 30 September 2008 11:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: atoulme.intalio.com

Dali, if you "just" need to do that, then you can go and provide your
own edit parts:

http://wiki.eclipse.org/STP/BPMN_Component/Samples#Provide_y our_own_edit_parts

The sample provides a different background color for text annotations.
You can do the same thing for an activity.

Thanks,

Antoine

Dali wrote:
> Hi till ,
>
> the problem with this issue is that i need to create an annotation
> before i can decorate my bpmn object.
>
> in my case i need just to make some basic decoration (background
> color,..) before displaying my object.
>
> Best Regards ,
>
> Dali
Re: modifying the look of an activity [message #1270 is a reply to message #1220] Wed, 01 October 2008 09:03 Go to previous messageGo to next message
faroun is currently offline farounFriend
Messages: 41
Registered: July 2009
Member
Hi Antoine ,

The issue seems good but is it possible to apply decoration for specific
type of activity not for all the activity .

Best Regards ,

Dali.
Re: modifying the look of an activity [message #1292 is a reply to message #1270] Wed, 01 October 2008 10:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: atoulme.intalio.com

Why, yes, of course, you just need to do something like:

protected void paintFigure(Graphics graphics) {
super.paintFigure(graphics);
/** CONDITION HERE **/
if (needSpecialLookAndFeel()) {
IMapMode mm = MapModeUtil.getMapMode(this);
int lineWidth = mm.LPtoDP(1);
graphics.setForegroundColor(getForegroundColor());
graphics.setBackgroundColor(getBackgroundColor());
Rectangle toFill = getBounds().getCopy();
toFill.height -= lineWidth * 2;
toFill.width -= lineWidth;
toFill.x += lineWidth;
toFill.y += lineWidth;

graphics.fillGradient(toFill, false);
}
/** END OF CODE THAT CUSTOMIZES THE LOOK AND FEEL **/
}


Once you have the edit part you can do whatever you want with it.

Thanks,

Antoine


Dali wrote:
> Hi Antoine ,
>
> The issue seems good but is it possible to apply decoration for specific
> type of activity not for all the activity .
>
> Best Regards ,
>
> Dali.
>
Re: modifying the look of an activity [message #1312 is a reply to message #1292] Thu, 02 October 2008 14:26 Go to previous messageGo to next message
faroun is currently offline farounFriend
Messages: 41
Registered: July 2009
Member
Hi Antoine ,

can u tell me please when is performed the call to the
BpmnEditPartProvider (is it on the generateView() call ?) .
i'm getting no modification on the look and feel of my objects.

Best Regards ,

Dali
Re: modifying the look of an activity [message #1845 is a reply to message #1312] Thu, 02 October 2008 15:26 Go to previous message
Eclipse UserFriend
Originally posted by: atoulme.intalio.com

Dali, please look in the plugin.xml file of the example.

faroun wrote:
> Hi Antoine ,
>
> can u tell me please when is performed the call to the
> BpmnEditPartProvider (is it on the generateView() call ?) .
> i'm getting no modification on the look and feel of my objects.
>
> Best Regards ,
>
> Dali
>
Previous Topic:BPMN2 support
Next Topic:Initialize diagram from model file
Goto Forum:
  


Current Time: Tue Mar 19 08:07:25 GMT 2024

Powered by FUDForum. Page generated in 0.02322 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top