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
Member
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 :
http://wiki.eclipse.org/STP/BPMN_Component/Developing_with_t he_STP_BPMN_modeler.

I write the following snippet :

private class ActivityEditPartWithBackground extends ActivityEditPart {

ApplicationWindow w;

public ActivityEditPartWithBackground(View view) {
super(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() {

@Override
public void paintFigure(Graphics graphics) {
super.paintFigure(graphics);

//modification goes here


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

}

if (getActivityType() == t) {


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

}

if (getActivityType() == ese) {


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


}}};

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 ,

Dali.
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: atoulme.intalio.com

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.

Thanks,

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


Current Time: Thu Apr 25 08:20:16 GMT 2024

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

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

Back to the top