X-Git-Url: http://git.nikiroo.be/?p=jvcard.git;a=blobdiff_plain;f=src%2Fcom%2Fgooglecode%2Flanterna%2Finput%2FMouseAction.java;fp=src%2Fcom%2Fgooglecode%2Flanterna%2Finput%2FMouseAction.java;h=0000000000000000000000000000000000000000;hp=e6371330582b3740926c98c871930e12cddb176f;hb=f06c81000632cfb5f525ca458f719338f55f9f66;hpb=a73a906356c971b080c36368e71a15d87e8b8d31 diff --git a/src/com/googlecode/lanterna/input/MouseAction.java b/src/com/googlecode/lanterna/input/MouseAction.java deleted file mode 100644 index e637133..0000000 --- a/src/com/googlecode/lanterna/input/MouseAction.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.googlecode.lanterna.input; - -import com.googlecode.lanterna.TerminalPosition; - -/** - * MouseAction, a KeyStroke in disguise, this class contains the information of a single mouse action event. - */ -public class MouseAction extends KeyStroke { - private final MouseActionType actionType; - private final int button; - private final TerminalPosition position; - - /** - * Constructs a MouseAction based on an action type, a button and a location on the screen - * @param actionType The kind of mouse event - * @param button Which button is involved (no button = 0, left button = 1, middle (wheel) button = 2, - * right button = 3, scroll wheel up = 4, scroll wheel down = 5) - * @param position Where in the terminal is the mouse cursor located - */ - public MouseAction(MouseActionType actionType, int button, TerminalPosition position) { - super(KeyType.MouseEvent, false, false); - this.actionType = actionType; - this.button = button; - this.position = position; - } - - /** - * Returns the mouse action type so the caller can determine which kind of action was performed. - * @return The action type of the mouse event - */ - public MouseActionType getActionType() { - return actionType; - } - - /** - * Which button was involved in this event. Please note that for CLICK_RELEASE events, there is no button - * information available (getButton() will return 0). The standard xterm mapping is: - * - * @return The button which is clicked down when this event was generated - */ - public int getButton() { - return button; - } - - /** - * The location of the mouse cursor when this event was generated. - * @return Location of the mouse cursor - */ - public TerminalPosition getPosition() { - return position; - } - - @Override - public String toString() { - return "MouseAction{actionType=" + actionType + ", button=" + button + ", position=" + position + '}'; - } -}