public class TLspAWTEventFilterBuilder extends Object
A builder to create typical AWTEvent filters. These filters can be combined using the operators
and()
and or()
. By using openBrackets()
and closeBrackets()
it is possible to control which operators will be evaluated first. Operators between brackets
will be evaluated before any others, otherwise and
will be evaluated before
or
. For instance the following statement:
TLspAWTEventFilterBuilder.newBuilder().
openBrackets().
leftMouseButton().or().rightMouseButton().
closeBrackets().
and().altFilter().build();
will return a filter that will let both left or right mouse button events pass, but only if alt is down too. Without the brackets, left mouse button events would always pass but right mouse button events only when alt is down.
Modifier | Constructor and Description |
---|---|
protected |
TLspAWTEventFilterBuilder()
Deprecated.
Constructor to use when extending from this class.
|
Modifier and Type | Method and Description |
---|---|
TLspAWTEventFilterBuilder |
altFilter(boolean aAltDown)
Deprecated.
Adds a alt down InputEvent filter.
|
TLspAWTEventFilterBuilder |
and()
Deprecated.
Operator to be called between two filter calls to indicate the event must pass both filters.
|
ILcdFilter<AWTEvent> |
build()
Deprecated.
Builds the filter.
|
TLspAWTEventFilterBuilder |
closeBrackets()
Deprecated.
Ends a new subfilter, all filters and operators called between this call and the previous call to
openBrackets will be evaluated together before operators and filters
outside the brackets are evaluated. |
TLspAWTEventFilterBuilder |
ctrlFilter(boolean aCtrlDown)
Deprecated.
Adds a ctrl down InputEvent filter.
|
TLspAWTEventFilterBuilder |
customFilter(ILcdFilter<AWTEvent> aFilter)
Deprecated.
Adds a custom filter.
|
TLspAWTEventFilterBuilder |
keyEvents()
Deprecated.
A filter that only allows key events to pass.
|
TLspAWTEventFilterBuilder |
leftMouseButton()
Deprecated.
Adds a left mouse button filter.
|
TLspAWTEventFilterBuilder |
middleMouseButton()
Deprecated.
Adds a middle mouse button filter.
|
TLspAWTEventFilterBuilder |
mouseEvents()
Deprecated.
A filter that only allows mouse events to pass.
|
TLspAWTEventFilterBuilder |
mouseWheelFilter()
Deprecated.
A filter that only allows mouse wheel events to pass.
|
static TLspAWTEventFilterBuilder |
newBuilder()
Deprecated.
|
TLspAWTEventFilterBuilder |
openBrackets()
Deprecated.
Starts a new subfilter, all filters and operators called between this call and the next call to
closeBrackets will be evaluated together before operators and filters
outside the brackets are evaluated. |
TLspAWTEventFilterBuilder |
or()
Deprecated.
Operator to be called between two filter calls to indicate the event must pass one of the two filters.
|
TLspAWTEventFilterBuilder |
rightMouseButton()
Deprecated.
Adds a right mouse button filter.
|
TLspAWTEventFilterBuilder |
shiftFilter(boolean aShiftDown)
Deprecated.
Adds a shift down InputEvent filter.
|
TLspAWTEventFilterBuilder |
touchEvents()
Deprecated.
A filter that only allows touch events to pass.
|
protected TLspAWTEventFilterBuilder()
public static TLspAWTEventFilterBuilder newBuilder()
public TLspAWTEventFilterBuilder or()
public TLspAWTEventFilterBuilder and()
public TLspAWTEventFilterBuilder openBrackets()
closeBrackets
will be evaluated together before operators and filters
outside the brackets are evaluated.public TLspAWTEventFilterBuilder closeBrackets()
openBrackets
will be evaluated together before operators and filters
outside the brackets are evaluated.public ILcdFilter<AWTEvent> build()
public TLspAWTEventFilterBuilder customFilter(ILcdFilter<AWTEvent> aFilter)
aFilter
- the filter to add to this builder.public TLspAWTEventFilterBuilder leftMouseButton()
public TLspAWTEventFilterBuilder middleMouseButton()
public TLspAWTEventFilterBuilder rightMouseButton()
public TLspAWTEventFilterBuilder ctrlFilter(boolean aCtrlDown)
aCtrlDown
- if true only events with a ctrl down mask pass, otherwise only events without
ctrl down mask.public TLspAWTEventFilterBuilder altFilter(boolean aAltDown)
aAltDown
- if true only events with a alt down mask pass, otherwise only events without
alt down mask.public TLspAWTEventFilterBuilder shiftFilter(boolean aShiftDown)
aShiftDown
- if true only events with a shift down mask pass, otherwise only events without
shift down mask.public TLspAWTEventFilterBuilder mouseWheelFilter()
public TLspAWTEventFilterBuilder touchEvents()
public TLspAWTEventFilterBuilder mouseEvents()
public TLspAWTEventFilterBuilder keyEvents()