kumo icon indicating copy to clipboard operation
kumo copied to clipboard

Catch event when word is clicked on

Open HausReport opened this issue 8 years ago • 3 comments

Does kumo provide a mechanism to handle clicking on words in the cloud widget? Ideally, I'd like the user to be able to click on, say, "Apple" and be able to register a listener that gets the string "Apple".

HausReport avatar Mar 21 '16 13:03 HausReport

I've thought about this a lot. Right now it draws directly to an image but I'd like to provide that kind of support for when embedding into a JFrame. It's not trivial unfortunately.

kennycason avatar Mar 21 '16 16:03 kennycason

that feature would be great! I found Kumo yesterday, so I'm just starting to explore the possibilities of Kumo. Didn't know there is a "Cloud Widget"? I currently develop a flickr stats tool and use Kumo in conjunction with Flickr4Java to visualice the used photo-tags. I show the cloud as a JLable icon in a JDialog, I'd even be satisfied with a tooltip/word to show the wordfrequency.

artikulant avatar Oct 07 '16 20:10 artikulant

My opinion is that JFrame is only one possible option, I guess many users of your wonderful API don't embed the generated cloud in a swing client. A first very interesting step would be have the possibility to get, after generation, the list of words with the used coordinates in the rendered picture. This would open the way to implement click support for many platforms (web with javascript, mobile clients, swing ...). In my particular case, I think I will generate the picture server side, and then use it both on web and mobile clients (android, IOs). If I have the list of coordinates I will be able to intercept the clicks and then start any action required. Moreover, this would not require big changes in your code, as you already have knowledge of the positions of each word to avoid collisions.

dje34 avatar Aug 03 '17 16:08 dje34