Interface Channel<C,M>

Type Parameters:
C - The component type in whose context the event takes place.
M - The message type being transferred in the context of the event.
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Channel<C,M>
Identifies predefined notification channels and associates specific Swing component types, events, and message types with each other.

Each instance is also capable of adding appropriate listeners to a component that can process the corresponding message when a particular event occurs.

Example:

 public class ChannelSample {

     private final JButton button;

     public ChannelSample() {
         button = new JButton();
         Channel.ACTION_PERFORMED.subscribe(button, this::onActionPerformed);
     }

     private void onActionPerformed(final ActionEvent message) {
         // do something based on [message] and/or [button] ...
     }
 }