01: /*
02: * $Id: TranslucentRepaintManager.java,v 1.5 2006/08/22 22:05:59 rbair Exp $
03: *
04: * Copyright 2006 Sun Microsystems, Inc., 4150 Network Circle,
05: * Santa Clara, California 95054, U.S.A. All rights reserved.
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation; either
10: * version 2.1 of the License, or (at your option) any later version.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public
18: * License along with this library; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20: */
21:
22: package org.jdesktop.swingx;
23:
24: import java.lang.annotation.ElementType;
25: import java.lang.annotation.Retention;
26: import java.lang.annotation.RetentionPolicy;
27: import java.lang.annotation.Target;
28:
29: /**
30: * <p>An annotation that can be applied to a {@link RepaintManager} to suggest that
31: * the <code>RepaintManager</code> supports translucency. If a <code>JXPanel</code>
32: * is made translucent by setting it's alpha property to a value between 0 and 1,
33: * then the <code>JXPanel</code> must ensure that a <code>RepaintManager</code>
34: * capable of handling transparency is installed. This annotation tells the
35: * <code>JXPanel</code> that the installed <code>RepaintManager</code> does not
36: * need to be replaced. This is critical for custom <code>RepaintManager</code>s
37: * which are used in applications along with transparent <code>JXPanel</code>s.</p>
38: *
39: * <p>A <code>RepaintManager</code> supports translucency if, when a repaint on a
40: * child component occurs, it begins painting <em>not</em> on the child component,
41: * but on the child component's <code>JXPanel</code> ancestor if: a) there is such
42: * an ancestor and b) the ancestor returns an effective alpha of < 1.</p>
43: *
44: * @see {@link RepaintManagerX}
45: * @see {@link JXPanel}
46: * @author rbair
47: */
48: @Retention(RetentionPolicy.RUNTIME)
49: @Target(ElementType.TYPE)
50: public @interface TranslucentRepaintManager {
51: }
|