C - The component type in whose context the activity or event takes place.M - The message type being transferred in the context of the activity or event.@FunctionalInterface public interface Channel<C,M>
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.add(button, this::onActionPerformed);
}
private void onActionPerformed(final ActionEvent message) {
// do something based on [message] and/or [button] ...
}
}
| Modifier and Type | Field and Description |
|---|---|
static Channel<AbstractButton,ActionEvent> |
ACTION_PERFORMED
Represents a channel that handles events that can occur on
AbstractButtons. |
static Channel<JScrollBar,AdjustmentEvent> |
ADJUSTMENT_VALUE_CHANGED
Represents a channel that handles events that can occur on
JScrollBars. |
static Channel<JComponent,AncestorEvent> |
ANCESTOR_ADDED
Represents a channel that handles events that can occur on
JComponents. |
static Channel<Component,HierarchyEvent> |
ANCESTOR_BOUNDS_MOVED
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,HierarchyEvent> |
ANCESTOR_BOUNDS_RESIZED
Represents a channel that handles events that can occur on
Components. |
static Channel<JComponent,AncestorEvent> |
ANCESTOR_MOVED
Represents a channel that handles events that can occur on
JComponents. |
static Channel<JComponent,AncestorEvent> |
ANCESTOR_REMOVED
Represents a channel that handles events that can occur on
JComponents. |
static Channel<Component,InputMethodEvent> |
CARET_POSITION_CHANGED
Represents a channel that handles events that can occur on
Components. |
static Channel<JTextComponent,CaretEvent> |
CARET_UPDATE
Represents a channel that handles events that can occur on
JTextComponents. |
static Channel<Container,ContainerEvent> |
COMPONENT_ADDED
Represents a channel that handles events that can occur on
Containers. |
static Channel<Component,ComponentEvent> |
COMPONENT_HIDDEN
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,ComponentEvent> |
COMPONENT_MOVED
Represents a channel that handles events that can occur on
Components. |
static Channel<Container,ContainerEvent> |
COMPONENT_REMOVED
Represents a channel that handles events that can occur on
Containers. |
static Channel<Component,ComponentEvent> |
COMPONENT_RESIZED
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,ComponentEvent> |
COMPONENT_SHOWN
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,DropTargetDragEvent> |
DROP_TARGET_DRAG_ACTION_CHANGED
Represents a channel that handles events that can occur on a
Component's DropTarget. |
static Channel<Component,DropTargetDragEvent> |
DROP_TARGET_DRAG_ENTER
Represents a channel that handles events that can occur on a
Component's DropTarget. |
static Channel<Component,DropTargetEvent> |
DROP_TARGET_DRAG_EXIT
Represents a channel that handles events that can occur on a
Component's DropTarget. |
static Channel<Component,DropTargetDragEvent> |
DROP_TARGET_DRAG_OVER
Represents a channel that handles events that can occur on a
Component's DropTarget. |
static Channel<Component,DropTargetDropEvent> |
DROP_TARGET_DROP
Represents a channel that handles events that can occur on a
Component's DropTarget. |
static Channel<Component,FocusEvent> |
FOCUS_GAINED
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,FocusEvent> |
FOCUS_LOST
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,HierarchyEvent> |
HIERARCHY_CHANGED
Represents a channel that handles events that can occur on
Components. |
static Channel<JEditorPane,HyperlinkEvent> |
HYPERLINK_UPDATE
Represents a channel that handles events that can occur on
JEditorPanes. |
static Channel<Component,InputMethodEvent> |
INPUT_METHOD_TEXT_CHANGED
Represents a channel that handles events that can occur on
Components. |
static Channel<JInternalFrame,InternalFrameEvent> |
INTERNAL_FRAME_ACTIVATED
Represents a channel that handles events that can occur on
JInternalFrames. |
static Channel<JInternalFrame,InternalFrameEvent> |
INTERNAL_FRAME_CLOSED
Represents a channel that handles events that can occur on
JInternalFrames. |
static Channel<JInternalFrame,InternalFrameEvent> |
INTERNAL_FRAME_CLOSING
Represents a channel that handles events that can occur on
JInternalFrames. |
static Channel<JInternalFrame,InternalFrameEvent> |
INTERNAL_FRAME_DEACTIVATED
Represents a channel that handles events that can occur on
JInternalFrames. |
static Channel<JInternalFrame,InternalFrameEvent> |
INTERNAL_FRAME_DEICONIFIED
Represents a channel that handles events that can occur on
JInternalFrames. |
static Channel<JInternalFrame,InternalFrameEvent> |
INTERNAL_FRAME_ICONIFIED
Represents a channel that handles events that can occur on
JInternalFrames. |
static Channel<JInternalFrame,InternalFrameEvent> |
INTERNAL_FRAME_OPENED
Represents a channel that handles events that can occur on
JInternalFrames. |
static Channel<AbstractButton,ItemEvent> |
ITEM_STATE_CHANGED
Represents a channel that handles events that can occur on
AbstractButtons. |
static Channel<JComboBox<?>,ActionEvent> |
JCB_ACTION_PERFORMED
Represents a channel that handles events that can occur on
JComboBoxs. |
static Channel<JComboBox<?>,ItemEvent> |
JCB_ITEM_STATE_CHANGED
Represents a channel that handles events that can occur on
JComboBoxs. |
static Channel<JComboBox<?>,PopupMenuEvent> |
JCB_POPUP_CANCELED
Represents a channel that handles events that can occur on
JComboBoxs. |
static Channel<JComboBox<?>,PopupMenuEvent> |
JCB_POPUP_WILL_BECOME_INVISIBLE
Represents a channel that handles events that can occur on
JComboBoxs. |
static Channel<JComboBox<?>,PopupMenuEvent> |
JCB_POPUP_WILL_BECOME_VISIBLE
Represents a channel that handles events that can occur on
JComboBoxs. |
static Channel<JFileChooser,ActionEvent> |
JFC_ACTION_PERFORMED
Represents a channel that handles events that can occur on
JFileChoosers. |
static Channel<JProgressBar,ChangeEvent> |
JPB_STATE_CHANGED
Represents a channel that handles events that can occur on
JProgressBars. |
static Channel<JSlider,ChangeEvent> |
JSL_STATE_CHANGED
Represents a channel that handles events that can occur on
JSliders. |
static Channel<JSpinner,ChangeEvent> |
JSP_STATE_CHANGED
Represents a channel that handles events that can occur on
JSpinners. |
static Channel<JTextField,ActionEvent> |
JTF_ACTION_PERFORMED
Represents a channel that handles events that can occur on
JTextFields. |
static Channel<JTabbedPane,ChangeEvent> |
JTP_STATE_CHANGED
Represents a channel that handles events that can occur on
JTabbedPanes. |
static Channel<JViewport,ChangeEvent> |
JVP_STATE_CHANGED
Represents a channel that handles events that can occur on
JViewports. |
static Channel<Component,KeyEvent> |
KEY_PRESSED
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,KeyEvent> |
KEY_RELEASED
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,KeyEvent> |
KEY_TYPED
Represents a channel that handles events that can occur on
Components. |
static Channel<JList<?>,ListSelectionEvent> |
LIST_VALUE_CHANGED
Represents a channel that handles events that can occur on
JLists. |
static Channel<JMenu,MenuEvent> |
MENU_CANCELED
Represents a channel that handles events that can occur on
JMenus. |
static Channel<JMenu,MenuEvent> |
MENU_DESELECTED
Represents a channel that handles events that can occur on
JMenus. |
static Channel<JMenuItem,MenuDragMouseEvent> |
MENU_DRAG_MOUSE_DRAGGED
Represents a channel that handles events that can occur on
JMenuItems. |
static Channel<JMenuItem,MenuDragMouseEvent> |
MENU_DRAG_MOUSE_ENTERED
Represents a channel that handles events that can occur on
JMenuItems. |
static Channel<JMenuItem,MenuDragMouseEvent> |
MENU_DRAG_MOUSE_EXITED
Represents a channel that handles events that can occur on
JMenuItems. |
static Channel<JMenuItem,MenuDragMouseEvent> |
MENU_DRAG_MOUSE_RELEASED
Represents a channel that handles events that can occur on
JMenuItems. |
static Channel<JMenuItem,MenuKeyEvent> |
MENU_ITEM_KEY_PRESSED
Represents a channel that handles events that can occur on
JMenuItems. |
static Channel<JMenuItem,MenuKeyEvent> |
MENU_ITEM_KEY_RELEASED
Represents a channel that handles events that can occur on
JMenuItems. |
static Channel<JMenuItem,MenuKeyEvent> |
MENU_ITEM_KEY_TYPED
Represents a channel that handles events that can occur on
JMenuItems. |
static Channel<JPopupMenu,MenuKeyEvent> |
MENU_KEY_PRESSED
Represents a channel that handles events that can occur on
JPopupMenus. |
static Channel<JPopupMenu,MenuKeyEvent> |
MENU_KEY_RELEASED
Represents a channel that handles events that can occur on
JPopupMenus. |
static Channel<JPopupMenu,MenuKeyEvent> |
MENU_KEY_TYPED
Represents a channel that handles events that can occur on
JPopupMenus. |
static Channel<JMenu,MenuEvent> |
MENU_SELECTED
Represents a channel that handles events that can occur on
JMenus. |
static Channel<Component,MouseEvent> |
MOUSE_CLICKED
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,MouseEvent> |
MOUSE_DRAGGED
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,MouseEvent> |
MOUSE_ENTERED
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,MouseEvent> |
MOUSE_EXITED
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,MouseEvent> |
MOUSE_MOVED
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,MouseEvent> |
MOUSE_PRESSED
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,MouseEvent> |
MOUSE_RELEASED
Represents a channel that handles events that can occur on
Components. |
static Channel<Component,MouseWheelEvent> |
MOUSE_WHEEL_MOVED
Represents a channel that handles events that can occur on
Components. |
static Channel<JPopupMenu,PopupMenuEvent> |
POPUP_MENU_CANCELED
Represents a channel that handles events that can occur on
JPopupMenus. |
static Channel<JPopupMenu,PopupMenuEvent> |
POPUP_MENU_WILL_BECOME_INVISIBLE
Represents a channel that handles events that can occur on
JPopupMenus. |
static Channel<JPopupMenu,PopupMenuEvent> |
POPUP_MENU_WILL_BECOME_VISIBLE
Represents a channel that handles events that can occur on
JPopupMenus. |
static Channel<Component,PropertyChangeEvent> |
PROPERTY_CHANGE
Represents a channel that handles events that can occur on
Components. |
static Channel<AbstractButton,ChangeEvent> |
STATE_CHANGED
Represents a channel that handles events that can occur on
AbstractButtons. |
static Channel<JTree,TreeExpansionEvent> |
TREE_COLLAPSED
Represents a channel that handles events that can occur on
JTrees. |
static Channel<JTree,TreeExpansionEvent> |
TREE_EXPANDED
Represents a channel that handles events that can occur on
JTrees. |
static Channel<JTree,TreeSelectionEvent> |
TREE_VALUE_CHANGED
Represents a channel that handles events that can occur on
JTrees. |
static Channel<JTree,TreeExpansionEvent> |
TREE_WILL_COLLAPSE
Represents a channel that handles events that can occur on
JTrees. |
static Channel<JTree,TreeExpansionEvent> |
TREE_WILL_EXPAND
Represents a channel that handles events that can occur on
JTrees. |
static Channel<JComponent,PropertyChangeEvent> |
VETOABLE_CHANGE
Represents a channel that handles events that can occur on
JComponents. |
static Channel<Window,WindowEvent> |
WINDOW_ACTIVATED
Represents a channel that handles events that can occur on
Windows. |
static Channel<Window,WindowEvent> |
WINDOW_CLOSED
Represents a channel that handles events that can occur on
Windows. |
static Channel<Window,WindowEvent> |
WINDOW_CLOSING
Represents a channel that handles events that can occur on
Windows. |
static Channel<Window,WindowEvent> |
WINDOW_DEACTIVATED
Represents a channel that handles events that can occur on
Windows. |
static Channel<Window,WindowEvent> |
WINDOW_DEICONIFIED
Represents a channel that handles events that can occur on
Windows. |
static Channel<Window,WindowEvent> |
WINDOW_GAINED_FOCUS
Represents a channel that handles events that can occur on
Windows. |
static Channel<Window,WindowEvent> |
WINDOW_ICONIFIED
Represents a channel that handles events that can occur on
Windows. |
static Channel<Window,WindowEvent> |
WINDOW_LOST_FOCUS
Represents a channel that handles events that can occur on
Windows. |
static Channel<Window,WindowEvent> |
WINDOW_OPENED
Represents a channel that handles events that can occur on
Windows. |
static Channel<Window,WindowEvent> |
WINDOW_STATE_CHANGED
Represents a channel that handles events that can occur on
Windows. |
| Modifier and Type | Method and Description |
|---|---|
Link |
add(C component,
Consumer<M> reaction)
Adds a suitable
Consumer to a given component of type <C> to process messages of type
<M> when a corresponding activity or event occurs in that component. |
static Channel<Component,PropertyChangeEvent> |
propertyChange(String propertyName)
Retrieves a channel that handles events that can occur on
Components |
static final Channel<Component,PropertyChangeEvent> PROPERTY_CHANGE
Components.static final Channel<Component,ComponentEvent> COMPONENT_RESIZED
Components.static final Channel<Component,ComponentEvent> COMPONENT_MOVED
Components.static final Channel<Component,ComponentEvent> COMPONENT_SHOWN
Components.static final Channel<Component,ComponentEvent> COMPONENT_HIDDEN
Components.static final Channel<Component,FocusEvent> FOCUS_GAINED
Components.static final Channel<Component,FocusEvent> FOCUS_LOST
Components.static final Channel<Component,HierarchyEvent> HIERARCHY_CHANGED
Components.static final Channel<Component,HierarchyEvent> ANCESTOR_BOUNDS_MOVED
Components.static final Channel<Component,HierarchyEvent> ANCESTOR_BOUNDS_RESIZED
Components.static final Channel<Component,KeyEvent> KEY_TYPED
Components.static final Channel<Component,KeyEvent> KEY_PRESSED
Components.static final Channel<Component,KeyEvent> KEY_RELEASED
Components.static final Channel<Component,MouseEvent> MOUSE_PRESSED
Components.static final Channel<Component,MouseEvent> MOUSE_RELEASED
Components.static final Channel<Component,MouseEvent> MOUSE_CLICKED
Components.static final Channel<Component,MouseEvent> MOUSE_EXITED
Components.static final Channel<Component,MouseEvent> MOUSE_ENTERED
Components.static final Channel<Component,MouseEvent> MOUSE_MOVED
Components.static final Channel<Component,MouseEvent> MOUSE_DRAGGED
Components.static final Channel<Component,MouseWheelEvent> MOUSE_WHEEL_MOVED
Components.static final Channel<Component,InputMethodEvent> INPUT_METHOD_TEXT_CHANGED
Components.static final Channel<Component,InputMethodEvent> CARET_POSITION_CHANGED
Components.static final Channel<Component,DropTargetDragEvent> DROP_TARGET_DRAG_ENTER
Component's DropTarget.static final Channel<Component,DropTargetDragEvent> DROP_TARGET_DRAG_OVER
Component's DropTarget.static final Channel<Component,DropTargetDragEvent> DROP_TARGET_DRAG_ACTION_CHANGED
Component's DropTarget.static final Channel<Component,DropTargetEvent> DROP_TARGET_DRAG_EXIT
Component's DropTarget.static final Channel<Component,DropTargetDropEvent> DROP_TARGET_DROP
Component's DropTarget.static final Channel<Container,ContainerEvent> COMPONENT_ADDED
Containers.static final Channel<Container,ContainerEvent> COMPONENT_REMOVED
Containers.static final Channel<JComponent,PropertyChangeEvent> VETOABLE_CHANGE
JComponents.static final Channel<JComponent,AncestorEvent> ANCESTOR_ADDED
JComponents.static final Channel<JComponent,AncestorEvent> ANCESTOR_REMOVED
JComponents.static final Channel<JComponent,AncestorEvent> ANCESTOR_MOVED
JComponents.static final Channel<JTextComponent,CaretEvent> CARET_UPDATE
JTextComponents.static final Channel<JProgressBar,ChangeEvent> JPB_STATE_CHANGED
JProgressBars.static final Channel<JTabbedPane,ChangeEvent> JTP_STATE_CHANGED
JTabbedPanes.static final Channel<JTextField,ActionEvent> JTF_ACTION_PERFORMED
JTextFields.static final Channel<JPopupMenu,PopupMenuEvent> POPUP_MENU_WILL_BECOME_VISIBLE
JPopupMenus.static final Channel<JPopupMenu,PopupMenuEvent> POPUP_MENU_WILL_BECOME_INVISIBLE
JPopupMenus.static final Channel<JPopupMenu,PopupMenuEvent> POPUP_MENU_CANCELED
JPopupMenus.static final Channel<JPopupMenu,MenuKeyEvent> MENU_KEY_PRESSED
JPopupMenus.static final Channel<JPopupMenu,MenuKeyEvent> MENU_KEY_RELEASED
JPopupMenus.static final Channel<JPopupMenu,MenuKeyEvent> MENU_KEY_TYPED
JPopupMenus.static final Channel<Window,WindowEvent> WINDOW_STATE_CHANGED
Windows.static final Channel<Window,WindowEvent> WINDOW_OPENED
Windows.static final Channel<Window,WindowEvent> WINDOW_CLOSING
Windows.static final Channel<Window,WindowEvent> WINDOW_CLOSED
Windows.static final Channel<Window,WindowEvent> WINDOW_ICONIFIED
Windows.static final Channel<Window,WindowEvent> WINDOW_DEICONIFIED
Windows.static final Channel<Window,WindowEvent> WINDOW_ACTIVATED
Windows.static final Channel<Window,WindowEvent> WINDOW_DEACTIVATED
Windows.static final Channel<Window,WindowEvent> WINDOW_GAINED_FOCUS
Windows.static final Channel<Window,WindowEvent> WINDOW_LOST_FOCUS
Windows.static final Channel<AbstractButton,ItemEvent> ITEM_STATE_CHANGED
AbstractButtons.static final Channel<AbstractButton,ActionEvent> ACTION_PERFORMED
AbstractButtons.static final Channel<AbstractButton,ChangeEvent> STATE_CHANGED
AbstractButtons.static final Channel<JMenuItem,MenuDragMouseEvent> MENU_DRAG_MOUSE_ENTERED
JMenuItems.static final Channel<JMenuItem,MenuDragMouseEvent> MENU_DRAG_MOUSE_EXITED
JMenuItems.static final Channel<JMenuItem,MenuDragMouseEvent> MENU_DRAG_MOUSE_DRAGGED
JMenuItems.static final Channel<JMenuItem,MenuDragMouseEvent> MENU_DRAG_MOUSE_RELEASED
JMenuItems.static final Channel<JMenuItem,MenuKeyEvent> MENU_ITEM_KEY_PRESSED
JMenuItems.static final Channel<JMenuItem,MenuKeyEvent> MENU_ITEM_KEY_RELEASED
JMenuItems.static final Channel<JMenuItem,MenuKeyEvent> MENU_ITEM_KEY_TYPED
JMenuItems.static final Channel<JSlider,ChangeEvent> JSL_STATE_CHANGED
JSliders.static final Channel<JComboBox<?>,ItemEvent> JCB_ITEM_STATE_CHANGED
JComboBoxs.static final Channel<JComboBox<?>,ActionEvent> JCB_ACTION_PERFORMED
JComboBoxs.static final Channel<JComboBox<?>,PopupMenuEvent> JCB_POPUP_WILL_BECOME_VISIBLE
JComboBoxs.static final Channel<JComboBox<?>,PopupMenuEvent> JCB_POPUP_WILL_BECOME_INVISIBLE
JComboBoxs.static final Channel<JComboBox<?>,PopupMenuEvent> JCB_POPUP_CANCELED
JComboBoxs.static final Channel<JTree,TreeExpansionEvent> TREE_EXPANDED
JTrees.static final Channel<JTree,TreeExpansionEvent> TREE_COLLAPSED
JTrees.static final Channel<JTree,TreeExpansionEvent> TREE_WILL_EXPAND
JTrees.static final Channel<JTree,TreeExpansionEvent> TREE_WILL_COLLAPSE
JTrees.static final Channel<JTree,TreeSelectionEvent> TREE_VALUE_CHANGED
JTrees.static final Channel<JSpinner,ChangeEvent> JSP_STATE_CHANGED
JSpinners.static final Channel<JScrollBar,AdjustmentEvent> ADJUSTMENT_VALUE_CHANGED
JScrollBars.static final Channel<JList<?>,ListSelectionEvent> LIST_VALUE_CHANGED
JLists.static final Channel<JInternalFrame,InternalFrameEvent> INTERNAL_FRAME_OPENED
JInternalFrames.static final Channel<JInternalFrame,InternalFrameEvent> INTERNAL_FRAME_CLOSING
JInternalFrames.static final Channel<JInternalFrame,InternalFrameEvent> INTERNAL_FRAME_CLOSED
JInternalFrames.static final Channel<JInternalFrame,InternalFrameEvent> INTERNAL_FRAME_ICONIFIED
JInternalFrames.static final Channel<JInternalFrame,InternalFrameEvent> INTERNAL_FRAME_DEICONIFIED
JInternalFrames.static final Channel<JInternalFrame,InternalFrameEvent> INTERNAL_FRAME_ACTIVATED
JInternalFrames.static final Channel<JInternalFrame,InternalFrameEvent> INTERNAL_FRAME_DEACTIVATED
JInternalFrames.static final Channel<JEditorPane,HyperlinkEvent> HYPERLINK_UPDATE
JEditorPanes.static final Channel<JViewport,ChangeEvent> JVP_STATE_CHANGED
JViewports.static final Channel<JFileChooser,ActionEvent> JFC_ACTION_PERFORMED
JFileChoosers.static final Channel<JMenu,MenuEvent> MENU_SELECTED
JMenus.static final Channel<JMenu,MenuEvent> MENU_DESELECTED
JMenus.static Channel<Component,PropertyChangeEvent> propertyChange(String propertyName)
ComponentspropertyName - The name of the property in question.PropertyChangeListener.propertyChange(PropertyChangeEvent),
Component.addPropertyChangeListener(String, PropertyChangeListener)Copyright © 2025 Andreas Kluge-Kaindl, Bremen (de). All rights reserved.