Login | Register
My pages Projects Community openCollabNet

Discussions > dev > RE: [gef-dev] Listener for moving figs (was: GEF model concept)

gef
Discussion topic

Back to topic list

RE: [gef-dev] Listener for moving figs (was: GEF model concept)

Reply

Author Austin Bingham <abingham at lips dot utexas dot edu>
Full name Austin Bingham <abingham at lips dot utexas dot edu>
Date 2000-06-15 12:45:10 PDT
Message > I had a look at the source and this is what I found out until now.
> You have to implement a "PropertyChangeListener" and add it to
> the fig. If a Fig is resized or moved the "bounds"-property gets
> fired. Here is a snip of code as an example:
>
> // PropertyChangeListener
> node.presentationFor​(activeLayer()).addP​ropertyChangeListene​r
> (new PropertyChangeListener() {
> public void propertyChange(Prope​rtyChangeEvent pce) {
> System.out.println(p​ce.getSource()+"
> "+pce.getPropertyName()+": "+pce.getNewValue());
> }
> });
>
> I donĀ“t know if there is a more general way to get this information.
> But this is a first step. What do you think about it?

Hi Michael. It looks like what you say is right on the money! Like you say,
though, it seems like there should be a more general way. It seems logical
that JGraph should be able to tell us whenever a Fig moves. Thanks!

Austin

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

RE: [gef-dev] Listener for moving figs (was: GEF model concept) Austin Bingham <abingham at lips dot utexas dot edu> Austin Bingham <abingham at lips dot utexas dot edu> 2000-06-15 12:45:10 PDT
Messages per page: