Package com.vaadin.event
Provides classes and interfaces for the inheritable event
model. The model supports inheritable events and a flexible way of
registering and unregistering event listeners. It's a fundamental building
block of Vaadin, and as it is included in
AbstractComponent, all UI components
automatically support it.
Package Specification
The core of the event model is the inheritable event class
hierarchy, and the EventRouter
which provide a simple, ubiquitous mechanism to transport events to all
interested parties.
The power of the event inheritance arises from the possibility of
receiving not only the events of the registered type, but also the
ones which are inherited from it. For example, let's assume that there
are the events GeneralEvent and SpecializedEvent
so that the latter inherits the former. Furthermore we have an object
A which registers to receive GeneralEvent type
events from the object B. A would of course
receive all GeneralEvents generated by B, but in
addition to this, A would also receive all
SpecializedEvents generated by B. However, if
B generates some other events that do not have
GeneralEvent as an ancestor, A would not receive
them unless it registers to listen for them, too.
The interface to attaching and detaching listeners to and from an object works with methods. One specifies the event that should trigger the listener, the trigger method that should be called when a suitable event occurs and the object owning the method. From these a new listener is constructed and added to the event router of the specified component.
The interface is defined in
MethodEventSource, and a
straightforward implementation of it is defined in
EventRouter which also includes
a method to actually fire the events.
All fired events are passed to all registered listeners, which are of
type ListenerMethod. The
listener then checks if the event type matches with the specified event
type and calls the specified trigger method if it does.
-
Interface Summary Interface Description Action.Container Interface implemented by all components where actions can be registered.Action.Handler Interface implemented by classes who wish to handle actions.Action.Listener An Action that implements this interface can be added to an Action.Notifier (or NotifierProxy) via theaddAction()-method, which in many cases is easier than implementing the Action.Handler interface.Action.Notifier Action.Containers implementing this support an easier way of adding single Actions than the more involved Action.Handler.Action.ShortcutNotifier ConnectorEventListener ContextClickEvent.ContextClickListener Listener forContextClickEvents.ContextClickEvent.ContextClickNotifier The interface for adding and removing listeners forContextClickEvents.FieldEvents Interface that serves as a wrapper forFieldrelated events.FieldEvents.BlurListener BlurListenerinterface for listening forBlurEventfired by aField.FieldEvents.BlurNotifier The interface for adding and removingBlurEventlisteners.FieldEvents.FocusListener FocusListenerinterface for listening forFocusEventfired by aField.FieldEvents.FocusNotifier The interface for adding and removingFocusEventlisteners.FieldEvents.TextChangeListener A listener forFieldEvents.TextChangeEvents.FieldEvents.TextChangeNotifier An interface implemented by aFieldsupportingFieldEvents.TextChangeEvents.ItemClickEvent.ItemClickListener ItemClickEvent.ItemClickNotifier The interface for adding and removingItemClickEventlisteners.LayoutEvents LayoutEvents.LayoutClickListener LayoutEvents.LayoutClickNotifier The interface for adding and removingLayoutClickEventlisteners.MarkedAsDirtyListener An interface used for listening to marked as dirty events.MethodEventSource Interface for classes supporting registration of methods as event receivers.MouseEvents Interface that serves as a wrapper for mouse related events.MouseEvents.ClickListener Interface for listening for aMouseEvents.ClickEventfired by aComponent.MouseEvents.DoubleClickListener Interface for listening for aMouseEvents.DoubleClickEventfired by aComponent.SelectionEvent.SelectionListener The listener interface for receivingSelectionEvents.SelectionEvent.SelectionNotifier The interface for adding and removing listeners forSelectionEvents.ShortcutAction.KeyCode Key codes that can be used for shortcutsShortcutAction.ModifierKey Modifier key constantsSortEvent.SortListener Listener for sort order change events.SortEvent.SortNotifier The interface for adding and removing listeners forSortEvents.Transferable Transferable wraps the data that is to be imported into another component.UIEvents A class that contains events, listeners and handlers specific to theUIclass.UIEvents.PollListener UIEvents.PollNotifier The interface for adding and removingUIEvents.PollEventlisteners. -
Class Summary Class Description Action Implements the action framework.ActionManager Javadoc TODO Notes:ConnectorActionManager An ActionManager connected to a connector.ConnectorEvent ContextClickEvent Context click event fired by aComponent.DataBoundTransferable Parent class forTransferableimplementations that have a Vaadin container as a data source.EventRouter EventRouterclass implementing the inheritable event listening model.FieldEvents.BlurEvent BlurEventclass for holding additional event information.FieldEvents.FocusAndBlurServerRpcImpl FieldEvents.FocusEvent FocusEventclass for holding additional event information.FieldEvents.TextChangeEvent TextChangeEvents are fired when the user is editing the text content of a field.ItemClickEvent LayoutEvents.LayoutClickEvent An event fired when the layout has been clicked.ListenerMethod One registered event listener.MarkedAsDirtyConnectorEvent Event which is fired for all registered MarkDirtyListeners when a connector is marked as dirty.MouseEvents.ClickEvent Class for holding information about a mouse click event.MouseEvents.DoubleClickEvent Class for holding additional event information for DoubleClick events.SelectionEvent An event that specifies what in a selection has changed, and where the selection took place.ShortcutAction Shortcuts are a special type ofActions used to create keyboard shortcuts.ShortcutListener SortEvent Event describing a change in sorting of aContainer.TransferableImpl TODO Javadoc!UIEvents.PollEvent An event that is fired whenever a client polls the server for asynchronous UI updates. -
Exception Summary Exception Description