TWindowBackend
[nikiroo-utils.git] / src / jexer / event / TMouseEvent.java
index e098fa20f3556c98b75579a450d8e6985ced4786..c29ebc3520d8db88dfd5107fd46aa50b598f5dd0 100644 (file)
@@ -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.
      *