Added an isRunnable() method that returns true if the simulation can be run.

This commit is contained in:
Adam Dunkels 2012-06-04 13:32:34 +02:00
parent bb187d7882
commit 4868a172be

View File

@ -1081,6 +1081,15 @@ public class Simulation extends Observable implements Runnable {
return isRunning && simulationThread != null;
}
/**
* Return true is simulation is runnable.
*
* @return True if simulation is runnable
*/
public boolean isRunnable() {
return motes.size() > 0;
}
/**
* Get current simulation title (short description).
*