Is it possible to add a tooltip to an action from mxGraphActions? Or do I need to reimplement all graph actions on my own, just to get tooltips to those actions?

In the GraphEditor / SchemaEditor examples, the bind() method gets those mxGraphActions working on a graphComponent with arguments name, action, icon, but there is no possibility to set a tooltip.

Please help, because implementing each action again to do something like

putValue(SHORT_DESCRIPTION, "Tooltip text");

is not very effective.

asked 21 Jul '12, 09:33

fachexot's gravatar image

fachexot
461210
accept rate: 11%


We will change the bind action to adapt the SHORT_DESCRIPTION.

link

answered 30 Jul '12, 07:51

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

The getters are public, you can use the above code on the existing instances.

link

answered 22 Jul '12, 12:48

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

edited 22 Jul '12, 12:58

That's true, but the problem is, that the bind() function ignores properties (tooltips, icons etc) of created action (A1), because it creates a new abstract action (A2), that only gets the actionPerformed() implementation of A1, but not the properties like tooltips, icons etc...

(30 Jul '12, 07:43) fachexot
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×194
×10
×10

Asked: 21 Jul '12, 09:33

Seen: 1,471 times

Last updated: 30 Jul '12, 07:51