001 /*
002 * $Id: TranslucentRepaintManager.java 2476 2007-11-25 15:52:59Z kschaefe $
003 *
004 * Copyright 2006 Sun Microsystems, Inc., 4150 Network Circle,
005 * Santa Clara, California 95054, U.S.A. All rights reserved.
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * You should have received a copy of the GNU Lesser General Public
018 * License along with this library; if not, write to the Free Software
019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
020 */
021
022 package org.jdesktop.swingx;
023
024 import java.lang.annotation.ElementType;
025 import java.lang.annotation.Retention;
026 import java.lang.annotation.RetentionPolicy;
027 import java.lang.annotation.Target;
028
029 /**
030 * <p>An annotation that can be applied to a {@link javax.swing.RepaintManager} to suggest that
031 * the <code>RepaintManager</code> supports translucency. If a <code>JXPanel</code>
032 * is made translucent by setting it's alpha property to a value between 0 and 1,
033 * then the <code>JXPanel</code> must ensure that a <code>RepaintManager</code>
034 * capable of handling transparency is installed. This annotation tells the
035 * <code>JXPanel</code> that the installed <code>RepaintManager</code> does not
036 * need to be replaced. This is critical for custom <code>RepaintManager</code>s
037 * which are used in applications along with transparent <code>JXPanel</code>s.</p>
038 *
039 * <p>A <code>RepaintManager</code> supports translucency if, when a repaint on a
040 * child component occurs, it begins painting <em>not</em> on the child component,
041 * but on the child component's <code>JXPanel</code> ancestor if: a) there is such
042 * an ancestor and b) the ancestor returns an effective alpha of < 1.</p>
043 *
044 * @see RepaintManagerX
045 * @see JXPanel
046 * @author rbair
047 */
048 @Retention(RetentionPolicy.RUNTIME)
049 @Target(ElementType.TYPE)
050 public @interface TranslucentRepaintManager {
051 }