home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / main.bin / Adjustable.java < prev    next >
Text File  |  1997-05-20  |  4KB  |  138 lines

  1. /*
  2.  * @(#)Adjustable.java    1.5 96/11/23
  3.  * 
  4.  * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  * CopyrightVersion 1.1_beta
  20.  * 
  21.  */
  22.  
  23. package java.awt;
  24.  
  25. import java.awt.event.*;
  26.  
  27. /**
  28.  * The interface for objects which have an adjustable numeric value
  29.  * contained within a bounded range of values.
  30.  *
  31.  * @version 1.5 11/23/96
  32.  * @author Amy Fowler
  33.  * @author Tim Prinzing
  34.  */
  35.  
  36. public interface Adjustable {
  37.  
  38.     /**
  39.      * The horizontal orientation.  
  40.      */
  41.     public static final int HORIZONTAL = 0; 
  42.  
  43.     /**
  44.      * The vertical orientation.  
  45.      */
  46.     public static final int VERTICAL = 1;    
  47.  
  48.     /**
  49.      * Gets the orientation of the adjustable object.
  50.      */
  51.     int getOrientation();
  52.  
  53.     /**
  54.      * Sets the minimum value of the adjustable object.
  55.      * @param min the minimum value
  56.      */
  57.     void setMinimum(int min);
  58.  
  59.     /**
  60.      * Gets the minimum value of the adjustable object.
  61.      */
  62.     int getMinimum();
  63.  
  64.     /**
  65.      * Sets the maximum value of the adjustable object.
  66.      * @param max the maximum value
  67.      */
  68.     void setMaximum(int max);
  69.  
  70.     /**
  71.      * Gets the maximum value of the adjustable object.
  72.      */
  73.     int getMaximum();
  74.  
  75.     /**
  76.      * Sets the unit value increment for the adjustable object.
  77.      * @param u the unit increment
  78.      */
  79.     void setUnitIncrement(int u);
  80.  
  81.     /**
  82.      * Gets the unit value increment for the adjustable object.
  83.      */
  84.     int getUnitIncrement();
  85.  
  86.     /**
  87.      * Sets the block value increment for the adjustable object.
  88.      * @param b the block increment
  89.      */
  90.     void setBlockIncrement(int b);
  91.  
  92.     /**
  93.      * Gets the block value increment for the adjustable object.
  94.      */
  95.     int getBlockIncrement();
  96.  
  97.     /**
  98.      * Sets the length of the proportionl indicator of the
  99.      * adjustable object.
  100.      * @param v the length of the indicator
  101.      */
  102.     void setVisibleAmount(int v);
  103.  
  104.     /**
  105.      * Gets the length of the propertional indicator.
  106.      */
  107.     int getVisibleAmount();
  108.  
  109.     /**
  110.      * Sets the current value of the adjustable object. This
  111.      * value must be within the range defined by the minimum and
  112.      * maximum values for this object.
  113.      * @param v the current value 
  114.      */
  115.     void setValue(int v);
  116.  
  117.     /**
  118.      * Gets the current value of the adjustable object.
  119.      */
  120.     int getValue();
  121.  
  122.     /**
  123.      * Add a listener to recieve adjustment events when the value of
  124.      * the adjustable object changes.
  125.      * @param l the listener to recieve events
  126.      * @see AdjustmentEvent
  127.      */    
  128.     void addAdjustmentListener(AdjustmentListener l);
  129.  
  130.     /**
  131.      * Removes an adjustment listener.
  132.      * @param l the listener being removed
  133.      * @see AdjustmentEvent
  134.      */ 
  135.     void removeAdjustmentListener(AdjustmentListener l);
  136.  
  137. }    
  138.