private static int buttonToGlassButton ( int button ) { switch ( button ) { case X . Button1 : return MouseEvent . BUTTON_LEFT ; case X . Button2 : return MouseEvent . BUTTON_OTHER ; case X . Button3 : return MouseEvent . BUTTON_RIGHT ; default : return MouseEvent . BUTTON_NONE ; } }
Convenience method to convert X11 button codes to glass button codes