setConnectionAnchor when collapsing container [message #245661] |
Tue, 23 September 2008 21:52 |
Eclipse User |
|
|
|
Originally posted by: kelvinng.db.gmail.com
When I collapse a container, I want to change the anchors for the edit
parts inside of the container.
When I call setConnectionAnchor on my edit part to change it's anchor,
the link disappears!
Instead, I want it to change anchor points.
This is generally what my code looks like:
=============================================
handleNotificationEvent(Notification event) {
boolean isCollapsed = ...
if (isCollapsed) {
// someone collapsed the container
...
((Goal2EditPart)(ep)).setConnectionAnchor(new ChopboxAnchor(getFigure()));
}
}
=============================================
~Kelvin Ng
|
|
|
Re: setConnectionAnchor when collapsing container [message #245666 is a reply to message #245661] |
Tue, 23 September 2008 23:34 |
Eclipse User |
|
|
|
Originally posted by: kelvinng.db.gmail.com
On 2008-09-23 17:52:49 -0400, Kelvin Ng <kelvinng.db@gmail.com> said:
> When I collapse a container, I want to change the anchors for the edit
> parts inside of the container.
>
> When I call setConnectionAnchor on my edit part to change it's anchor,
> the link disappears!
>
> Instead, I want it to change anchor points.
>
> This is generally what my code looks like:
>
> =============================================
> handleNotificationEvent(Notification event) {
>
> boolean isCollapsed = ...
> if (isCollapsed) {
> // someone collapsed the container
> ...
> ((Goal2EditPart)(ep)).setConnectionAnchor(new ChopboxAnchor(getFigure()));
> }
> }
> =============================================
>
>
> ~Kelvin Ng
Sorry, I forgot to mention that I had implemented a set method for the anchor:
public void setConnectionAnchor(ConnectionAnchor newAnchor) {
anchor = newAnchor;
}
~Kelvin Ng
|
|
|
Powered by
FUDForum. Page generated in 0.02167 seconds