Home » Eclipse Projects » GEF » Logic Editor Example question. Property Change Event for "source", "source terminal&q
Logic Editor Example question. Property Change Event for "source", "source terminal&q [message #38762] |
Sun, 03 November 2002 22:54 |
Eclipse User |
|
|
|
Originally posted by: sy_cheung2.yahoo.com
Hi,
In the Logic Editor example, the connection will fire Property Change Events
for "source", "source terminal", "target", "target terminal", but in the
connection edit part, I can't find code handle those change event. so what
is the purposes of firing those events?
And when I draw a new connection, I notice it fires those change events
BEFORE the editpart is activate. In other words, the editpart is NOT
listening to any property change event when it fires those "source"/"source
terminal" change event.
Thanks for any help.
|
|
|
Re: Logic Editor Example question. Property Change Event for "source", "source termin [message #38795 is a reply to message #38762] |
Sun, 03 November 2002 23:12 |
Eclipse User |
|
|
|
Originally posted by: hudsonr.us.eye-bee-em.com
"Sam Cheung" <sy_cheung2@yahoo.com> wrote in message
news:aq47iu$ua7$1@rogue.oti.com...
> Hi,
>
> In the Logic Editor example, the connection will fire Property Change
Events
> for "source", "source terminal", "target", "target terminal", but in the
> connection edit part, I can't find code handle those change event. so
what
> is the purposes of firing those events?
I think it probably just fires the change for consistency, not because the
WireEditPart needs to be notified. In fact, as you noted below, during
creation there is *no* ConnectionEditPart, only nodes. So clearly the nodes
are interested parties, and will be listening to the inverse property which
is more important.
> And when I draw a new connection, I notice it fires those change events
> BEFORE the editpart is activate. In other words, the editpart is NOT
> listening to any property change event when it fires those
"source"/"source
> terminal" change event.
Let's assume the ConnectionEditPart is also interested in these properties.
Perhaps to change its color or label some hover help or something. The fact
that it is not active during part of its creation is not important. It will
do a full refresh() after both source and target nodes have been set, so any
important properties that are displayed will be updated after it is "fully
attached".
You could verify this by placing labels at the ends of the wire that label
the source/target "terminals".
> Thanks for any help.
>
>
>
>
|
|
|
Re: Logic Editor Example question. Property Change Event for "source", "source termin [message #38986 is a reply to message #38795] |
Mon, 04 November 2002 06:21 |
Eclipse User |
|
|
|
Originally posted by: sy_cheung2.yahoo.com
Randy, Thanks.
Could you please tell mw when I need to activate()/deactivate() a figure of
a connection?
Why detach() a connection will deactivate the figure of the connection?
And why it is the Source which activate the connection figure when it calls
refreshSourceConnections()? Not when I construct a ConnectionEditPart and
in the constructor, it calls activate?
"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:aq48mh$ulc$1@rogue.oti.com...
>
> "Sam Cheung" <sy_cheung2@yahoo.com> wrote in message
> news:aq47iu$ua7$1@rogue.oti.com...
> > Hi,
> >
> > In the Logic Editor example, the connection will fire Property Change
> Events
> > for "source", "source terminal", "target", "target terminal", but in the
> > connection edit part, I can't find code handle those change event. so
> what
> > is the purposes of firing those events?
>
> I think it probably just fires the change for consistency, not because the
> WireEditPart needs to be notified. In fact, as you noted below, during
> creation there is *no* ConnectionEditPart, only nodes. So clearly the
nodes
> are interested parties, and will be listening to the inverse property
which
> is more important.
>
> > And when I draw a new connection, I notice it fires those change events
> > BEFORE the editpart is activate. In other words, the editpart is NOT
> > listening to any property change event when it fires those
> "source"/"source
> > terminal" change event.
>
> Let's assume the ConnectionEditPart is also interested in these
properties.
> Perhaps to change its color or label some hover help or something. The
fact
> that it is not active during part of its creation is not important. It
will
> do a full refresh() after both source and target nodes have been set, so
any
> important properties that are displayed will be updated after it is "fully
> attached".
>
> You could verify this by placing labels at the ends of the wire that label
> the source/target "terminals".
>
> > Thanks for any help.
> >
> >
> >
> >
>
>
|
|
|
Goto Forum:
Current Time: Wed Feb 05 18:05:59 GMT 2025
Powered by FUDForum. Page generated in 0.03053 seconds
|