-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ToolTips #9
base: dev
Are you sure you want to change the base?
ToolTips #9
Conversation
This works, but is *really* only a proof of concept. one needs to activate it with: `(view as DefaultView).setToolTips(true)` And one needs to use gs-ui-swing of course. Then, the `String` attributes "ui.tooltip" set on nodes, edges and sprites are shown as Swing `JToolTip`s.
Thanks for your contribution. However, is this code need to be in DefaultView ? I see it more in DefaultMouseManager, with the InteractiveElement defined in the constructor. What do you think ? |
the main code is in two methods that are part of |
I have to say... while many things in Java and also Swing are more or less well designed, the tool-tip system looks like quite an exception to that. ;-) |
sounds like even inside the JDK itsself, other methods are sometimes used: |
A custom JDialog seems to be a good idea. You can use the mouseOverElement and mouseLeftElement methods of the MouseOverMouseManager class to create and remove the tooltip. To use this class, the addition of |
This works, but really is only a proof of concept.
one needs to activate it with:
(view as DefaultView).setToolTips(true)
And one needs to use gs-ui-swing of course.
Then, the
String
attributes "ui.tooltip" set on nodes, edges and spritesare shown as Swing
JToolTip
s.(I do not think this should be merges as is)