jdk/src/share/classes/java/awt/Adjustable.java
changeset 16734 da1901d79073
parent 12813 c10ab96dcf41
equal deleted inserted replaced
16733:9267ec7004a1 16734:da1901d79073
     1 /*
     1 /*
     2  * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1996, 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
    25 
    25 
    26 package java.awt;
    26 package java.awt;
    27 
    27 
    28 import java.awt.event.*;
    28 import java.awt.event.*;
    29 
    29 
    30 import javax.tools.annotation.GenerateNativeHeader;
    30 import java.lang.annotation.Native;
    31 
    31 
    32 /**
    32 /**
    33  * The interface for objects which have an adjustable numeric value
    33  * The interface for objects which have an adjustable numeric value
    34  * contained within a bounded range of values.
    34  * contained within a bounded range of values.
    35  *
    35  *
    36  * @author Amy Fowler
    36  * @author Amy Fowler
    37  * @author Tim Prinzing
    37  * @author Tim Prinzing
    38  */
    38  */
    39 /* No native methods here, but the constants are needed in the supporting JNI code */
       
    40 @GenerateNativeHeader
       
    41 public interface Adjustable {
    39 public interface Adjustable {
    42 
    40 
    43     /**
    41     /**
    44      * Indicates that the <code>Adjustable</code> has horizontal orientation.
    42      * Indicates that the <code>Adjustable</code> has horizontal orientation.
    45      */
    43      */
    46     public static final int HORIZONTAL = 0;
    44     @Native public static final int HORIZONTAL = 0;
    47 
    45 
    48     /**
    46     /**
    49      * Indicates that the <code>Adjustable</code> has vertical orientation.
    47      * Indicates that the <code>Adjustable</code> has vertical orientation.
    50      */
    48      */
    51     public static final int VERTICAL = 1;
    49     @Native public static final int VERTICAL = 1;
    52 
    50 
    53     /**
    51     /**
    54      * Indicates that the <code>Adjustable</code> has no orientation.
    52      * Indicates that the <code>Adjustable</code> has no orientation.
    55      */
    53      */
    56     public static final int NO_ORIENTATION = 2;
    54     @Native public static final int NO_ORIENTATION = 2;
    57 
    55 
    58     /**
    56     /**
    59      * Gets the orientation of the adjustable object.
    57      * Gets the orientation of the adjustable object.
    60      * @return the orientation of the adjustable object;
    58      * @return the orientation of the adjustable object;
    61      *   either <code>HORIZONTAL</code>, <code>VERTICAL</code>,
    59      *   either <code>HORIZONTAL</code>, <code>VERTICAL</code>,