Displaying an image map for the title bar area of subgraphs in my JViews Diagrammer JSF Web application

Article ID: 2345
Last updated: 30 May, 2018
Article ID: 2345
Last updated: 30 May, 2018
Revision: 3
Views: 659
Posted: 11 Mar, 2011
by Dean J.
Updated: 30 May, 2018
by Gargani A.

Question

How can I display an image map for the title bar area of subgraphs in my JViews Diagrammer JSF Web application?

Answer

The method responsible for the area generation is IlvImageMapAreaGenerator.shouldGenerate() will return true:

  • If the graphic is not an IlvManager instance
  • If the graphic object is an IlvManager instance and this manager is collapsed
  • If the graphic object is an IlvManager instance and this manager is not collapsed, this method returns the result of isGenerateManagerArea()

By default, image maps are not generated for an expanded manager (subgraph): IlvImageMapAreaGenerator.isGenerateManagerArea() with return false.
To enable image map generation for an expanded manager, allow submanagers to generate an area by calling:

IlvImageMapAreaGenerator.setGenerateManagerArea(true);

By adding this line, the image map area for the whole subgraph can be generated. 
This means that wherever you are on the subgraph, the tooltip is visible.

In the current use case, you want to *limit* the image map generation to the title area of each subgraph.
You therefore need to restrict the generated coordinates where the image map can be displayed to the title area of each subgraph.
Such a restriction implies that you need to subclass the image map generator and override its generateCOORDS() method to return coordinates for the title area only and not for the whole subgraph graphic.

You can download this sample imagemap_subgraph_title.zip that illustrating this mechanism.

Note: Starting in JViews Diagrammer 8.7, a new Tooltip interactor has been introduced that shows tooltip of graphic objects on JSF components. This new interactor uses the Hitmap technology which can work simultaneously with other interactors such as the zoom and pan interactor. This interactor will show tooltip of the subgraph when hovering over the title bar area by default. This Hitmap based Tooltips are preferable when implementing JViews Web applications.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2345
Last updated: 30 May, 2018
Revision: 3
Views: 659
Posted: 11 Mar, 2011 by Dean J.
Updated: 30 May, 2018 by Gargani A.
Attached files

Also listed in


Others in this category