public class ConvolveWidget extends Widget
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.
Widget.Dependency
Constructor and Description |
---|
ConvolveWidget(Scene scene,
ConvolveOp convolveOp)
Creates a convolve widget with a specified ColvolveOp.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
public ConvolveWidget(Scene scene, ConvolveOp convolveOp)
scene
- the sceneconvolveOp
- the convolve operationpublic ConvolveOp getConvolveOp()
public void setConvolveOp(ConvolveOp convolveOp)
convolveOp
- the convolve operationpublic void clearCache()
protected void paintChildren()
paintChildren
in class Widget