org.apache.pivot.tools.wtk
Class EventLogger

java.lang.Object
  extended by org.apache.pivot.wtk.Component
      extended by org.apache.pivot.wtk.Container
          extended by org.apache.pivot.tools.wtk.EventLogger
All Implemented Interfaces:
Iterable<Component>, Sequence<Component>, ConstrainedVisual, Visual

public class EventLogger
extends Container

A component that monitors a source component for events.


Nested Class Summary
 class EventLogger.DeclaredEventGroup
          A read-only group of events that an event logger is capable of firing.
 class EventLogger.IncludeEventGroup
          A read/write group of events that an event logger will actually fire.
static interface EventLogger.Skin
          Event logger skin interface.
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
 
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence
Sequence.Tree<T>
 
Constructor Summary
EventLogger()
          Creates a new event logger that is not tied to any source component.
EventLogger(Component source)
          Creates a new event logger that will log events on the specified source.
 
Method Summary
 void clearLog()
          Clears the event log.
 EventLogger.DeclaredEventGroup getDeclaredEvents()
          Gets the declared event group, a read-only group that includes the complete list of events that this event logger's source declares.
 ListenerList<EventLoggerListener> getEventLoggerListeners()
          Gets the event logger listener list.
 EventLogger.IncludeEventGroup getIncludeEvents()
          Gets the include events group, which callers can use to include or exclude declared events from those that get fired by this logger.
 Component getSource()
          Gets this event logger's source component.
 void setSource(Component source)
          Sets this event logger's source component.
 
Methods inherited from class org.apache.pivot.wtk.Container
add, clear, containsFocus, descendantAdded, descendantGainedFocus, descendantLostFocus, descendantRemoved, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getDescendantAt, getFocusTraversalPolicy, getLength, indexOf, insert, isAncestor, iterator, layout, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, remove, removeAll, requestFocus, setFocusTraversalPolicy, setParent, setVisible, store, transferFocus, update
 
Methods inherited from class org.apache.pivot.wtk.Component
clearFocus, getAncestor, getAttribute, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHeight, getLocation, getMaximumPreferredHeight, getMaximumPreferredWidth, getMenuHandler, getMinimumPreferredHeight, getMinimumPreferredWidth, getParent, getPreferredHeight, getPreferredHeight, getPreferredHeightLimits, getPreferredSize, getPreferredWidth, getPreferredWidth, getPreferredWidthLimits, getSize, getSkin, getStyles, getTooltipText, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWindow, getX, getY, installThemeSkin, invalidate, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyReleased, keyTyped, mapPointFromAncestor, mapPointFromAncestor, mapPointToAncestor, mapPointToAncestor, mouseOver, reenterMouse, repaint, repaint, repaint, repaint, repaint, repaint, scrollAreaToVisible, scrollAreaToVisible, setAttribute, setAutomationID, setCursor, setCursor, setDragSource, setDropTarget, setEnabled, setHeight, setLocation, setLocation, setMaximumPreferredHeight, setMaximumPreferredWidth, setMenuHandler, setMinimumPreferredHeight, setMinimumPreferredWidth, setPreferredHeight, setPreferredHeightLimits, setPreferredHeightLimits, setPreferredSize, setPreferredSize, setPreferredWidth, setPreferredWidthLimits, setPreferredWidthLimits, setSize, setSize, setSkin, setStyles, setStyles, setStyles, setTooltipText, setWidth, setX, setY, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventLogger

public EventLogger()
Creates a new event logger that is not tied to any source component.


EventLogger

public EventLogger(Component source)
Creates a new event logger that will log events on the specified source.

Method Detail

getSource

public Component getSource()
Gets this event logger's source component.

Returns:
The source component, or null if no source has been set.

setSource

public void setSource(Component source)
Sets this event logger's source component.

Parameters:
source - The source component, or null to clear the source.

getDeclaredEvents

public EventLogger.DeclaredEventGroup getDeclaredEvents()
Gets the declared event group, a read-only group that includes the complete list of events that this event logger's source declares.

Returns:
the declared events group.

getIncludeEvents

public EventLogger.IncludeEventGroup getIncludeEvents()
Gets the include events group, which callers can use to include or exclude declared events from those that get fired by this logger. This group is guaranteed to be a subset of the declared event group (attempts to add events to this group that are not included in the declared event group will fail).

Returns:
The include events group.

clearLog

public void clearLog()
Clears the event log.


getEventLoggerListeners

public ListenerList<EventLoggerListener> getEventLoggerListeners()
Gets the event logger listener list.