org.jvnet.substance.painter
Class AlphaControlBackgroundComposite

java.lang.Object
  extended by org.jvnet.substance.painter.ControlBackgroundComposite
      extended by org.jvnet.substance.painter.AlphaControlBackgroundComposite

public class AlphaControlBackgroundComposite
extends ControlBackgroundComposite

Constant-translucency ControlBackgroundComposite that paints all non-active components with translucent composite.

Author:
Kirill Grouchnikov

Field Summary
protected  java.awt.Composite active
          Composite for active controls.
protected  float alpha
          Alpha value for this composite.
protected  float alphaActive
          Alpha value for this composite.
protected  java.awt.Composite nonActive
          Composite for non-active controls.
 
Constructor Summary
AlphaControlBackgroundComposite(float alpha)
          Creates the new constant-translucent composite.
AlphaControlBackgroundComposite(float alpha, float alphaActive)
          Creates the new constant-translucenct composite.
 
Method Summary
 java.awt.Composite getBackgroundComposite(java.awt.Component component, java.awt.Container container, int componentIndex, boolean isPaintedActive)
          Returns the background composite for the specified component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alpha

protected float alpha
Alpha value for this composite.


alphaActive

protected float alphaActive
Alpha value for this composite.


active

protected java.awt.Composite active
Composite for active controls.


nonActive

protected java.awt.Composite nonActive
Composite for non-active controls.

Constructor Detail

AlphaControlBackgroundComposite

public AlphaControlBackgroundComposite(float alpha)
Creates the new constant-translucent composite.

Parameters:
alpha - Alpha value for this composite for controls in non-active state.

AlphaControlBackgroundComposite

public AlphaControlBackgroundComposite(float alpha,
                                       float alphaActive)
Creates the new constant-translucenct composite.

Parameters:
alpha - Alpha value for this composite for controls in non-active state.
alphaActive - Alpha value for this composite for controls in active state.
Method Detail

getBackgroundComposite

public java.awt.Composite getBackgroundComposite(java.awt.Component component,
                                                 java.awt.Container container,
                                                 int componentIndex,
                                                 boolean isPaintedActive)
Description copied from class: ControlBackgroundComposite
Returns the background composite for the specified component.

Specified by:
getBackgroundComposite in class ControlBackgroundComposite
Parameters:
component - Component.
container - Container of the component.
componentIndex - Index of the component in its container.
isPaintedActive - Indication whether the component is in active visual state.
Returns:
Background composite for the specified component.