| | | | Browse by category |
Question
How to count the number of IlvGraphic objects currently visible in IlvManagerView?
Answer
You can easily retrieve the number of graphical objects of a manager with the IlvManager.getObjects()
method, but getting the number of objects that are visible on the screen must be done with a small routine.
The attached sample CountObject.java illustrates a way of doing that by using the IlvManager.mapIntersects()
method and a class that implements IlvApplyObject
.
Note: In order to run this sample with JViews 8.7 and later, you must call the log.views.util.IlvProductUtil.DeploymentLicenseRequired
method with the appropriate argument. See the General information > Deployment licenses > Declaring the use of IBM ILOG JViews services
section in the documentation for more information.