APIdia Launch Partner
Top Description Methods
java.awt

public Interface ItemSelectable

Known Direct Subinterfaces
javax.swing.ButtonModel
Known Direct Implementers
java.awt.List, java.awt.Checkbox, javax.swing.AbstractButton, javax.swing.JComboBox, java.awt.CheckboxMenuItem, java.awt.Choice
Imports
java.awt.event.*

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

Method Summary

Modifier and TypeMethod and Description
public void
addItemListener(ItemListener
the listener to receive events
l
)

Adds a listener to receive item events when the state of an item is changed by the user.

public Object[]

Returns:

the list of selected objects, or null
getSelectedObjects
()

Returns the selected items or null if no items are selected.

public void
removeItemListener(ItemListener
the listener being removed
l
)

Removes an item listener.

Method Detail

addItemListenerback to summary
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:ItemListener

the listener to receive events

See Also
ItemEvent
getSelectedObjectsback to summary
public Object[] getSelectedObjects()

Returns the selected items or null if no items are selected.

Returns:Object[]

the list of selected objects, or null

removeItemListenerback to summary
public void removeItemListener(ItemListener l)

Removes an item listener. If l is null, no exception is thrown and no action is performed.

Parameters
l:ItemListener

the listener being removed

See Also
ItemEvent