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

  1. /*
  2.  * @(#)ItemSelectable.java    1.4 97/01/06
  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 contain a set of items for
  29.  * which zero or more can be selected.
  30.  *
  31.  * @version 1.4 01/06/97
  32.  * @author Amy Fowler
  33.  */
  34.  
  35. public interface ItemSelectable {
  36.  
  37.     /**
  38.      * Returns the selected items or null if no items are selected.
  39.      */
  40.     public Object[] getSelectedObjects();
  41.  
  42.     /**
  43.      * Add a listener to recieve item events when the state of
  44.      * an item changes.
  45.      * @param l the listener to recieve events
  46.      * @see ItemEvent
  47.      */    
  48.     public void addItemListener(ItemListener l);
  49.  
  50.     /**
  51.      * Removes an item listener.
  52.      * @param l the listener being removed
  53.      * @see ItemEvent
  54.      */ 
  55.     public void removeItemListener(ItemListener l);
  56.  
  57. }
  58.