jdk/src/share/classes/java/awt/Transparency.java
changeset 16734 da1901d79073
parent 12813 c10ab96dcf41
equal deleted inserted replaced
16733:9267ec7004a1 16734:da1901d79073
     1 /*
     1 /*
     2  * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package java.awt;
    26 package java.awt;
    27 
    27 
    28 import javax.tools.annotation.GenerateNativeHeader;
    28 import java.lang.annotation.Native;
    29 
    29 
    30 /**
    30 /**
    31  * The <code>Transparency</code> interface defines the common transparency
    31  * The <code>Transparency</code> interface defines the common transparency
    32  * modes for implementing classes.
    32  * modes for implementing classes.
    33  */
    33  */
    34 /* No native methods here, but the constants are needed in the supporting JNI code */
       
    35 @GenerateNativeHeader
       
    36 public interface Transparency {
    34 public interface Transparency {
    37 
    35 
    38     /**
    36     /**
    39      * Represents image data that is guaranteed to be completely opaque,
    37      * Represents image data that is guaranteed to be completely opaque,
    40      * meaning that all pixels have an alpha value of 1.0.
    38      * meaning that all pixels have an alpha value of 1.0.
    41      */
    39      */
    42     public final static int OPAQUE            = 1;
    40     @Native public final static int OPAQUE            = 1;
    43 
    41 
    44     /**
    42     /**
    45      * Represents image data that is guaranteed to be either completely
    43      * Represents image data that is guaranteed to be either completely
    46      * opaque, with an alpha value of 1.0, or completely transparent,
    44      * opaque, with an alpha value of 1.0, or completely transparent,
    47      * with an alpha value of 0.0.
    45      * with an alpha value of 0.0.
    48      */
    46      */
    49     public final static int BITMASK = 2;
    47     @Native public final static int BITMASK = 2;
    50 
    48 
    51     /**
    49     /**
    52      * Represents image data that contains or might contain arbitrary
    50      * Represents image data that contains or might contain arbitrary
    53      * alpha values between and including 0.0 and 1.0.
    51      * alpha values between and including 0.0 and 1.0.
    54      */
    52      */
    55     public final static int TRANSLUCENT        = 3;
    53     @Native public final static int TRANSLUCENT        = 3;
    56 
    54 
    57     /**
    55     /**
    58      * Returns the type of this <code>Transparency</code>.
    56      * Returns the type of this <code>Transparency</code>.
    59      * @return the field type of this <code>Transparency</code>, which is
    57      * @return the field type of this <code>Transparency</code>, which is
    60      *          either OPAQUE, BITMASK or TRANSLUCENT.
    58      *          either OPAQUE, BITMASK or TRANSLUCENT.