Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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>

    public class AlphaPainter<T>

extends CompoundPainter<T>

Applies an alpha value to an entire stack of painters.

Author:
  joshy

Nested Class Summary

Nested classes/interfaces inherited from class org.jdesktop.swingx.painter.AbstractPainter
`AbstractPainter.Interpolation`

Constructor Summary
`AlphaPainter()`

Method Summary
`protected void` | `doPaint(java.awt.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`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AlphaPainter

    public AlphaPainter()

Method Detail

### doPaint

    protected void doPaint(java.awt.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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010. All Rights Reserved.