Make objects blink in an application

Article ID: 2238
Last updated: 28 May, 2018
Article ID: 2238
Last updated: 28 May, 2018
Revision: 3
Views: 534
Posted: 03 Mar, 2011
by Dean J.
Updated: 28 May, 2018
by Gargani A.

Question

How to have blinking objects in my application?

Answer

Since JViews 8.5, blinking and blinking colors are available for all graphic objects. See IlvGraphic.setBlinkingOnPeriod andIlvGraphic.setBlinkingOffPeriod.

Before JViews 8.5:

The blinking effect is just switching the visibility of an IlvGraphic within a manager. Other types of blinking consist in switching between two different colors. However, there is a common requirement: all objects blink at the same time and the display is refreshed properly.

The attached sample implements this external modification: the BlinkingManager class, which is associated with an IlvManager, controls the visibility or color of the graphics within the manager and invokes the update of the views accordingly. The blinking effect is implemented using ajavax.swing.Timer to make sure that all modifications to the manager are done in the event thread.

The sample includes a standalone application to show this class in action. To start it, just uncompress the blinkingDemo.zip in a folder, compile the modules and start the BlinkingDemo main class (with "java BlinkingDemo").


Note: In order to run this sample with JViews 8.7 and later, you must call the ilog.views.util.IlvProductUtil.DeploymentLicenseRequiredmethod 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.

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

Also listed in


Others in this category