package sivantoledo.nxt.beep;

import sivantoledo.nxt.NXTender;
import sivantoledo.nxt.NXTender.Plugin;
import sivantoledo.nxt.Sender;

import org.eclipse.swt.widgets.Display;

public class Beep extends NXTender.Plugin {
  
  private Beep() {
    super("BEEP");
  }
  
  public void close() {
  }

  public void process(String command) {
    // we ignore the actual command
    Display.getDefault().asyncExec(new Runnable() {
      public void run() { 
        Display.getDefault().beep();
      }
    });
  }

  private static Beep instance;  
  public static Beep getInstance(Sender sender) {
    if (instance == null) instance = new Beep();
    return instance;
  }
  
}
