org.eclipse.eef.common.ui.api

## Class SWTUtils

- java.lang.Object
- - org.eclipse.eef.common.ui.api.SWTUtils

    public final class SWTUtils
    extends java.lang.Object

Utility methods for SWT.

### Method Summary

All Methods Static Methods Concrete Methods
`static org.eclipse.ui.forms.events.IExpansionListener` `expansionListenerAdapter(java.util.function.Consumer<org.eclipse.ui.forms.events.ExpansionEvent> consumer)` Static helper method to create an expansion listener for `#expansionStateChanged(ExpansionEvent event)`) method with a lambda expression.
`static org.eclipse.swt.events.FocusListener` `focusLostAdapter(java.util.function.Consumer<org.eclipse.swt.events.FocusEvent> consumer)` Static helper method to create a focus listener for the `#focusLost(FocusEvent event)`) method with a lambda expression.
`static org.eclipse.swt.events.KeyListener` `keyReleasedAdapter(java.util.function.Consumer<org.eclipse.swt.events.KeyEvent> consumer)` Static helper method to create a key listener for the `#keyReleased(KeyEvent event)`) method with a lambda expression.
`static org.eclipse.swt.events.SelectionListener` `widgetSelectedAdapter(java.util.function.Consumer<org.eclipse.swt.events.SelectionEvent> consumer)` Static helper method to create a selection listener for the `#widgetSelected(SelectionEvent event)`) method with a lambda expression.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### widgetSelectedAdapter

    public static org.eclipse.swt.events.SelectionListener widgetSelectedAdapter(java.util.function.Consumer<org.eclipse.swt.events.SelectionEvent> consumer)

Static helper method to create a selection listener for the `#widgetSelected(SelectionEvent event)`) method with a lambda expression.

Parameters:
  `consumer` - the consumer of the event
Returns:
  SelectionListener

#### focusLostAdapter

    public static org.eclipse.swt.events.FocusListener focusLostAdapter(java.util.function.Consumer<org.eclipse.swt.events.FocusEvent> consumer)

Static helper method to create a focus listener for the `#focusLost(FocusEvent event)`) method with a lambda expression.

Parameters:
  `consumer` - the consumer of the event
Returns:
  FocusListener

#### keyReleasedAdapter

    public static org.eclipse.swt.events.KeyListener keyReleasedAdapter(java.util.function.Consumer<org.eclipse.swt.events.KeyEvent> consumer)

Static helper method to create a key listener for the `#keyReleased(KeyEvent event)`) method with a lambda expression.

Parameters:
  `consumer` - the consumer of the event
Returns:
  KeyListener

#### expansionListenerAdapter

    public static org.eclipse.ui.forms.events.IExpansionListener expansionListenerAdapter(java.util.function.Consumer<org.eclipse.ui.forms.events.ExpansionEvent> consumer)

Static helper method to create an expansion listener for `#expansionStateChanged(ExpansionEvent event)`) method with a lambda expression.

Parameters:
  `consumer` - The consumer of the event
Returns:
  IExpansionListener