package de.dtele.settings.events {
  
  import flash.events.Event;
  
  /**
   * Notification for setting changes
   * 
   * @author Mathias Brodala
   */
  public class SettingEvent extends Event {
    
    /* Constants */
    /**
     * The SettingEvent.OPTION_SET constant defines the value of the 
     * <code>type</code> property of the event object 
     * for a <code>optionSet</code> event.
     * 
     * @eventType optionSet
     */
    public static const OPTION_SET:String = "optionSet";
    /**
     * The SettingEvent.DEFAULT_SET constant defines the value of the 
     * <code>type</code> property of the event object 
     * for a <code>optionSet</code> event.
     * 
     * @eventType optionSet
     */
    public static const DEFAULT_SET:String = "defaultSet";
    
    /* Properties */
    private var _option:String;
    /**
     * The option this event was dispatched for
     * 
     * @return 
     */
    public function get option():String { return this._option; }
    
    private var _value:Object;
    /**
     * The value of the option
     * 
     * @return 
     */
    public function get value():Object { return this._value; }

    /* Methods */   
    public function SettingEvent(type:String, option:String, value:Object, bubbles:Boolean=false, cancelable:Boolean=false) {
      
      super(type, bubbles, cancelable);
      
      this._option = option;
      this._value = value;
    }
  }
}