Creating your own highlighting effect

If you do not want or cannot use (because of your color scheme, for example) a predefined effect, you can also build your own instance of IlvHoverHighlightingImageOperation.
This class allows you to define which Java 2D image operation you want to use to highlight your objects. It also contains methods to provide a filter, to indicate which objects will be highlighted, and an opacity (or alpha) if you want to see the regular object representation through the highlighting effect.
For example, here is an operation that will have a more blurred effect, be half transparent and only for nongraphic bag objects.
float[] blur5Kernel = new float[5 * 5];
    for (int i = 0; i < blur5Kernel.length; i++) {
      blur5Kernel[i] = 1f / blur5Kernel.length;
    }
  IlvHoverHighlightingImageOperation myOperation=new
          IlvHoverHighlightingImageOperation(
            new ConvolveOp(new Kernel(5, 5, blur5Kernel)), 1));
  myOperation.setAlpha(0.5f);
  myOperation.setHighlightFilter(new 
IlvHoverHighlightingImageOperation.NonGraphicBagFilter());
You can set your operation instance on the manager by means of setHoverHighlightingImageOperation. The mode will then be known to the manager as "Custom".