Package org.eclipse.swt.events
Interface ControlListener
- All Superinterfaces:
EventListener
,SWTEventListener
- All Known Implementing Classes:
AnnotationBarHoverManager.Closer
,ControlAdapter
Classes which implement this interface provide methods
that deal with the events that are generated by moving
and resizing controls.
After creating an instance of a class that implements
this interface it can be added to a control using the
addControlListener
method and removed using
the removeControlListener
method. When a
control is moved or resized, the appropriate method will
be invoked.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Sent when the location (x, y) of a control changes relative to its parent (or relative to the display, forShell
s).static ControlListener
Static helper method to create aControlListener
for thecontrolMoved(ControlEvent e)
) method, given a lambda expression or a method reference.void
Sent when the size (width, height) of a control changes.static ControlListener
Static helper method to create aControlListener
for thecontrolResized(ControlEvent e)
) method, given a lambda expression or a method reference.
-
Method Details
-
controlMoved
Sent when the location (x, y) of a control changes relative to its parent (or relative to the display, forShell
s).- Parameters:
e
- an event containing information about the move
-
controlResized
Sent when the size (width, height) of a control changes.- Parameters:
e
- an event containing information about the resize
-
controlMovedAdapter
Static helper method to create aControlListener
for thecontrolMoved(ControlEvent e)
) method, given a lambda expression or a method reference.- Parameters:
c
- the consumer of the event- Returns:
- ControlListener
- Since:
- 3.107
-
controlResizedAdapter
Static helper method to create aControlListener
for thecontrolResized(ControlEvent e)
) method, given a lambda expression or a method reference.- Parameters:
c
- the consumer of the event- Returns:
- ControlListener
- Since:
- 3.107
-