Draw2d for UML sequence diagram lifelines [message #206599] |
Wed, 04 January 2006 13:43 |
Eclipse User |
|
|
|
Originally posted by: lars.ehrler.dai-labor.de
Hello,
I am working on a sequence diagram editor which is able to show diagrams
like UML sequence diagrams. FOr this I wanted to use GEF with Draw2d.
But I cannot find a full coverage documentation for Draw2d.
Especially which figures to use for which purpose would be very helpful.
I have especially problems with rendering the lifelines. I thought I
might be able to use a label together with a polyline, however, this
does not work.
Does anybody has hints to helpful documentation or maybe has already
imlpemented a sequence diagram editor and can give me help ?
Thanks in advance,
Lars Ehrler
|
|
|
Re: Draw2d for UML sequence diagram lifelines [message #206614 is a reply to message #206599] |
Wed, 04 January 2006 15:20 |
Eclipse User |
|
|
|
Originally posted by: lars.ehrler.dai-labor.de
Maybe I can solve my problem, however, I need to calculate the size of a
label depending on the text in the label. One might think the method
getTextBounds() is the one I need, but there is an exception:
Exception in thread "main" java.lang.NullPointerException
at org.eclipse.draw2d.FigureUtilities.setFont(FigureUtilities.j ava:369)
at
org.eclipse.draw2d.FigureUtilities.getTextDimension(FigureUt ilities.java:87)
at
org.eclipse.draw2d.FigureUtilities.getTextWidth(FigureUtilit ies.java:205)
at org.eclipse.draw2d.Label.getSubStringText(Label.java:363)
at org.eclipse.draw2d.Label.calculateSubStringTextSize(Label.ja va:231)
at org.eclipse.draw2d.Label.getSubStringTextSize(Label.java:384 )
at org.eclipse.draw2d.Label.calculateLocations(Label.java:158)
at org.eclipse.draw2d.Label.getTextLocation(Label.java:431)
at org.eclipse.draw2d.Label.getTextBounds(Label.java:419)
[..]
Does anybody know how to fix this ?
Thanks,
Lars
Lars Ehrler schrieb:
> Hello,
>
> I am working on a sequence diagram editor which is able to show diagrams
> like UML sequence diagrams. FOr this I wanted to use GEF with Draw2d.
> But I cannot find a full coverage documentation for Draw2d.
>
> Especially which figures to use for which purpose would be very helpful.
> I have especially problems with rendering the lifelines. I thought I
> might be able to use a label together with a polyline, however, this
> does not work.
>
> Does anybody has hints to helpful documentation or maybe has already
> imlpemented a sequence diagram editor and can give me help ?
>
> Thanks in advance,
> Lars Ehrler
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02230 seconds