Commit 63fb29c3 authored by Eric Tobias's avatar Eric Tobias

Minor bugfixes

parent b98c940b
...@@ -255,7 +255,7 @@ public class SpatialPositioningManager implements SpatialEventListener { ...@@ -255,7 +255,7 @@ public class SpatialPositioningManager implements SpatialEventListener {
* present. * present.
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public @Nullable <T> T getLeftMostWidget(Class<T> _class) { public synchronized @Nullable <T> T getLeftMostWidget(Class<T> _class) {
if (getLeftMostObject() == null) { if (getLeftMostObject() == null) {
return null; return null;
} }
......
...@@ -24,14 +24,14 @@ import java.util.TimerTask; ...@@ -24,14 +24,14 @@ import java.util.TimerTask;
/** /**
* @author Eric Tobias [eric.tobias@list.lu] * @author Eric Tobias [eric.tobias@list.lu]
* @since [major].[minor] * @since 2.1
* @version [major].[minor].[micro] * @version 2.1.4
*/ */
public class FunctionWidget extends BaseWidget { public class FunctionWidget extends BaseWidget {
private Runnable runnable; private Runnable runnable;
private Timer cooldownTimer; private Timer cooldownTimer;
private boolean coolingDown = false; boolean coolingDown = false;
/** /**
* @param builder * @param builder
...@@ -51,10 +51,13 @@ public class FunctionWidget extends BaseWidget { ...@@ -51,10 +51,13 @@ public class FunctionWidget extends BaseWidget {
runnable.run(); runnable.run();
coolingDown = true; coolingDown = true;
cooldownTimer.schedule(new TimerTask() { cooldownTimer.schedule(new TimerTask() {
@Override
public void run() { public void run() {
coolingDown = false; coolingDown = false;
} }
}, 2000); }, 2000);
} }
// TODO Rewrite.
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment