Home » Modeling » Graphiti » Capture zone of anchors, setReferencedGraphicsAlgorithm
Capture zone of anchors, setReferencedGraphicsAlgorithm [message #717189] |
Fri, 19 August 2011 14:47 |
Hernan Gonzalez Messages: 188 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?)
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 |
Michael Wenz Messages: 1931 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".
|
|
| |
Goto Forum:
Current Time: Tue Apr 16 10:34:42 GMT 2024
Powered by FUDForum. Page generated in 0.39922 seconds
|