import com.swath.*; import com.swath.cmd.*; /** * */ public class FillBubble extends UserDefinedScript { private Parameter mygate; public String getName() { // Return the name of the script return "FillBubble"; } public boolean initScript() throws Exception { // Initialisation of the script is done in this method. // All parameters should be created and registered here. // If something goes wrong, return false. // Check that we are at the correct prompt if (!atPrompt(Swath.COMMAND_PROMPT)) return false; // Create the parameter 'sector' and set the value to // the current sector. // The type will be set to INTEGER by setInteger(). mygate = new Parameter("Bubble Gate"); mygate.setType(Parameter.INTEGER); registerParam(mygate); // Some other initialisation could be done here // ... return true; } public boolean runScript() throws Exception { Bubble[] mybubble = Swath.getBubbles(Bubble.TYPE_NORMAL); for (int i=0; i