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.
/*
* 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.renderer;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.Painter;
import javax.swing.UIManager;
/**
* A JLabel optimized for usage in renderers and
* with a minimal background painter support.
*
* Note: the painter support will be switched to painter_work as
* soon it enters main.
*
* The reasoning for the performance-overrides is copied from core:
*
* The standard JLabel component was not
* designed to be used this way and we want to avoid
* triggering a revalidate each time the
* cell is drawn. This would greatly decrease performance because the
* revalidate message would be
* passed up the hierarchy of the container to determine whether any other
* components would be affected.
* As the renderer is only parented for the lifetime of a painting operation
* we similarly want to avoid the overhead associated with walking the
* hierarchy for painting operations.
* So this class
* overrides the validate, invalidate,
* revalidate, repaint, and
* firePropertyChange methods to be
* no-ops and override the isOpaque method solely to improve
* performance. If you write your own renderer component,
* please keep this performance consideration in mind.
*
* @author Jeanette Winzenburg
*/
@SuppressWarnings("serial")
public class JRendererLabel extends JLabel implements PainterAware