Home » Eclipse Projects » GEF » Dragging a child label
Dragging a child label [message #94295] |
Mon, 15 September 2003 14:41  |
Eclipse User |
|
|
|
Originally posted by: carlos.grahl.senior.com.br
Hi!
I was looking at the article (which is great!) Display a UML Diagram using
Draw2D http://www.eclipse.org/articles/Article-GEF-Draw2d/GEF-Draw2 d.html,
and I was thinking if there is a way to implement some drag capabilities to
the labels which are child of the connection (the labels with 'contains',
'1..*', etc). I can't change their position...
Is there a way to do that?
Thanks in advance.
Carlos Augusto Grahl
|
|
| |
Re: Dragging a child label [message #94419 is a reply to message #94304] |
Tue, 16 September 2003 09:17   |
Eclipse User |
|
|
|
Originally posted by: carlos.grahl.senior.com.br
Yes, Randy. I knew that. My question is: how to allow a Label, which is a
child of a connection, be moved with the mouse? And show the selection
handles, etc..? When I click on the label, the connection is selected. I
can't select only the label..
Thanks
Carlos Augusto Grahl
"Randy Hudson" <none@us.ibm.com> escreveu na mensagem
news:bk52cb$hh9$1@eclipse.org...
> You could possible do that with mouse listeners, but you'd eventually want
> more than that. This is what org.eclipse.gef does. It adds tools which
> handle mouse events, and "editparts". Try reading the GEF tutorial too.
>
> "Carlos Augusto C. Grahl" <carlos.grahl@senior.com.br> wrote in message
> news:bk512g$g4n$1@eclipse.org...
> > Hi!
> >
> > I was looking at the article (which is great!) Display a UML Diagram
using
> > Draw2D
http://www.eclipse.org/articles/Article-GEF-Draw2d/GEF-Draw2 d.html,
> > and I was thinking if there is a way to implement some drag capabilities
> to
> > the labels which are child of the connection (the labels with
'contains',
> > '1..*', etc). I can't change their position...
> >
> > Is there a way to do that?
> >
> > Thanks in advance.
> >
> > Carlos Augusto Grahl
> >
> >
>
>
|
|
|
Re: Dragging a child label [message #94492 is a reply to message #94419] |
Tue, 16 September 2003 10:30   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Desculpe. To be able to select the label, the label should be a child
editpart of the connection editpart. To be able to drag the label, you will
need an editpolicy for dragging, which modifies some property in your model,
which then updates the locator which places the label. How this is done
depends on the locator, but the simplest locator would be a (dx, dy) offset
from the connection's endpoint.
"Carlos Augusto C. Grahl" <carlos.grahl@senior.com.br> wrote in message
news:bk72e2$ekd$1@eclipse.org...
> Yes, Randy. I knew that. My question is: how to allow a Label, which is a
> child of a connection, be moved with the mouse? And show the selection
> handles, etc..? When I click on the label, the connection is selected. I
> can't select only the label..
>
> Thanks
>
> Carlos Augusto Grahl
>
>
>
> "Randy Hudson" <none@us.ibm.com> escreveu na mensagem
> news:bk52cb$hh9$1@eclipse.org...
> > You could possible do that with mouse listeners, but you'd eventually
want
> > more than that. This is what org.eclipse.gef does. It adds tools which
> > handle mouse events, and "editparts". Try reading the GEF tutorial too.
> >
> > "Carlos Augusto C. Grahl" <carlos.grahl@senior.com.br> wrote in message
> > news:bk512g$g4n$1@eclipse.org...
> > > Hi!
> > >
> > > I was looking at the article (which is great!) Display a UML Diagram
> using
> > > Draw2D
> http://www.eclipse.org/articles/Article-GEF-Draw2d/GEF-Draw2 d.html,
> > > and I was thinking if there is a way to implement some drag
capabilities
> > to
> > > the labels which are child of the connection (the labels with
> 'contains',
> > > '1..*', etc). I can't change their position...
> > >
> > > Is there a way to do that?
> > >
> > > Thanks in advance.
> > >
> > > Carlos Augusto Grahl
> > >
> > >
> >
> >
>
>
|
|
|
Re: Dragging a child label [message #94565 is a reply to message #94492] |
Tue, 16 September 2003 12:27  |
Eclipse User |
|
|
|
Originally posted by: carlos.grahl.senior.com.br
"desculpe" in Portuguese? :-)
Carlos
"Randy Hudson" <none@us.ibm.com> escreveu na mensagem
news:bk76nf$jo7$1@eclipse.org...
> Desculpe. To be able to select the label, the label should be a child
> editpart of the connection editpart. To be able to drag the label, you
will
> need an editpolicy for dragging, which modifies some property in your
model,
> which then updates the locator which places the label. How this is done
> depends on the locator, but the simplest locator would be a (dx, dy)
offset
> from the connection's endpoint.
>
> "Carlos Augusto C. Grahl" <carlos.grahl@senior.com.br> wrote in message
> news:bk72e2$ekd$1@eclipse.org...
> > Yes, Randy. I knew that. My question is: how to allow a Label, which is
a
> > child of a connection, be moved with the mouse? And show the selection
> > handles, etc..? When I click on the label, the connection is selected. I
> > can't select only the label..
> >
> > Thanks
> >
> > Carlos Augusto Grahl
> >
> >
> >
> > "Randy Hudson" <none@us.ibm.com> escreveu na mensagem
> > news:bk52cb$hh9$1@eclipse.org...
> > > You could possible do that with mouse listeners, but you'd eventually
> want
> > > more than that. This is what org.eclipse.gef does. It adds tools
which
> > > handle mouse events, and "editparts". Try reading the GEF tutorial
too.
> > >
> > > "Carlos Augusto C. Grahl" <carlos.grahl@senior.com.br> wrote in
message
> > > news:bk512g$g4n$1@eclipse.org...
> > > > Hi!
> > > >
> > > > I was looking at the article (which is great!) Display a UML Diagram
> > using
> > > > Draw2D
> > http://www.eclipse.org/articles/Article-GEF-Draw2d/GEF-Draw2 d.html,
> > > > and I was thinking if there is a way to implement some drag
> capabilities
> > > to
> > > > the labels which are child of the connection (the labels with
> > 'contains',
> > > > '1..*', etc). I can't change their position...
> > > >
> > > > Is there a way to do that?
> > > >
> > > > Thanks in advance.
> > > >
> > > > Carlos Augusto Grahl
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
Goto Forum:
Current Time: Fri May 02 00:19:40 EDT 2025
Powered by FUDForum. Page generated in 0.02793 seconds
|