X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fevent%2FTMouseEvent.java;h=e4b44833fe4a0893e58de6c53df28858069a6ca8;hb=b6faeac0d9c3e3ae3376ed28b54ec6ea6408ad7a;hp=59e35161095095af262672674147b330673b4de4;hpb=e16dda65585466c8987bd1efd718431450a96605;p=fanfix.git diff --git a/src/jexer/event/TMouseEvent.java b/src/jexer/event/TMouseEvent.java index 59e3516..e4b4483 100644 --- a/src/jexer/event/TMouseEvent.java +++ b/src/jexer/event/TMouseEvent.java @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (C) 2016 Kevin Lamonte + * Copyright (C) 2017 Kevin Lamonte * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -52,7 +52,12 @@ public final class TMouseEvent extends TInputEvent { /** * Mouse button up. X and Y will have screen coordinates. */ - MOUSE_UP + MOUSE_UP, + + /** + * Mouse double-click. X and Y will have screen coordinates. + */ + MOUSE_DOUBLE_CLICK } /** @@ -135,6 +140,15 @@ public final class TMouseEvent extends TInputEvent { return absoluteX; } + /** + * Set absoluteX. + * + * @param absoluteX the new value + */ + public void setAbsoluteX(final int absoluteX) { + this.absoluteX = absoluteX; + } + /** * Mouse Y - absolute screen coordinate. */ @@ -149,6 +163,15 @@ public final class TMouseEvent extends TInputEvent { return absoluteY; } + /** + * Set absoluteY. + * + * @param absoluteY the new value + */ + public void setAbsoluteY(final int absoluteY) { + this.absoluteY = absoluteY; + } + /** * Mouse button 1 (left button). */ @@ -250,6 +273,17 @@ public final class TMouseEvent extends TInputEvent { this.mouseWheelDown = mouseWheelDown; } + /** + * Create a duplicate instance. + * + * @return duplicate intance + */ + public TMouseEvent dup() { + TMouseEvent mouse = new TMouseEvent(type, x, y, absoluteX, absoluteY, + mouse1, mouse2, mouse3, mouseWheelUp, mouseWheelDown); + return mouse; + } + /** * Make human-readable description of this TMouseEvent. *