Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » setConnectionAnchor when collapsing container
setConnectionAnchor when collapsing container [message #245661] Tue, 23 September 2008 21:52 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:freeformlayer with positive coordinates only ?
Next Topic:[Announce] GEF 3.5.0M2 is available
Goto Forum:
  


Current Time: Tue Mar 19 05:43:25 GMT 2024

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

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

Back to the top