APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.swing.plaf.nimbus

pack-priv abstract Class Effect

extends Object
Class Inheritance
Known Direct Subclasses
javax.swing.plaf.nimbus.ShadowEffect
Imports
java.awt.image.BufferedImage, java.lang.ref.SoftReference

Effect
Author
Created by Jasper Potts (Jun 18, 2007)

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private static final Effect.ArrayCache

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract BufferedImage

Returns:

The result of applying the effect
applyEffect
(BufferedImage
The source image for applying the effect to
src
,
BufferedImage
The destination image to paint effect result into. If this is null then a new image will be created
dst
,
int
The width of the src image to apply effect to, this allow the src and dst buffers to be bigger than the area the need effect applied to it
w
,
int
The height of the src image to apply effect to, this allow the src and dst buffers to be bigger than the area the need effect applied to it
h
)

Apply the effect to the src image generating the result .

protected static Effect.ArrayCache
pack-priv abstract Effect.EffectType

Returns:

The effect type
getEffectType
()

Get the type of this effect, one of UNDER, BLENDED, OVER.

pack-priv abstract float

Returns:

The opacity for the effect, 0.0f -> 1.0f
getOpacity
()

Get the opacity to use to paint the result effected image if the EffectType is UNDER or OVER.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ARRAY_CACHEback to summary
private static final Effect.ArrayCache ARRAY_CACHE

Constructor Detail

Effectback to summary
pack-priv Effect()

Method Detail

applyEffectback to summary
pack-priv abstract BufferedImage applyEffect(BufferedImage src, BufferedImage dst, int w, int h)

Apply the effect to the src image generating the result . The result image may or may not contain the source image depending on what the effect type is.

Parameters
src:BufferedImage

The source image for applying the effect to

dst:BufferedImage

The destination image to paint effect result into. If this is null then a new image will be created

w:int

The width of the src image to apply effect to, this allow the src and dst buffers to be bigger than the area the need effect applied to it

h:int

The height of the src image to apply effect to, this allow the src and dst buffers to be bigger than the area the need effect applied to it

Returns:BufferedImage

The result of applying the effect

getArrayCacheback to summary
protected static Effect.ArrayCache getArrayCache()
getEffectTypeback to summary
pack-priv abstract Effect.EffectType getEffectType()

Get the type of this effect, one of UNDER, BLENDED, OVER.

  • UNDER means the result of applying the effect should be painted under the src image.
  • BLENDED means the result of applying the effect contains a modified src image, so it should just be painted.
  • OVER means the result of applying the effect should be painted over the src image.
Returns:Effect.EffectType

The effect type

getOpacityback to summary
pack-priv abstract float getOpacity()

Get the opacity to use to paint the result effected image if the EffectType is UNDER or OVER.

Returns:float

The opacity for the effect, 0.0f -> 1.0f

javax.swing.plaf.nimbus back to summary

protected Class Effect.ArrayCache

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private SoftReference<byte[]>
private SoftReference<byte[]>
private SoftReference<byte[]>
private SoftReference<int[]>

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected byte[]
getTmpByteArray1(int size)

protected byte[]
getTmpByteArray2(int size)

protected byte[]
getTmpByteArray3(int size)

protected int[]
getTmpIntArray(int size)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

tmpByteArray1back to summary
private SoftReference<byte[]> tmpByteArray1
tmpByteArray2back to summary
private SoftReference<byte[]> tmpByteArray2
tmpByteArray3back to summary
private SoftReference<byte[]> tmpByteArray3
tmpIntArrayback to summary
private SoftReference<int[]> tmpIntArray

Constructor Detail

ArrayCacheback to summary
protected ArrayCache()

Method Detail

getTmpByteArray1back to summary
protected byte[] getTmpByteArray1(int size)
getTmpByteArray2back to summary
protected byte[] getTmpByteArray2(int size)
getTmpByteArray3back to summary
protected byte[] getTmpByteArray3(int size)
getTmpIntArrayback to summary
protected int[] getTmpIntArray(int size)
javax.swing.plaf.nimbus back to summary

pack-priv final Enum Effect.EffectType

extends Enum<Effect.EffectType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final Effect.EffectType
public static final Effect.EffectType
public static final Effect.EffectType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Effect.EffectType
public static Effect.EffectType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BLENDEDback to summary
public static final Effect.EffectType BLENDED
OVERback to summary
public static final Effect.EffectType OVER
UNDERback to summary
public static final Effect.EffectType UNDER

Constructor Detail

EffectTypeback to summary
private EffectType()

Method Detail

valueOfback to summary
public static Effect.EffectType valueOf(String name)
valuesback to summary
public static Effect.EffectType[] values()