Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Setting BoxRelativeAnchor at the source of ConnectionContext does work!!
Setting BoxRelativeAnchor at the source of ConnectionContext does work!! [message #932767] Thu, 04 October 2012 08:05 Go to next message
Surya Kathayat is currently offline Surya Kathayat
Messages: 44
Registered: July 2012
Member
Hi,

I have a dimond shaped graphical node. I have attached a ChopboxAnchor and four BoxRelativeAnchors at each corners a diamond.

I have a context button to a node. A connection feature is attached to a node. In the ToolBehaviorProvider/getContextButtonPad, I set box relative anchor as setSourceAnchor of CreateConnectionContext.

But in the add method of LinkCreateFeature, I am still getting ChopboxAnchor type as as the value of context.getSourceAnchor(). The concequence is that source of a connection is connected to a border of diamond instead of a (right) corner (where box relative anchor is set).

Any pointers will be appreciated??


Best regards
Surya

index.php/fa/11720/0/
  • Attachment: check.gif
    (Size: 3.52KB, Downloaded 164 times)
Re: Setting BoxRelativeAnchor at the source of ConnectionContext does work!! [message #933867 is a reply to message #932767] Fri, 05 October 2012 08:09 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1571
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Surya,

in the add method you can navigate from the passed anchor/shape to the
BoxRelativeAnchor you want to use. That will simply do the trick (both for
source and target side).

Michael

"Surya Kathayat" schrieb im Newsbeitrag
news:k4ju1m$jkb$1@xxxxxxxxe.org...

Hi,

I have a dimond shaped graphical node. I have attached a ChopboxAnchor and
four BoxRelativeAnchors at each corners a diamond.

I have a context button to a node. A connection feature is attached to a
node. In the ToolBehaviorProvider/getContextButtonPad, I set box relative
anchor as setSourceAnchor of CreateConnectionContext.

But in the add method of LinkCreateFeature, I am still getting ChopboxAnchor
type as as the value of context.getSourceAnchor(). The concequence is that
source of a connection is connected to a border of diamond instead of a
(right) corner (where box relative anchor is set).

Any pointers will be appreciated??


Best regards
Surya
Previous Topic:How Can I register Selection and Key Listeners for a shape
Next Topic:Maintaing a list of BoxRelativeAnchors in a Shape
Goto Forum:
  


Current Time: Tue Jul 22 03:28:06 EDT 2014

Powered by FUDForum. Page generated in 0.02182 seconds