Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BPMN Modeler » Look and feel modifications
Look and feel modifications [message #3456] Thu, 06 November 2008 09:50 Go to next message
faroun is currently offline farounFriend
Messages: 41
Registered: July 2009
Hi everybody ,

I'm trying to personnalise the look and feel of my diagram which is based
on data that exists on a DB.

I'm following the sample at : he_STP_BPMN_modeler.

I write the following snippet :

private class ActivityEditPartWithBackground extends ActivityEditPart {

ApplicationWindow w;

public ActivityEditPartWithBackground(View view) {

protected IFigure createNodeShape() {

// recupération des identifiants des différents objets de notation BPMN

final int ese = ActivityType.EVENT_START_EMPTY;
final int t = ActivityType.TASK;
final int gdbe = ActivityType.GATEWAY_DATA_BASED_EXCLUSIVE;

ActivityFigure figure = new ActivityFigure() {

public void paintFigure(Graphics graphics) {

//modification goes here

f (getActivityType() == gdbe)
{graphics.setBackgroundColor(Display.getCurrent().getSystemC olor(SWT.COLOR_BLUE));


if (getActivityType() == t) {

graphics.setBackgroundColor(Display.getCurrent().getSystemCo lor(SWT.COLOR_CYAN));
graphics.setForegroundColor(Display.getCurrent().getSystemCo lor(SWT.COLOR_DARK_RED));


if (getActivityType() == ese) {

graphics.setBackgroundColor(Display.getCurrent().getSystemCo lor(SWT.COLOR_CYAN));


return primaryShape = figure;

My problem is the changes goes well for the task Acivity but not for the
other types .

How Can I fix this ??

Best Regards ,

Re: Look and feel modifications [message #3493 is a reply to message #3456] Thu, 06 November 2008 11:34 Go to previous message
Eclipse UserFriend
Originally posted by:

Look at the createNodeFigure method, depending on the activity type,
createNodeShape is not always called. For a gateway or an event, you
will need to override a different class.


Previous Topic:French version
Next Topic:Adding new Artifacts
Goto Forum:

Current Time: Sun Aug 09 01:04:41 GMT 2020

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

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

Back to the top