org.jdesktop.swingx.painter
Class AlphaPainter<T>
java.lang.Object
org.jdesktop.beans.AbstractBean
org.jdesktop.swingx.painter.AbstractPainter<T>
org.jdesktop.swingx.painter.CompoundPainter<T>
org.jdesktop.swingx.painter.AlphaPainter<T>
- All Implemented Interfaces:
- Painter<T>
@JavaBean
public class AlphaPainter<T>
- extends CompoundPainter<T>
Applies an alpha value to an entire stack of painters.
- Author:
- joshy
Method Summary |
protected void |
doPaint(Graphics2D g,
T component,
int width,
int height)
Subclasses must implement this method and perform custom painting operations
here. |
float |
getAlpha()
Returns the current alpha value for this painter. |
void |
setAlpha(float alpha)
Sets the current alpha value for this painter. |
Methods inherited from class org.jdesktop.swingx.painter.CompoundPainter |
clearCache, clearLocalCache, configureGraphics, getPainters, getTransform, isCheckingDirtyChildPainters, isClipPreserved, isDirty, setCheckingDirtyChildPainters, setClipPreserved, setDirty, setPainters, setTransform, shouldUseCache, validate |
Methods inherited from class org.jdesktop.swingx.painter.AbstractPainter |
getFilters, getInterpolation, isAntialiasing, isCacheable, isVisible, paint, setAntialiasing, setCacheable, setFilters, setInterpolation, setVisible |
Methods inherited from class org.jdesktop.beans.AbstractBean |
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
AlphaPainter
public AlphaPainter()
doPaint
protected void doPaint(Graphics2D g,
T component,
int width,
int height)
- Subclasses must implement this method and perform custom painting operations
here.
- Overrides:
doPaint
in class CompoundPainter<T>
- Parameters:
g
- The Graphics2D object in which to paint
getAlpha
public float getAlpha()
- Returns the current alpha value for this painter. This is the alpha value that will be applied
to all painters set inside this painter. Alpha values will be multiplied. This means if you set an
alpha of 0.5 on this painter and you nest a painter inside which uses an alpha of 0.5 then the final
pixels drawn will have an alpha of 0.25.
- Returns:
- the current value of alpha property
setAlpha
public void setAlpha(float alpha)
- Sets the current alpha value for this painter. This is the alpha value that will be applied
to all painters set inside this painter. Alpha values will be multiplied. This means if you set an
alpha of 0.5 on this painter and you nest a painter inside which uses an alpha of 0.5 then the final
pixels drawn will have an alpha of 0.25.
- Parameters:
alpha
- the new value of the alpha property
Copyright © 2012. All Rights Reserved.