Class ConvolveWidget

java.lang.Object
org.netbeans.api.visual.widget.Widget
org.netbeans.api.visual.widget.ConvolveWidget
All Implemented Interfaces:
Accessible, org.openide.util.Lookup.Provider

public class ConvolveWidget extends Widget
The widget which applies a convolve filter to a graphics rendered by the children.

Children are painted to an offscreen buffer which is later painted with a convolve filter applied to it.

Because of the offscreen buffer, be careful about the size of the widget. The buffer stays allocated even after the painting and it is also expanding only (when required). You can clear the buffer using clearCache method.

  • Constructor Details

    • ConvolveWidget

      public ConvolveWidget(Scene scene, ConvolveOp convolveOp)
      Creates a convolve widget with a specified ColvolveOp.
      Parameters:
      scene - the scene
      convolveOp - the convolve operation
  • Method Details

    • getConvolveOp

      public ConvolveOp getConvolveOp()
      Returns a convolve operation.
      Returns:
      the convolve operation
    • setConvolveOp

      public void setConvolveOp(ConvolveOp convolveOp)
      Sets a convolve operation.
      Parameters:
      convolveOp - the convolve operation
    • clearCache

      public void clearCache()
      Clears an offscreen buffer.
    • paintChildren

      protected void paintChildren()
      Paints the children into the offscreen buffer and then the buffer is rendered regularly using the convolve operation.
      Overrides:
      paintChildren in class Widget