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
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
ConstructorsConstructorDescriptionConvolveWidget
(Scene scene, ConvolveOp convolveOp) Creates a convolve widget with a specified ColvolveOp. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears an offscreen buffer.Returns a convolve operation.protected void
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
-
Constructor Details
-
ConvolveWidget
Creates a convolve widget with a specified ColvolveOp.- Parameters:
scene
- the sceneconvolveOp
- the convolve operation
-
-
Method Details
-
getConvolveOp
-
setConvolveOp
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 classWidget
-