org.jdesktop.swingx.TranslucentRepaintManager Maven / Gradle / Ivy
/*
* $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;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* An annotation that can be applied to a {@link javax.swing.RepaintManager} to suggest that
* the RepaintManager
supports translucency. If a JXPanel
* is made translucent by setting it's alpha property to a value between 0 and 1,
* then the JXPanel
must ensure that a RepaintManager
* capable of handling transparency is installed. This annotation tells the
* JXPanel
that the installed RepaintManager
does not
* need to be replaced. This is critical for custom RepaintManager
s
* which are used in applications along with transparent JXPanel
s.
*
* A RepaintManager
supports translucency if, when a repaint on a
* child component occurs, it begins painting not on the child component,
* but on the child component's JXPanel
ancestor if: a) there is such
* an ancestor and b) the ancestor returns an effective alpha of < 1.
*
* @see RepaintManagerX
* @see JXPanel
* @author rbair
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface TranslucentRepaintManager {
}