/**
 * Generated by Apache Royale Compiler from org\apache\royale\html\beads\controllers\AccordionItemRendererMouseController.as
 * org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController
 *
 * @fileoverview
 *
 * @suppress {checkTypes|accessControls}
 */

goog.provide('org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController');

goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.events.Event');
goog.require('org.apache.royale.events.ItemClickedEvent');
goog.require('org.apache.royale.events.MouseEvent');
goog.require('org.apache.royale.html.supportClasses.AccordionItemRenderer');
goog.require('org.apache.royale.core.IBeadController');
goog.require('org.apache.royale.utils.Language');



/**
 * @constructor
 * @implements {org.apache.royale.core.IBeadController}
 */
org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController = function() {
};


/**
 * Prevent renaming of class. Needed for reflection.
 */
goog.exportSymbol('org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController', org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController);


/**
 * @private
 * @type {org.apache.royale.core.IStrand}
 */
org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype.org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController__strand;


/**
 * @protected
 * @param {org.apache.royale.events.MouseEvent} event
 */
org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype.titleRollHandler = function(event) {
  var /** @type {string} */ type = event.type == org.apache.royale.events.MouseEvent.ROLL_OVER ? "itemRollOver" : "itemRollOut";
  var /** @type {org.apache.royale.events.Event} */ newEvent = new org.apache.royale.events.Event(type);
  this.org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController_accordionItemRenderer.dispatchEvent(newEvent);
};


/**
 * @protected
 * @param {org.apache.royale.events.MouseEvent} event
 */
org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype.titleBarClickHandler = function(event) {
  var /** @type {org.apache.royale.events.ItemClickedEvent} */ newEvent = new org.apache.royale.events.ItemClickedEvent("itemClicked");
  newEvent.data = this.org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController_accordionItemRenderer.data;
  newEvent.multipleSelection = event.shiftKey;
  newEvent.index = this.org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController_accordionItemRenderer.index;
  this.org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController_accordionItemRenderer.dispatchEvent(newEvent);
};


org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype.get__org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController_accordionItemRenderer = function() {
  return org.apache.royale.utils.Language.as(this.org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController__strand, org.apache.royale.html.supportClasses.AccordionItemRenderer);
};


org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype.get__strand = function() {
  return this.org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController__strand;
};


org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype.set__strand = function(value) {
  this.org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController__strand = value;
  this.org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController_accordionItemRenderer.titleBar.addEventListener(org.apache.royale.events.MouseEvent.CLICK, org.apache.royale.utils.Language.closure(this.titleBarClickHandler, this, 'titleBarClickHandler'));
  this.org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController_accordionItemRenderer.titleBar.addEventListener(org.apache.royale.events.MouseEvent.ROLL_OVER, org.apache.royale.utils.Language.closure(this.titleRollHandler, this, 'titleRollHandler'));
  this.org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController_accordionItemRenderer.titleBar.addEventListener(org.apache.royale.events.MouseEvent.ROLL_OUT, org.apache.royale.utils.Language.closure(this.titleRollHandler, this, 'titleRollHandler'));
};


Object.defineProperties(org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype, /** @lends {org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.html.supportClasses.AccordionItemRenderer} */
org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController_accordionItemRenderer: {
get: org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype.get__org_apache_royale_html_beads_controllers_AccordionItemRendererMouseController_accordionItemRenderer},
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
get: org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype.get__strand,
set: org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype.set__strand}}
);


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'AccordionItemRendererMouseController', qName: 'org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController', kind: 'class' }], interfaces: [org.apache.royale.core.IBeadController] };



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'strand': { type: 'org.apache.royale.core.IStrand', access: 'readwrite', declaredBy: 'org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController'}
      };
    },
    methods: function () {
      return {
        'AccordionItemRendererMouseController': { type: '', declaredBy: 'org.apache.royale.html.beads.controllers.AccordionItemRendererMouseController'}
      };
    }
  };
};