Community
Participate
Working Groups
It seems that whether the NodeFigure line style is set to dashed line or not, it still remains drawn with solid line.
[GMF Restructure] Bug 319140 : product GMF and component Runtime was the original product and component for this bug
(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.
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.
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.
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).