org.netbeans.api.visual 2.21.1

org.netbeans.api.visual.widget
Class ConvolveWidget

java.lang.Object
  extended by org.netbeans.api.visual.widget.Widget
      extended by org.netbeans.api.visual.widget.ConvolveWidget
All Implemented Interfaces:
Accessible

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.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.netbeans.api.visual.widget.Widget
Widget.Dependency
 
Constructor Summary
ConvolveWidget(Scene scene, ConvolveOp convolveOp)
          Creates a convolve widget with a specified ColvolveOp.
 
Method Summary
 void clearCache()
          Clears an offscreen buffer.
 ConvolveOp getConvolveOp()
          Returns a convolve operation.
protected  void paintChildren()
          Paints the children into the offscreen buffer and then the buffer is rendered regularly using the convolve operation.
 void setConvolveOp(ConvolveOp convolveOp)
          Sets a convolve operation.
 
Methods inherited from class org.netbeans.api.visual.widget.Widget
addChild, addChild, addChild, addChild, addChildren, addDependency, bringToBack, bringToFront, calculateClientArea, convertLocalToScene, convertLocalToScene, convertSceneToLocal, convertSceneToLocal, createActions, equals, getAccessibleContext, getActions, getActions, getBackground, getBorder, getBounds, getChildConstraint, getChildren, getClientArea, getCursor, getCursorAt, getDependencies, getFont, getForeground, getGraphics, getLayout, getLocation, getLookup, getMaximumSize, getMinimumSize, getParentWidget, getPreferredBounds, getPreferredLocation, getPreferredSize, getResourceTable, getScene, getState, getToolTipText, hashCode, isCheckClipping, isEnabled, isHitAt, isOpaque, isPreferredBoundsSet, isRepaintRequiredForRevalidating, isValidated, isVisible, notifyAdded, notifyBackgroundChanged, notifyFontChanged, notifyForegroundChanged, notifyRemoved, notifyStateChanged, paint, paintBackground, paintBorder, paintWidget, removeChild, removeChildren, removeChildren, removeDependency, removeFromParent, repaint, resolveBounds, revalidate, revalidate, setAccessibleContext, setBackground, setBackgroundFromResource, setBorder, setBorder, setCheckClipping, setChildConstraint, setCursor, setEnabled, setFont, setFontFromResource, setForeground, setForegroundFromResource, setLayout, setMaximumSize, setMinimumSize, setOpaque, setPreferredBounds, setPreferredLocation, setPreferredSize, setResourceTable, setState, setToolTipText, setVisible, updateResources
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvolveWidget

public ConvolveWidget(Scene scene,
                      ConvolveOp convolveOp)
Creates a convolve widget with a specified ColvolveOp.

Parameters:
scene - the scene
convolveOp - the convolve operation
Method Detail

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

org.netbeans.api.visual 2.21.1

Built on February 13 2010.  |  Portions Copyright 1997-2010 Sun Microsystems, Inc. All rights reserved.