fi.hut.tml.xsmiles.util
Class EventUtil

java.lang.Object
  extended byfi.hut.tml.xsmiles.util.EventUtil

public class EventUtil
extends java.lang.Object


Constructor Summary
EventUtil()
           
 
Method Summary
static boolean isControlPressed(java.awt.event.InputEvent me)
           
static boolean isFollowAlternativeRequest(java.awt.AWTEvent e)
          for instance, a middle click is follow alternative It is not recommended to compare the return value of this method via == because new modifiers can be added in the future.
static boolean isMiddleClick(java.awt.event.InputEvent me)
           
static boolean isPropertyRequest(java.awt.AWTEvent e)
          a property request is e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventUtil

public EventUtil()
Method Detail

isPropertyRequest

public static boolean isPropertyRequest(java.awt.AWTEvent e)
a property request is e.g. right mouse click


isFollowAlternativeRequest

public static boolean isFollowAlternativeRequest(java.awt.AWTEvent e)
for instance, a middle click is follow alternative It is not recommended to compare the return value of this method via == because new modifiers can be added in the future. For example, the appropriate way to check that SHIFT and BUTTON1 are down, but CTRL is up is demonstrated by the following code: int onmask = SHIFT_DOWN_MASK | BUTTON1_DOWN_MASK; int offmask = CTRL_DOWN_MASK; if (event.getModifiersEx() & (onmask | offmask) == onmask) { ... }


isControlPressed

public static boolean isControlPressed(java.awt.event.InputEvent me)

isMiddleClick

public static boolean isMiddleClick(java.awt.event.InputEvent me)


X-Smiles 1.2