package votorola.s.gwt.stage.light; // Copyright 2012, Michael Allan. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE. /** A controller that activates and directs a {@linkplain #light() stage light} according * to the properties of an {@linkplain Light#assignActuator(Sensor) assigned sensor}. * Lights and sensors may exist in any number. Each coordinated light/sensor pair is * mediated by an {@linkplain Light#assignActuator(Sensor) assigned actuator}. The * typical lines of visibility are thus:
  *
  *    Light  ←  Actuator  →  Sensor
* * One purpose of this arrangement is to speed light direction by having the actuator * pre-construct the directional data for its sensor and cache it for repeated use. * Where this optimization is not required, the implementation of the actuator may be * folded into the light, a single instance for all sensors:
  *
  *   (Light, Actuator)  →  Sensor
*/ public interface Actuator { // - A c t u a t o r ------------------------------------------------------------------ /** Responds to a change in the sensor's properties. */ public void changed( S sensor ); /** The stage light that is directed. */ public Light light(); /** Responds to the user's point leaving the sensor. */ public void out( S sensor ); /** Responds to the user's point entering the sensor. */ public void over( S sensor ); }