Bug 289550 - NodeFigure does not take line style into account
Summary: NodeFigure does not take line style into account
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement
Target Milestone: ---   Edit
Assignee: Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 289549
  Show dependency tree
 
Reported: 2009-09-16 03:08 EDT by Yann Tanguy CLA
Modified: 2010-11-22 14:32 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yann Tanguy CLA 2009-09-16 03:08:19 EDT
It seems that whether the NodeFigure line style is set to dashed line or not, it still remains drawn with solid line.
Comment 1 Eclipse Webmaster CLA 2010-07-19 21:57:40 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime was the original product and component for this bug
Comment 2 Aurelien Pupier CLA 2010-11-22 11:48:28 EST
(In reply to comment #0)
> It seems that whether the NodeFigure line style is set to dashed line or not,
> it still remains drawn with solid line.

Can you precise where you tried to set a different dashed line?

In fact, it works for me. And urthermore, you can set it in gmfgraph for Rectangle figure for instance.
Comment 3 Yann Tanguy CLA 2010-11-22 12:16:37 EST
I'm not using the tooling but the runtime.

I tried to set style using setStyle(int s) method from org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure.
It seemed that the new style was not passed to the figure border.

Note that RectangleFigure inherits from org.eclipse.draw2d.Shape (where the style support is handled), this is not the case with NodeFigure.
Comment 4 Aurelien Pupier CLA 2010-11-22 12:25:31 EST
Effectively, I didn't notice that NodeFigure inherits from Figure and RectangleFigure from Shape.
Effectively lineStyle is supported in Shape, not in Figure.

Perhaps the best would be to make NodeFigure extends Shape.
Comment 5 Lidija Grahek CLA 2010-11-22 14:32:45 EST
Yann, it you mentioned that you have the figure with border. You just need to call border.setLineStyle(...) at the same spot where you now call figure.setLineStyle(...), and the new line style will be reflected on your border (of course, if the border supports the line style). I don't think that using org.eclipse.draw2d.Shape would help you here. The reason why RectangleFigure's border is updated when you use figure.setLineStyle(...) is that this figure does not have the border class defined. It just paints the outline as part of the figure's paint method (specifically, in outlineShape(...) method).