public Paint getLeftShadowGradient ( Shape s ) { Rectangle2D bounds = s . getBounds2D ( ) ; float minX = ( float ) bounds . getMinX ( ) ; float maxX = ( float ) bounds . getMaxX ( ) ; float midY = ( float ) bounds . getCenterY ( ) ; return new LinearGradientPaint ( minX , midY , maxX , midY , ( new float [ ] { 0f , 1f } ) , new Color [ ] { innerShadow . bottom , transparentColor } ) ; }
Create the gradient for the left of a rectangular shadow .