summaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com/jogamp/graph/ui
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-04-28 12:44:10 +0200
committerSven Gothel <[email protected]>2023-04-28 12:44:10 +0200
commita8fb422a828001612203aea23e8a4cdf9392e491 (patch)
treeb7ab3e28788e22e801d8d440366b465b6dcd7158 /src/graphui/classes/com/jogamp/graph/ui
parent3ddcde7f2fd21e0a418f756519e42ee190ede07e (diff)
GraphUI Shape: [add|remove]MouseListener(): Return shape for chaining
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/Shape.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Shape.java b/src/graphui/classes/com/jogamp/graph/ui/Shape.java
index e9bf840ef..faa14b298 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/Shape.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/Shape.java
@@ -1033,24 +1033,26 @@ public abstract class Shape {
return this;
}
- public final void addMouseListener(final MouseGestureListener l) {
+ public final Shape addMouseListener(final MouseGestureListener l) {
if(l == null) {
- return;
+ return this;
}
@SuppressWarnings("unchecked")
final ArrayList<MouseGestureListener> clonedListeners = (ArrayList<MouseGestureListener>) mouseListeners.clone();
clonedListeners.add(l);
mouseListeners = clonedListeners;
+ return this;
}
- public final void removeMouseListener(final MouseGestureListener l) {
+ public final Shape removeMouseListener(final MouseGestureListener l) {
if (l == null) {
- return;
+ return this;
}
@SuppressWarnings("unchecked")
final ArrayList<MouseGestureListener> clonedListeners = (ArrayList<MouseGestureListener>) mouseListeners.clone();
clonedListeners.remove(l);
mouseListeners = clonedListeners;
+ return this;
}
/**