org.arakhne.afc.ui.event.InputEvent Maven / Gradle / Ivy
/*
* $Id: org/arakhne/afc/ui/event/InputEvent.java v12.0 2015-04-09 01:26:18$
*
* Copyright (C) 2013 Stephane GALLAND.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* This program is free software; you can redistribute it and/or modify
*/
package org.arakhne.afc.ui.event ;
import java.io.Serializable;
/** Describe the event related to an input device.
*
* @author Stéphane GALLAND
* @version 12.0 2015-04-09 01:26:18
* @mavengroupid org.arakhne.afc.ui
* @mavenartifactid base
*/
public interface InputEvent extends Serializable {
/** Replies the identifier of the device.
*
* @return the identifier of the device.
*/
public int getDeviceId();
/** Replies if this event was consumed.
*
* @return true if the event was consumed.
*/
public boolean isConsumed();
/** Consume the event.
*/
public void consume();
/**
* Returns whether or not the Shift modifier is down on this event.
*
* @return true if the Shift key is down.
*/
public boolean isShiftDown();
/**
* Returns whether or not the Control modifier is down on this event.
* @return true if the Control key is down.
*/
public boolean isControlDown();
/**
* Returns whether or not the Meta modifier is down on this event.
* @return true if the Meta key is down.
*/
public boolean isMetaDown();
/**
* Returns whether or not the Alt modifier is down on this event.
* @return true if the Alt key is down.
*/
public boolean isAltDown();
/**
* Returns whether or not the AltGraph modifier is down on this event.
* @return true if the AltGr key is down.
*/
public boolean isAltGraphDown();
/** Replies if the contextual action is triggered by this event.
* A contextual action may be a request to display a popup menu for
* example.
* @return true if the contextual action may be triggered.
*/
public boolean isContextualActionTriggered();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy