X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fevent%2FTMouseEvent.java;h=c29ebc3520d8db88dfd5107fd46aa50b598f5dd0;hb=3e0743556d1f31723a11a6019b5c2b018b4b2104;hp=59e35161095095af262672674147b330673b4de4;hpb=e16dda65585466c8987bd1efd718431450a96605;p=nikiroo-utils.git diff --git a/src/jexer/event/TMouseEvent.java b/src/jexer/event/TMouseEvent.java index 59e3516..c29ebc3 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"), @@ -135,6 +135,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 +158,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 +268,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. *