Skip to main content



      Home
Home » Modeling » Graphiti » Preventing Connection from being deleted
Preventing Connection from being deleted [message #1701804] Wed, 15 July 2015 14:53 Go to next message
Eclipse UserFriend
Is it possible to not be able to move or delete Connection and Anchors?
Re: Preventing Connection from being deleted [message #1701887 is a reply to message #1701804] Thu, 16 July 2015 09:00 Go to previous messageGo to next message
Eclipse UserFriend
Alex,

yes, simply override getDeleteFeature and getMoveAnchorFeature in your
feature provider. Returning null or an instance that returns false on
canDelete/canMove will do the trick.

HTH,
Michael
Re: Preventing Connection from being deleted [message #1701897 is a reply to message #1701887] Thu, 16 July 2015 10:33 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Michael.

I tried your suggestions and they work. However, I still am able to select a connection and move its endpoints to another anchor. I override getMoveShapeFeature() that returns null, but it does not apply to Connections since they are not Shapes.

Alex
Re: Preventing Connection from being deleted [message #1702194 is a reply to message #1701897] Mon, 20 July 2015 10:35 Go to previous message
Eclipse UserFriend
Alex,

moving an endpoint means reconnecting a connection. For this the reconnection feature is asked, default implementation is DefaultReconnectionFeature queried from IFeatureProvider.getReconnetionFeature.

HTH,
Michael
Previous Topic:Make connection point always static relative to anchor
Next Topic:Graphiti ToolTips
Goto Forum:
  


Current Time: Wed Apr 23 21:45:48 EDT 2025

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

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

Back to the top