java.awt
Interface ItemSelectable

All Known Subinterfaces:
ButtonModel sample code for javax.swing.ButtonModel definition code for javax.swing.ButtonModel
All Known Implementing Classes:
AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton , BasicArrowButton sample code for javax.swing.plaf.basic.BasicArrowButton definition code for javax.swing.plaf.basic.BasicArrowButton , Checkbox sample code for java.awt.Checkbox definition code for java.awt.Checkbox , CheckboxMenuItem sample code for java.awt.CheckboxMenuItem definition code for java.awt.CheckboxMenuItem , Choice sample code for java.awt.Choice definition code for java.awt.Choice , DefaultButtonModel sample code for javax.swing.DefaultButtonModel definition code for javax.swing.DefaultButtonModel , JButton sample code for javax.swing.JButton definition code for javax.swing.JButton , JCheckBox sample code for javax.swing.JCheckBox definition code for javax.swing.JCheckBox , JCheckBoxMenuItem sample code for javax.swing.JCheckBoxMenuItem definition code for javax.swing.JCheckBoxMenuItem , JComboBox sample code for javax.swing.JComboBox definition code for javax.swing.JComboBox , JMenu sample code for javax.swing.JMenu definition code for javax.swing.JMenu , JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem , JRadioButton sample code for javax.swing.JRadioButton definition code for javax.swing.JRadioButton , JRadioButtonMenuItem sample code for javax.swing.JRadioButtonMenuItem definition code for javax.swing.JRadioButtonMenuItem , JToggleButton sample code for javax.swing.JToggleButton definition code for javax.swing.JToggleButton , JToggleButton.ToggleButtonModel sample code for javax.swing.JToggleButton.ToggleButtonModel definition code for javax.swing.JToggleButton.ToggleButtonModel , List sample code for java.awt.List definition code for java.awt.List , MetalComboBoxButton sample code for javax.swing.plaf.metal.MetalComboBoxButton definition code for javax.swing.plaf.metal.MetalComboBoxButton , MetalScrollButton sample code for javax.swing.plaf.metal.MetalScrollButton definition code for javax.swing.plaf.metal.MetalScrollButton

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 sample code for java.awt.ItemSelectable.addItemListener(java.awt.event.ItemListener) definition code for java.awt.ItemSelectable.addItemListener(java.awt.event.ItemListener) (ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.ItemListener  l)
          Adds a listener to receive item events when the state of an item is changed by the user.
 Object sample code for java.lang.Object definition code for java.lang.Object [] getSelectedObjects sample code for java.awt.ItemSelectable.getSelectedObjects() definition code for java.awt.ItemSelectable.getSelectedObjects() ()
          Returns the selected items or null if no items are selected.
 void removeItemListener sample code for java.awt.ItemSelectable.removeItemListener(java.awt.event.ItemListener) definition code for java.awt.ItemSelectable.removeItemListener(java.awt.event.ItemListener) (ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.ItemListener  l)
          Removes an item listener.
 

Method Detail

getSelectedObjects sample code for java.awt.ItemSelectable.getSelectedObjects() definition code for java.awt.ItemSelectable.getSelectedObjects()

Object sample code for java.lang.Object definition code for java.lang.Object [] getSelectedObjects()
Returns the selected items or null if no items are selected.


addItemListener sample code for java.awt.ItemSelectable.addItemListener(java.awt.event.ItemListener) definition code for java.awt.ItemSelectable.addItemListener(java.awt.event.ItemListener)

void addItemListener(ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.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 sample code for java.awt.event.ItemEvent definition code for java.awt.event.ItemEvent

removeItemListener sample code for java.awt.ItemSelectable.removeItemListener(java.awt.event.ItemListener) definition code for java.awt.ItemSelectable.removeItemListener(java.awt.event.ItemListener)

void removeItemListener(ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.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 sample code for java.awt.event.ItemEvent definition code for java.awt.event.ItemEvent