Selection question

I am wondering if there is anything in the JGoEvent Framework that would allow us to tell the difference between a user clicking from one object to another and a user deselecting/selecting an object?

We generate a window when a user clicks on a JGoObject using a JGoViewListener, we currently are listening for the SELECTION_GAINED and SELECTION_LOST events. However I’m wondering is it possible to have a SELECTION_CHANGED event which tells if the selection is just changing?

I say this because using the current method the window is destroyed in SELECTION_LOST then created again with SELECTION_GAINED and this is causing some errors in our framework. I’m wondering if there is a workaround?

I think the simplest approach might be to destroy the window when the BACKGROUND_CLICKED event occurs. You could use either the CLICKED or SELECTION_CHANGED event to bring up the window (if not already displayed) and specify the correct contents.

Sorry my bad, by SELECTION_CHANGED I meant SELECTION_FINISHED.
What we want is to check the final state of selection and change the window accordingly.

We we’re thinking that the selection_finished event might fix this for us. However it doesn’t seem to fire as we would expect. The java doc notes that the event “happens just after a number of objects are selected or de-selected.” but it doesn’t seem to fire at all. I am wondering if this is a bug perhaps? or maybe we have a misconception about it’s use.

In general, JGo can’t know when the selection is finished. A user can always extend the selection by doing a shift-click operation.

If I understand you correctly, I still think you can achieve what you want by using the SELECTION_GAINED and BACKGROUND_CLICKED events. On BACKGROUND_CLICKED you can destroy your window. On SELECTION_GAINED you can display your window (if not already displayed) and modify the contents according to the current selection (JGoView.getSelection()).