ButtonModel
AbstractButton
, BasicArrowButton
, Checkbox
, CheckboxMenuItem
, Choice
, DefaultButtonModel
, JButton
, JCheckBox
, JCheckBoxMenuItem
, JComboBox
, JMenu
, JMenuItem
, JRadioButton
, JRadioButtonMenuItem
, JToggleButton
, JToggleButton.ToggleButtonModel
, List
, MetalComboBoxButton
, MetalScrollButton
public interface ItemSelectable
Modifier and Type | Method | Description |
---|---|---|
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.
|
Object[] getSelectedObjects()
null
if no
items are selected.null
void addItemListener(ItemListener l)
l
is
null
, no exception is thrown and no action is performed.l
- the listener to receive eventsItemEvent
void removeItemListener(ItemListener l)
l
is null
,
no exception is thrown and no action is performed.l
- the listener being removedItemEvent
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps