Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Capture zone of anchors, setReferencedGraphicsAlgorithm
Capture zone of anchors, setReferencedGraphicsAlgorithm [message #717189] Fri, 19 August 2011 14:47 Go to next message
Hernan Gonzalez is currently offline Hernan GonzalezFriend
Messages: 181
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
I turned to BoxRelativeAnchor (FixPointAnchor seemed too buggy), I'm having doubts regarding the "capture zone" (don't know if if this is the right term) of an anchor, and the role of the associated GA.

I tried to implement this hierarchy:

(BTW: you can't upload images to this forum, no?)
http://img217.imageshack.us/img217/6245/graphiti2.png

It almost worked as expected. Except that the anchor only "captures" the mouse pointer (i.e., it turns on to accept connection start) in a very tiny spot (not even its little GA rectangle, it seems just a single pixel position), practically impossible to find.

Then I saw that the tutorial calls a setReferencedGraphicsAlgorithm() method, but it doesnt explain what for ("anchor references visible rectangle instead of invisible rectangle" - why?), and the Javadoc of the method says nothing.

I tried to set its referencedGraphicsAlgorithm to the connRect (green rectangle), but no difference. I tried to set it to the big roundedRect (red), but it throws an exception: "ga and referenceGa must not be null, and ga must be a child of referenceGA".

[Updated on: Fri, 19 August 2011 14:48]

Report message to a moderator

Re: Capture zone of anchors, setReferencedGraphicsAlgorithm [message #719892 is a reply to message #717189] Mon, 29 August 2011 10:36 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1635
Registered: July 2009
Location: Walldorf, Germany
Senior Member
In the tuturial you have an outer invisible rectangle that contains both the
shape of the class itself and the connection point (the circle that is drawn
on top of the border but overlaps to the outside of the shape. In order to
enable that the outer invisible rectangle has been created.

Unfortunatly this connection point is not used, otherwise it would probably
be your exact usecase.

In case the connection is really only possible to that one pixel please open
a Bugzilla so we can track this.

Michael


"Hernan" schrieb im Newsbeitrag news:j2lsd5$rb$1@news.eclipse.org...

I turned to BoxRelativeAnchor (FixPointAnchor seemed too buggy), I'm having
doubts regarding the "capture zone" (don't know if if this is the right
term) of an anchor, and the role of the associated GA.

I tried to implement this hierarchy:
http://img217.imageshack.us/img217/6245/graphiti2.png

(BTW: you can't upload images to this forum, no?)


It almost worked as expected. Except that the anchor only "captures" the
mouse pointer (i.e., it turns on to accept connection start) in a very tiny
spot (not even its little GA rectangle, it seems just a single pixel
position), practically impossible to find.

Then I saw that the tutorial calls a setReferencedGraphicsAlgorithm()
method, but it doesnt explain what for ("anchor references visible rectangle
instead of invisible rectangle" - why?), and the Javadoc of the method says
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.graphiti.doc%2Fjavadoc%2Forg%2Feclipse%2Fgraphiti%2Fmm%2Fpictograms%2FAnchor.html.

I tried to set its referencedGraphicsAlgorithm to the connRect (green
rectangle), but no difference. I tried to set it to the big roundedRect
(red), but it throws an exception: "ga and referenceGa must not be null, and
ga must be a child of referenceGA".
Re: Capture zone of anchors, setReferencedGraphicsAlgorithm [message #719953 is a reply to message #719892] Mon, 29 August 2011 14:50 Go to previous message
Hernan Gonzalez is currently offline Hernan GonzalezFriend
Messages: 181
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
Michael Wenz wrote on Mon, 29 August 2011 07:36


In case the connection is really only possible to that one pixel please open
a Bugzilla so we can track this.



Thanks, Michael. But I'm not confortable opening issues when I'm not sure about the expected behaviours. In particular, I still don't have the slightest idea about the "referencedGraphicAlgorithm" role, and how it's supposed to influence the Anchor behaviour. Does the referencedGA, or the GA, (or none) define the capture zone of the anchor?
Previous Topic:How to make a shape Unselectable
Next Topic:Patterns - DeleteFeature hasDone problem
Goto Forum:
  


Current Time: Sun Nov 23 07:26:59 GMT 2014

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

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