Package org.ka2ddo.yaac.gui.util
Class EnableOnListSelect
java.lang.Object
org.ka2ddo.yaac.gui.util.EnableOnListSelect
- All Implemented Interfaces:
EventListener
,ListSelectionListener
This class implements a list selection listener that will control the enable
state of an associated JComponent based on whether something is selected in
the list.
- Author:
- Andrew Pavlin, KA2DDO
-
Constructor Summary
ConstructorDescriptionEnableOnListSelect
(JComponent comp) Create a listener to enable or disable the associated JComponent when the list is selected or unselected. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called whenever the value of the selection changes.
-
Constructor Details
-
EnableOnListSelect
Create a listener to enable or disable the associated JComponent when the list is selected or unselected.- Parameters:
comp
- JComponent to enable/disable
-
-
Method Details
-
valueChanged
Called whenever the value of the selection changes.- Specified by:
valueChanged
in interfaceListSelectionListener
- Parameters:
e
- the event that characterizes the change.
-