What I am trying to do is, I have a Tag-tree Browser and List Component side by side. When I select a tags in the tag-tree browser and drags them on to list component, it should show tagPaths of those selected tags in List Component upon dropping them.
I tried using mouseDragged event handler of list component, but it only works if mouse pressed inside list component and then drag it. However it does not count when I press mouse button outside the list component and then drop onto it.
Yes earlier I tried that using mouseEntered also. What happens with is is if I select a tag in browser tree and instead of entering into List component I choose not to. Later if I enter into list component area, it adds the last selected tagPath.
The intension is, all the paths collected in list component are saving inside local DB and then some tag historical, history interval , start date, end date comes into picture.
Yeah the charting and some other stuff is there too.
Thing is earlier client were using same layout (tree browser + list component) and upon clicking on tag in Tag Tree, the tagPath would show on right side. So now they want to keep the layout similar but just update it.
Hence after update tagPath should appear in list component after dropping selected tag onto it and not just by selecting tag in tag tree browser.
There is a fairly significant difference between this and drag and drop. Especially considering that it isn’t natively exposed. To properly implement this would require a significant amount of non-trivial java coding.
I can understand not wanting to add a tag to the chart when you click on it. I can also understand how the original programmer arrived at that solution.
I would suggest implementing a popup menu.
For instance I have implemented a popup menu for our ad-hoc charting and give the operators the option of “Loading a Tag” into the chart, or refreshing the tag tree in case tags have been added.
In this way the act of selecting a tag doesn’t add it to the chart, instead the operator has to take deliberate action.