| The Android Open Source Project | 7c1b96a | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | * contributor license agreements. See the NOTICE file distributed with |
| 4 | * this work for additional information regarding copyright ownership. |
| 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | * (the "License"); you may not use this file except in compliance with |
| 7 | * the License. You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | /** |
| 18 | * @author Michael Danilov |
| 19 | * @version $Revision$ |
| 20 | */ |
| The Android Open Source Project | e09fd9e | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 21 | |
| The Android Open Source Project | 7c1b96a | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 22 | package java.awt; |
| 23 | |
| 24 | import java.awt.event.ItemListener; |
| 25 | |
| 26 | /** |
| 27 | * The ItemSelectable interface represents a set of items which can be selected. |
| The Android Open Source Project | e09fd9e | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 28 | * |
| 29 | * @since Android 1.0 |
| The Android Open Source Project | 7c1b96a | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 30 | */ |
| 31 | public interface ItemSelectable { |
| 32 | |
| 33 | /** |
| The Android Open Source Project | e09fd9e | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 34 | * Adds an ItemListener for receiving item events when the state of an item |
| 35 | * is changed by the user. |
| The Android Open Source Project | 7c1b96a | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 36 | * |
| The Android Open Source Project | e09fd9e | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 37 | * @param l |
| 38 | * the ItemListener. |
| The Android Open Source Project | 7c1b96a | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 39 | */ |
| 40 | public void addItemListener(ItemListener l); |
| 41 | |
| 42 | /** |
| The Android Open Source Project | e09fd9e | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 43 | * Gets an array of the selected objects or null if there is no selected |
| The Android Open Source Project | 7c1b96a | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 44 | * object. |
| The Android Open Source Project | e09fd9e | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 45 | * |
| 46 | * @return an array of the selected objects or null if there is no selected |
| 47 | * object. |
| The Android Open Source Project | 7c1b96a | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 48 | */ |
| 49 | public Object[] getSelectedObjects(); |
| 50 | |
| 51 | /** |
| 52 | * Removes the specified ItemListener. |
| 53 | * |
| The Android Open Source Project | e09fd9e | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 54 | * @param l |
| 55 | * the ItemListener which will be removed. |
| The Android Open Source Project | 7c1b96a | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 56 | */ |
| 57 | public void removeItemListener(ItemListener l); |
| 58 | |
| 59 | } |