protected RadialGradientPaint createSection3DEffectGradient ( final int WIDTH , final float RADIUS_FACTOR ) { final float [ ] FRACTIONS ; final Color [ ] COLORS ; if ( isExpandedSectionsEnabled ( ) ) { FRACTIONS = new float [ ] { 0.0f , 0.7f , 0.75f , 0.96f , 1.0f } ; COLORS = new Color [ ] { new Color ( 0.0f , 0.0f , 0.0f , 1.0f ) , new Color ( 0.9f , 0.9f , 0.9f , 0.2f ) , new Color ( 1.0f , 1.0f , 1.0f , 0.5f ) , new Color ( 0.1843137255f , 0.1843137255f , 0.1843137255f , 0.3f ) , new Color ( 0.0f , 0.0f , 0.0f , 0.2f ) } ; } else { FRACTIONS = new float [ ] { 0.0f , 0.89f , 0.955f , 1.0f } ; COLORS = new Color [ ] { new Color ( 0.0f , 0.0f , 0.0f , 0.0f ) , new Color ( 0.0f , 0.0f , 0.0f , 0.3f ) , new Color ( 1.0f , 1.0f , 1.0f , 0.6f ) , new Color ( 0.0f , 0.0f , 0.0f , 0.4f ) } ; } final Point2D GRADIENT_CENTER = new Point2D . Double ( WIDTH / 2.0 , WIDTH / 2.0 ) ; return new RadialGradientPaint ( GRADIENT_CENTER , WIDTH * RADIUS_FACTOR , FRACTIONS , COLORS ) ; }
Returns a radial gradient paint that will be used as overlay for the track or section image to achieve some kind of a 3d effect .