import static sneer.foundation.environments.Environments.my;
my(BlinkingLights.class).turnOn(LightType.INFO, "caption", "helpmsg", timeToLive); my(BlinkingLights.class).turnOnIfNecessary(my(BlinkingLights.class).prepare(LightType.ERROR), friendlyException); my(TrayIcons.class).messageBalloon("title", "msg");
my(ExceptionHandler.class).shield(new Closure() { @Override public void run() { ... }});
my(Logger.class).log("msg"); Environments.runWith(my(Environment.class), new Closure() { @Override public void run() { my(Logger.class).log("msg"); }}); my(ExceptionLogger.class).log(throwable, "msg");
@Snapp @Brick /** Displays Blinking Lights on the dashboard. * @see BlinkingLights */ public interface BlinkingLightsGui extends Instrument {}
class BlinkingLightsGuiImpl implements BlinkingLightsGui { ... BlinkingLightsGuiImpl(){ ... my(InstrumentRegistry.class).registerInstrument(this); } @Override public void init(InstrumentPanel window) { ... } @Override public int defaultHeight() {return 100;} @Override public String title() { return "Blinking Lights"; } ... }