Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* $Id$
*
* Copyright 2006 Sun Microsystems, Inc., 4150 Network Circle,
* Santa Clara, California 95054, U.S.A. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.jdesktop.swingx.painter;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Rectangle;
import java.awt.geom.Area;
import java.awt.geom.Ellipse2D;
import org.jdesktop.beans.JavaBean;
/**
*
A Painter implementation that simulates a gloss effect. The gloss can
* be positioned at the top or bottom of the drawing area. To fill the gloss,
* this painter uses a Paint instance which can be used to fill with a color
* (opaque or translucent), a texture, a gradient...
*
The following example creates a white gloss at the top of the drawing
* area:
*
* GlossPainter p = new GlossPainter();
* p.setPaint(new Color(1.0f, 1.0f, 1.0f, 0.2f);
* p.setPosition(GlossPainter.GlossPosition.TOP);
* panel.setBackgroundPainter(p);
*
*
The values shown in this examples are the values used by default if
* they are not specified.
*
* @author Romain Guy
*/
@JavaBean
@SuppressWarnings("nls")
public class GlossPainter extends AbstractPainter