blob: 212cf709e5232c28487f8f45b99682a4acad559b [file] [log] [blame]
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -07001/*
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 Projecte09fd9e2008-12-17 18:05:43 -080021
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070022package java.awt;
23
24import java.awt.event.ItemListener;
25
26/**
27 * The ItemSelectable interface represents a set of items which can be selected.
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080028 *
29 * @since Android 1.0
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070030 */
31public interface ItemSelectable {
32
33 /**
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080034 * Adds an ItemListener for receiving item events when the state of an item
35 * is changed by the user.
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070036 *
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080037 * @param l
38 * the ItemListener.
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070039 */
40 public void addItemListener(ItemListener l);
41
42 /**
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080043 * Gets an array of the selected objects or null if there is no selected
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070044 * object.
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080045 *
46 * @return an array of the selected objects or null if there is no selected
47 * object.
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070048 */
49 public Object[] getSelectedObjects();
50
51 /**
52 * Removes the specified ItemListener.
53 *
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080054 * @param l
55 * the ItemListener which will be removed.
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070056 */
57 public void removeItemListener(ItemListener l);
58
59}