Olivier R. wrote: > > i'm using xxe-pro-5.3.0 and i would like to add comments to my document > ; actually it's a simple yellow line in the document, i would like to > put these comments in a tooltip. > This method is already used in the compare tool, so i think it must be > possible ; > could you please tell me the way to do that?
In a document view, styled or not, each XML node is represented by one or more Gadgets: http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmledit/gadget/Gadget.html A Gadget is a little like an AWT Component, but just much more lightweight. A gadget may have a tooltip (AKA balloon help). See http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmledit/gadget/Gadget.html#getToolTip(int,%20int) For example, an <?xxe-remark?> is styled as follows: Excerpts from XXE's builtin.css: --- *::processing-instruction(xxe-remark) { display: inline; content: gadget("com.xmlmind.xmleditapp.cmd.diff.RemarkIndicator"); background-color: transparent; font-size: inherit; } --- com.xmlmind.xmleditapp.cmd.diff.RemarkIndicator is a Gadget factory which creates a special Gadget: a com.xmlmind.xmleditapp.cmd.diff.RemarkIndicatorTVP. Though Gadgets are part of XXE's public API, how to write Gadgets is not explained anywhere in our documentation. Moreover, because writing Gadgets may be tricky, we do not plan to write such documentation, nor we encourage third-party developers to write custom Gadgets. In practice, you can either: [1] Write a custom GadgetFactory and its custom Gadget by reading the source code of XXE. (Your site license gives you access to the full source code of XXE.) [2] Write a custom ComponentFactory and possibly, its custom Component after reading the following reference: * http://www.xmlmind.com/xmleditor/_distrib/doc/dev/styleext.html#d0e5111 * http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/component.html * http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmledit/styledview/ComponentFactory.html Method [1] is not supported by us and therefore, we'll not answer to any of your questions related to Gadgets. Method [2] though much less efficient (I mean a document view typically contains tens of thousands of Gadgets. It could not reasonably contain tens of thousands of AWT Components), is quite simpler to implement and fully supported by us. This being said, may be there are other, simpler, ways to implement what you want but, currently, I don't see them. -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

