|
|
Re: Anchors and resizing [message #119722 is a reply to message #119398] |
Fri, 27 February 2004 12:19 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: josephlee.163.com
implement the following code in you figure.
public void validate() {
if(isValid()) return;
//you can use getSize method to get the new location of your figure.
layoutConnectionAnchors();
super.validate();
}
hope these can give you some suggestions.
Ryan Pu wrote:
> Matt,
> You needn't update anchor locations in your own code
> if your anchor extends the AbstractConnectionAnchor.
> Matt wrote on 2004-2-25 15:15:
> > Hi all,
> >
> > I have a number of Figures that send Points to
> > their anchors to control
> > the anchors' locations. The anchors move with
> > the Figures, but when the Figures are re-sized,
> > the anchor positions don't expand and contract.
> >
> > I've tried updating the location Points in the
> > Figures' paintFigure()
> > method, but it hasn't been working. Any
> > thoughts?
> >
> > I apologize in advance if this has been asked
> > elsewhere, but I hadn't found it.
> >
> > Matt
|
|
|
Re: Anchors and resizing [message #119798 is a reply to message #119722] |
Sat, 28 February 2004 12:43 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Ryan Pu![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=ryanp%40sina.com) Messages: 7 Registered: July 2009 |
Junior Member |
|
|
You should not do like that. You needn't code in figure if
your anchor extends AbstractConnectionAnchor. Because when
figure translated or moved, Figure#fireMoved() will be
called, thus listener added by AbstractConnectionAnchor
will notify listeners of connections to update. And as a
result, the connections will call the anchor's
getReferencePoint() and getLocation() again to get a newer
location.
joseph wrote on 2004-2-27 20:19:
> implement the following code in you figure.
> public void validate() {
> if(isValid()) return;
> //you can use getSize method to get the new location of
> your figure. layoutConnectionAnchors();
> super.validate();
> }
> hope these can give you some suggestions.
> Ryan Pu wrote:
>
>> Matt,
>
>> You needn't update anchor locations in your own code
>> if your anchor extends the AbstractConnectionAnchor.
>
>> Matt wrote on 2004-2-25 15:15:
>
>> > Hi all,
>> >
>> > I have a number of Figures that send Points to
>> > their anchors to control
>> > the anchors' locations. The anchors move with
>> > the Figures, but when the Figures are re-sized,
>> > the anchor positions don't expand and contract.
>> >
>> > I've tried updating the location Points in the
>> > Figures' paintFigure()
>> > method, but it hasn't been working. Any
>> > thoughts?
>> >
>> > I apologize in advance if this has been asked
>> > elsewhere, but I hadn't found it.
>> >
>> > Matt
|
|
|
Powered by
FUDForum. Page generated in 0.03803 seconds