org.pkl.thirdparty.jline.terminal.MouseEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pkl-tools Show documentation
Show all versions of pkl-tools Show documentation
Fat Jar containing pkl-cli, pkl-codegen-java, pkl-codegen-kotlin, pkl-config-java, pkl-core, pkl-doc, and their shaded third-party dependencies.
/*
* Copyright (c) 2002-2016, the original author(s).
*
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
* https://opensource.org/licenses/BSD-3-Clause
*/
package org.pkl.thirdparty.jline.terminal;
import java.util.EnumSet;
public class MouseEvent {
public enum Type {
Released,
Pressed,
Wheel,
Moved,
Dragged
}
public enum Button {
NoButton,
Button1,
Button2,
Button3,
WheelUp,
WheelDown
}
public enum Modifier {
Shift,
Alt,
Control
}
private final Type type;
private final Button button;
private final EnumSet modifiers;
private final int x;
private final int y;
public MouseEvent(Type type, Button button, EnumSet modifiers, int x, int y) {
this.type = type;
this.button = button;
this.modifiers = modifiers;
this.x = x;
this.y = y;
}
public Type getType() {
return type;
}
public Button getButton() {
return button;
}
public EnumSet getModifiers() {
return modifiers;
}
public int getX() {
return x;
}
public int getY() {
return y;
}
@Override
public String toString() {
return "MouseEvent[" + "type="
+ type + ", button="
+ button + ", modifiers="
+ modifiers + ", x="
+ x + ", y="
+ y + ']';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy