Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Draw2d for UML sequence diagram lifelines
Draw2d for UML sequence diagram lifelines [message #206599] Wed, 04 January 2006 13:43 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Draw2d for UML sequence diagram lifelines [message #206878 is a reply to message #206614] Sun, 08 January 2006 09:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marguu.libero.it

Try this code:

FontData fd =new FontData("Arial",10,SWT.NONE);
font = new Font(null,fd);
Dimension dim = FigureUtilities.getTextExtents("text",font);
Re: Draw2d for UML sequence diagram lifelines [message #229439 is a reply to message #206599] Fri, 19 January 2007 14:42 Go to previous messageGo to next message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
Hi Lars,

I have the same problem. I must implement a sequence diagram.
Have you found any example, resources or a solution?

greetings

Andreas Herz

Lars Ehrler wrote:
> 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 #229445 is a reply to message #206599] Fri, 19 January 2007 14:44 Go to previous messageGo to next message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
Hi Lars,

I have the same problem. I must implement a sequence diagram.
Have you found any example, resources or a solution?

greetings

Andreas Herz

Lars Ehrler wrote:
> 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 #229451 is a reply to message #206599] Fri, 19 January 2007 14:46 Go to previous messageGo to next message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
Hi Lars,

I have the same problem. I must implement a sequence diagram.
Have you found any example, resources or a solution?

greetings

Andreas Herz

Lars Ehrler wrote:
> 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 #229456 is a reply to message #206599] Fri, 19 January 2007 14:47 Go to previous messageGo to next message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
Hi Lars,

I have the same problem. I must implement a sequence diagram.
Have you found any example, resources or a solution?

greetings

Andreas Herz

Lars Ehrler wrote:
> 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 #229594 is a reply to message #229456] Mon, 22 January 2007 14:33 Go to previous message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi,

Perhaps you could create a Wrapper figure for the lifeline that will have
two figures as it's children: 1) the rectangle for the lifeline head where
you will add the label to 2) the polyline figure for the rest of the
lifeline.
Hope this helps.

Cheers,
Alex
Previous Topic:How to meaure the string(text) width?
Next Topic:Draw2D Headless
Goto Forum:
  


Current Time: Fri Apr 19 11:50:42 GMT 2024

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

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

Back to the top