/**
 * * Licensed under the Apache License, Version 2.0 (the 'License');
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an 'AS IS' BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Generated by Apache Flex Cross-Compiler from org/apache/flex/mobile/ToggleSwitch.as
 * org.apache.flex.mobile.ToggleSwitch
 *
 * @fileoverview
 *
 * @suppress {checkTypes|accessControls}
 */

goog.provide('org.apache.flex.mobile.ToggleSwitch');

goog.require('org.apache.flex.core.UIBase');
goog.require('org.apache.flex.core.ValuesManager');
goog.require('org.apache.flex.core.IBeadController');
goog.require('org.apache.flex.core.IToggleButtonModel');
goog.require('org.apache.flex.utils.Language');



/**
 * Constructor
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion FlexJS 0.0
 * @constructor
 * @extends {org.apache.flex.core.UIBase}
 */
org.apache.flex.mobile.ToggleSwitch = function() {
  org.apache.flex.mobile.ToggleSwitch.base(this, 'constructor');
  this.setWidthAndHeight(40.0, 25.0, false);
};
goog.inherits(org.apache.flex.mobile.ToggleSwitch, org.apache.flex.core.UIBase);


/**
 * @private
 * @type {org.apache.flex.core.IBeadController}
 */
org.apache.flex.mobile.ToggleSwitch.prototype._controller;


Object.defineProperties(org.apache.flex.mobile.ToggleSwitch.prototype, /** @lends {org.apache.flex.mobile.ToggleSwitch.prototype} */ {
/** @export */
selected: {
get: /** @this {org.apache.flex.mobile.ToggleSwitch} */ function() {
  return org.apache.flex.utils.Language.as(this.model, org.apache.flex.core.IToggleButtonModel, true).selected;
},
set: /** @this {org.apache.flex.mobile.ToggleSwitch} */ function(value) {
  org.apache.flex.utils.Language.as(this.model, org.apache.flex.core.IToggleButtonModel, true).selected = value;
}},
/** @export */
controller: {
get: /** @this {org.apache.flex.mobile.ToggleSwitch} */ function() {
  if (this._controller == null) {
    this._controller = org.apache.flex.utils.Language.as(this.getBeadByType(org.apache.flex.core.IBeadController), org.apache.flex.core.IBeadController);
    if (this._controller == null) {
      var /** @type {Object} */ c = org.apache.flex.core.ValuesManager.valuesImpl.getValue(this, "iBeadController");
      this._controller = org.apache.flex.utils.Language.as(new c(), org.apache.flex.core.IBeadController);
      this.addBead(this._controller);
    }
  }
  return this._controller;
},
set: /** @this {org.apache.flex.mobile.ToggleSwitch} */ function(value) {
  this._controller = value;
}}}
);


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
org.apache.flex.mobile.ToggleSwitch.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'ToggleSwitch', qName: 'org.apache.flex.mobile.ToggleSwitch'}] };


/**
 * Prevent renaming of class. Needed for reflection.
 */
goog.exportSymbol('org.apache.flex.mobile.ToggleSwitch', org.apache.flex.mobile.ToggleSwitch);



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.flex.mobile.ToggleSwitch.prototype.FLEXJS_REFLECTION_INFO = function () {
  return {
    variables: function () {
      return {
      };
    },
    accessors: function () {
      return {
        'selected': { type: 'Boolean', declaredBy: 'org.apache.flex.mobile.ToggleSwitch', metadata: function () { return [ { name: 'Bindable', args: [ { key: '', value: 'change'}]}]; }},
        'controller': { type: 'IBeadController', declaredBy: 'org.apache.flex.mobile.ToggleSwitch'}
      };
    },
    methods: function () {
      return {
        'ToggleSwitch': { type: '', declaredBy: 'org.apache.flex.mobile.ToggleSwitch'}
      };
    }
  };
};