public class EventsFilter
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
EventsFilter.Range
Defines range of events.
|
static class |
EventsFilter.WindowRecord
Defines window events.
|
Modifier and Type | Field and Description |
---|---|
static int |
MAX_RANGES |
static int |
MAX_WINDOWS |
Constructor and Description |
---|
EventsFilter()
Constructs a default events filter, does not listen to any window and events.
|
Modifier and Type | Method and Description |
---|---|
EventsFilter |
addEvent(int eventID)
Adds an individual event ID to this filer.
|
EventsFilter |
addEvents(int[] eventIDs)
Adds the set of individual event IDs to this filter.
|
EventsFilter |
addEventsRange(int lowerBound,
int upperBound)
Adds the range of event IDs.
|
EventsFilter |
addKeyboardEventsRange()
Add the range of keyboard events [WM_KEYFIRST..WM_KEYLAST]
|
EventsFilter |
addMouseEventsRange()
Add the range of mouse events [WM_MOUSEFIRST..WM_MOUSELAST]
|
EventsFilter |
addWindow(Wnd wnd)
Add a window handle.
|
EventsFilter |
addWindow(Wnd wnd,
boolean listenAllChildWindows)
Add a window handle.
|
boolean |
getAllowAllWindows()
Returns
true if this filter is configured to allow events from all windows. |
java.util.List |
getRanges()
Returns the list of spacified ranges.
|
java.util.List |
getWindows()
Returns the list of specified windows.
|
boolean |
isAllowAllEvents()
Returns
true if this filter is configured to allow all events. |
EventsFilter |
removeAllEvents()
Removes all previously added events from this filter.
|
EventsFilter |
removeAllWindows()
Removes all previously added windows from this filter.
|
EventsFilter |
removeEvent(int eventID)
Removes the specified event ID from this filer.
|
EventsFilter |
removeEvents(int[] eventIDs)
Removes the set of specified event IDs from this filer.
|
EventsFilter |
removeEventsRange(int lowerBound,
int upperBound)
Removes the range of events from this filer.
|
EventsFilter |
removeKeyboardEventsRange()
Removes the range of keyboard events [WM_KEYFIRST..WM_KEYLAST]
|
EventsFilter |
removeMouseEventsRange()
Removes the range of mouse events [WM_MOUSEFIRST..WM_MOUSELAST]
|
EventsFilter |
removeWindow(Wnd wnd)
Removes a window handle from this filter.
|
void |
setAllowAllEvents(boolean value)
Specifies whether or not this filter allows all events.
|
void |
setAllowAllWindows(boolean value)
Specifies whether or not this filter allows events from all windows.
|
public static final int MAX_RANGES
public static final int MAX_WINDOWS
public EventsFilter()
public EventsFilter addEvent(int eventID)
eventID
- specifies an individual event IDpublic EventsFilter removeEvent(int eventID)
eventID
- specifies an individual event ID to removepublic EventsFilter addEvents(int[] eventIDs)
eventIDs
- array of event IDspublic EventsFilter removeEvents(int[] eventIDs)
eventIDs
- specifies the set of event IDs to removepublic EventsFilter addEventsRange(int lowerBound, int upperBound)
lowerBound
- lower event ID valueupperBound
- upper event ID valuepublic EventsFilter removeEventsRange(int lowerBound, int upperBound)
lowerBound
- lower event ID valueupperBound
- upper event ID valuepublic EventsFilter addKeyboardEventsRange()
public EventsFilter removeKeyboardEventsRange()
public EventsFilter addMouseEventsRange()
public EventsFilter removeMouseEventsRange()
public EventsFilter addWindow(Wnd wnd)
wnd
- specifies a window handle to addpublic EventsFilter addWindow(Wnd wnd, boolean listenAllChildWindows)
wnd
- specifies a window handlelistenAllChildWindows
- specifies whether or not filter should include all child windows as wellpublic EventsFilter removeWindow(Wnd wnd)
wnd
- specifies a window handle to removepublic java.util.List getRanges()
EventsFilter.Range
objectspublic java.util.List getWindows()
EventsFilter.WindowRecord
objectspublic void setAllowAllWindows(boolean value)
value
- if true
filter allows events from all windows; otherwise - events from all windows are being suppressed.public boolean getAllowAllWindows()
true
if this filter is configured to allow events from all windows.true
if this filter is configured to allow events from all windows, false
otherwisepublic void setAllowAllEvents(boolean value)
value
- if true
filter allows all events; otherwise - all events are being suppressed.public boolean isAllowAllEvents()
true
if this filter is configured to allow all events.true
if this filter is configured to allow all events, false
otherwisepublic EventsFilter removeAllWindows()
public EventsFilter removeAllEvents()