Skip to main content



      Home
Home » Eclipse Projects » GEF » PolylineConnection in GEF
PolylineConnection in GEF [message #27250] Thu, 10 October 2002 02:34 Go to next message
Eclipse UserFriend
Originally posted by: truenoto.yahoo.com

How can I make a PolylineConnection
- nonbendable?
- nonmovable (user can not change the start/end of the line)?

Thanks.
Re: PolylineConnection in GEF [message #27740 is a reply to message #27250] Thu, 10 October 2002 03:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: edisontooNOSPAM.yahoo.com.sg

Hi,

Try

protected void createEditPolicies() {
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE,null );
installEditPolicy(EditPolicy.CONNECTION_ENDPOINTS_ROLE,null) ;
}

in your connection's EditPart. Note that user may still be able to move
the connection by selecting it using a marquee in your editor and then
move the whole connection by dragging it. To prevent that, you will have
to modify the LayoutPolicy used by the container edit part ( see
getChildEditPolicy()).

Hope this helps.

Cheers,
Edison

Takumi Fujiwara wrote:
> How can I make a PolylineConnection
> - nonbendable?
> - nonmovable (user can not change the start/end of the line)?
>
> Thanks.
>
>
Re: PolylineConnection in GEF [message #28242 is a reply to message #27740] Thu, 10 October 2002 09:52 Go to previous message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

"Edison Too" <edisontooNOSPAM@yahoo.com.sg> wrote in message
news:3DA52A24.2050401@yahoo.com.sg...
> Hi,
>
> Try
>
> protected void createEditPolicies() {
> installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE,null );
> installEditPolicy(EditPolicy.CONNECTION_ENDPOINTS_ROLE,null) ;
> }

I think ENDPOINTS_ROLE is still useful to display the Selection of the
connection. Maybe Fujiwara-san can open a feature request for
ConnectionEndpointEditPolicy() to be configured to *not* return and
DragTrackers from the endpoint handles. They will still appear to show
selection.

Alternatively, the Node could simple return UnexecutableCommand for any
requests to reconnect the source/target connection.

> in your connection's EditPart. Note that user may still be able to move
> the connection by selecting it using a marquee in your editor and then
> move the whole connection by dragging it. To prevent that, you will have
> to modify the LayoutPolicy used by the container edit part ( see
> getChildEditPolicy()).
>
> Hope this helps.
>
> Cheers,
> Edison
>
> Takumi Fujiwara wrote:
> > How can I make a PolylineConnection
> > - nonbendable?
> > - nonmovable (user can not change the start/end of the line)?
> >
> > Thanks.
> >
> >
>
>
Previous Topic:Minimum GEF requirements to display connections between nodes?
Next Topic:Hiding Selection during DirectEdit
Goto Forum:
  


Current Time: Tue Oct 21 16:43:13 EDT 2025

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

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

Back to the top