edu.umd.cs.piccolo.event
Class PInputEventFilter

java.lang.Object
  extended by edu.umd.cs.piccolo.event.PInputEventFilter

public class PInputEventFilter
extends java.lang.Object

PInputEventFilter is a class that filters input events based on the events modifiers and type. Any PBasicInputEventHandler that is associated with an event filter will only receive events that pass through the filter.

To be accepted events must contain all the modifiers listed in the andMask, at least one of the modifiers listed in the orMask, and none of the modifiers listed in the notMask. The event filter also lets you specify specific event types (mousePressed, released, ...) to accept or reject.

If the event filter is set to consume, then it will call consume on any event that it successfully accepts.

Version:
1.0
Author:
Jesse Grosjean

Field Summary
static int ALL_MODIFIERS_MASK
           
 
Constructor Summary
PInputEventFilter()
           
PInputEventFilter(int aAndMask)
           
PInputEventFilter(int aAndMask, int aNotMask)
           
 
Method Summary
 void acceptAllClickCounts()
           
 void acceptAllEventTypes()
           
 void acceptEverything()
           
 boolean acceptsEvent(PInputEvent aEvent, int type)
           
 boolean getAcceptsAlreadyHandledEvents()
           
 boolean getAcceptsFocusEvents()
           
 boolean getAcceptsKeyPressed()
           
 boolean getAcceptsKeyReleased()
           
 boolean getAcceptsKeyTyped()
           
 boolean getAcceptsMouseClicked()
           
 boolean getAcceptsMouseDragged()
           
 boolean getAcceptsMouseEntered()
           
 boolean getAcceptsMouseExited()
           
 boolean getAcceptsMouseMoved()
           
 boolean getAcceptsMousePressed()
           
 boolean getAcceptsMouseReleased()
           
 boolean getAcceptsMouseWheelRotated()
           
 boolean getMarksAcceptedEventsAsHandled()
           
 void rejectAllClickCounts()
           
 void rejectAllEventTypes()
           
 void setAcceptClickCount(short aClickCount)
           
 void setAcceptsAlreadyHandledEvents(boolean aBoolean)
           
 void setAcceptsFocusEvents(boolean aBoolean)
           
 void setAcceptsKeyPressed(boolean aBoolean)
           
 void setAcceptsKeyReleased(boolean aBoolean)
           
 void setAcceptsKeyTyped(boolean aBoolean)
           
 void setAcceptsMouseClicked(boolean aBoolean)
           
 void setAcceptsMouseDragged(boolean aBoolean)
           
 void setAcceptsMouseEntered(boolean aBoolean)
           
 void setAcceptsMouseExited(boolean aBoolean)
           
 void setAcceptsMouseMoved(boolean aBoolean)
           
 void setAcceptsMousePressed(boolean aBoolean)
           
 void setAcceptsMouseReleased(boolean aBoolean)
           
 void setAcceptsMouseWheelRotated(boolean aBoolean)
           
 void setAndMask(int aAndMask)
           
 void setMarksAcceptedEventsAsHandled(boolean aBoolean)
           
 void setNotMask(int aNotMask)
           
 void setOrMask(int aOrMask)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_MODIFIERS_MASK

public static int ALL_MODIFIERS_MASK
Constructor Detail

PInputEventFilter

public PInputEventFilter()

PInputEventFilter

public PInputEventFilter(int aAndMask)

PInputEventFilter

public PInputEventFilter(int aAndMask,
                         int aNotMask)
Method Detail

acceptsEvent

public boolean acceptsEvent(PInputEvent aEvent,
                            int type)

acceptAllClickCounts

public void acceptAllClickCounts()

acceptAllEventTypes

public void acceptAllEventTypes()

acceptEverything

public void acceptEverything()

getAcceptsKeyPressed

public boolean getAcceptsKeyPressed()

getAcceptsKeyReleased

public boolean getAcceptsKeyReleased()

getAcceptsKeyTyped

public boolean getAcceptsKeyTyped()

getAcceptsMouseClicked

public boolean getAcceptsMouseClicked()

getAcceptsMouseDragged

public boolean getAcceptsMouseDragged()

getAcceptsMouseEntered

public boolean getAcceptsMouseEntered()

getAcceptsMouseExited

public boolean getAcceptsMouseExited()

getAcceptsMouseMoved

public boolean getAcceptsMouseMoved()

getAcceptsMousePressed

public boolean getAcceptsMousePressed()

getAcceptsMouseReleased

public boolean getAcceptsMouseReleased()

getAcceptsMouseWheelRotated

public boolean getAcceptsMouseWheelRotated()

getAcceptsFocusEvents

public boolean getAcceptsFocusEvents()

getAcceptsAlreadyHandledEvents

public boolean getAcceptsAlreadyHandledEvents()

getMarksAcceptedEventsAsHandled

public boolean getMarksAcceptedEventsAsHandled()

rejectAllClickCounts

public void rejectAllClickCounts()

rejectAllEventTypes

public void rejectAllEventTypes()

setAcceptClickCount

public void setAcceptClickCount(short aClickCount)

setAcceptsKeyPressed

public void setAcceptsKeyPressed(boolean aBoolean)

setAcceptsKeyReleased

public void setAcceptsKeyReleased(boolean aBoolean)

setAcceptsKeyTyped

public void setAcceptsKeyTyped(boolean aBoolean)

setAcceptsMouseClicked

public void setAcceptsMouseClicked(boolean aBoolean)

setAcceptsMouseDragged

public void setAcceptsMouseDragged(boolean aBoolean)

setAcceptsMouseEntered

public void setAcceptsMouseEntered(boolean aBoolean)

setAcceptsMouseExited

public void setAcceptsMouseExited(boolean aBoolean)

setAcceptsMouseMoved

public void setAcceptsMouseMoved(boolean aBoolean)

setAcceptsMousePressed

public void setAcceptsMousePressed(boolean aBoolean)

setAcceptsMouseReleased

public void setAcceptsMouseReleased(boolean aBoolean)

setAcceptsMouseWheelRotated

public void setAcceptsMouseWheelRotated(boolean aBoolean)

setAcceptsFocusEvents

public void setAcceptsFocusEvents(boolean aBoolean)

setAndMask

public void setAndMask(int aAndMask)

setAcceptsAlreadyHandledEvents

public void setAcceptsAlreadyHandledEvents(boolean aBoolean)

setMarksAcceptedEventsAsHandled

public void setMarksAcceptedEventsAsHandled(boolean aBoolean)

setNotMask

public void setNotMask(int aNotMask)

setOrMask

public void setOrMask(int aOrMask)


Copyright 2005 by University of Maryland, College Park, MD 20742, USA All rights reserved.

Web Accessibility