Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

JSR 217 (Maintenance Release)

java.awt
Interface ItemSelectable


public interface ItemSelectable

The interface for objects which contain a set of items for which zero or more can be selected.


Method Summary
 void addItemListener(ItemListener l)
          Adds a listener to receive item events when the state of an item is changed by the user.
 Object[] getSelectedObjects()
          Returns the selected items or null if no items are selected.
 void removeItemListener(ItemListener l)
          Removes an item listener.
 

Method Detail

getSelectedObjects

public Object[] getSelectedObjects()
Returns the selected items or null if no items are selected.


addItemListener

public void addItemListener(ItemListener l)
Adds a listener to receive item events when the state of an item is changed by the user. Item events are not sent when an item's state is set programmatically. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the listener to receive events
See Also:
ItemEvent

removeItemListener

public void removeItemListener(ItemListener l)
Removes an item listener. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the listener being removed
See Also:
ItemEvent

JSR 217 (Maintenance Release)

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 217 specification.