public interface FocusListener extends SWTEventListener
After creating an instance of a class that implements
this interface it can be added to a control using the
addFocusListener
method and removed using
the removeFocusListener
method. When a
control gains or loses focus, the appropriate method
will be invoked.
FocusAdapter
,
FocusEvent
Modifier and Type | Method and Description |
---|---|
void |
focusGained(FocusEvent e)
Sent when a control gets focus.
|
static FocusListener |
focusGainedAdapter(Consumer<FocusEvent> c)
Static helper method to create a
FocusListener for the
focusGained(FocusEvent e) ) method with a lambda expression. |
void |
focusLost(FocusEvent e)
Sent when a control loses focus.
|
static FocusListener |
focusLostAdapter(Consumer<FocusEvent> c)
Static helper method to create a
FocusListener for the
focusLost(FocusEvent e) ) method with a lambda expression. |
void focusGained(FocusEvent e)
e
- an event containing information about the focus changevoid focusLost(FocusEvent e)
e
- an event containing information about the focus changestatic FocusListener focusGainedAdapter(Consumer<FocusEvent> c)
FocusListener
for the
focusGained(FocusEvent e)
) method with a lambda expression.c
- the consumer of the eventstatic FocusListener focusLostAdapter(Consumer<FocusEvent> c)
FocusListener
for the
focusLost(FocusEvent e)
) method with a lambda expression.c
- the consumer of the event
Copyright (c) 2000, 2017 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.