scaffold.libs_as.feathers.controls.Check.as Maven / Gradle / Ivy
/*
Feathers
Copyright 2012-2015 Bowler Hat LLC. All Rights Reserved.
This program is free software. You can redistribute and/or modify it in
accordance with the terms of the accompanying license agreement.
*/
package feathers.controls
{
import feathers.skins.IStyleProvider;
import flash.errors.IllegalOperationError;
[Exclude(name="isToggle",kind="property")]
/**
* A toggle control that contains a label and a box that may be checked
* or not to indicate selection.
*
* In the following example, a check is created and selected, and a
* listener for Event.CHANGE
is added:
*
*
* var check:Check = new Check();
* check.label = "Pick Me!";
* check.isSelected = true;
* check.addEventListener( Event.CHANGE, check_changeHandler );
* this.addChild( check );
*
* @see ../../../help/check.html How to use the Feathers Check component
* @see feathers.controls.ToggleSwitch
*/
public class Check extends ToggleButton
{
/**
* The default value added to the styleNameList
of the label.
*
* @see feathers.core.FeathersControl#styleNameList
*/
public static const DEFAULT_CHILD_STYLE_NAME_LABEL:String = "feathers-check-label";
/**
* @private
* DEPRECATED: Replaced by feathers.controls.ButtonState.UP
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const STATE_UP:String = "up";
/**
* @private
* DEPRECATED: Replaced by feathers.controls.ButtonState.DOWN
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const STATE_DOWN:String = "down";
/**
* @private
* DEPRECATED: Replaced by feathers.controls.ButtonState.HOVER
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const STATE_HOVER:String = "hover";
/**
* @private
* DEPRECATED: Replaced by feathers.controls.ButtonState.DISABLED
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const STATE_DISABLED:String = "disabled";
/**
* @private
* DEPRECATED: Replaced by feathers.controls.ButtonState.UP_AND_SELECTED
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const STATE_UP_AND_SELECTED:String = "upAndSelected";
/**
* @private
* DEPRECATED: Replaced by feathers.controls.ButtonState.DOWN_AND_SELECTED
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const STATE_DOWN_AND_SELECTED:String = "downAndSelected";
/**
* @private
* DEPRECATED: Replaced by feathers.controls.ButtonState.HOVER_AND_SELECTED
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const STATE_HOVER_AND_SELECTED:String = "hoverAndSelected";
/**
* @private
* DEPRECATED: Replaced by feathers.controls.ButtonState.DISABLED_AND_SELECTED
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const STATE_DISABLED_AND_SELECTED:String = "disabledAndSelected";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.RelativePosition.TOP
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const ICON_POSITION_TOP:String = "top";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.RelativePosition.RIGHT
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const ICON_POSITION_RIGHT:String = "right";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.RelativePosition.BOTTOM
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const ICON_POSITION_BOTTOM:String = "bottom";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.RelativePosition.LEFT
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const ICON_POSITION_LEFT:String = "left";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.RelativePosition.MANUAL
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const ICON_POSITION_MANUAL:String = "manual";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.RelativePosition.LEFT_BASELINE
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const ICON_POSITION_LEFT_BASELINE:String = "leftBaseline";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.RelativePosition.RIGHT_BASELINE
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const ICON_POSITION_RIGHT_BASELINE:String = "rightBaseline";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.HorizontalAlign.LEFT
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const HORIZONTAL_ALIGN_LEFT:String = "left";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.HorizontalAlign.CENTER
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const HORIZONTAL_ALIGN_CENTER:String = "center";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.HorizontalAlign.RIGHT
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const HORIZONTAL_ALIGN_RIGHT:String = "right";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.VerticalAlign.TOP
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const VERTICAL_ALIGN_TOP:String = "top";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.VerticalAlign.MIDDLE
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const VERTICAL_ALIGN_MIDDLE:String = "middle";
/**
* @private
* DEPRECATED: Replaced by feathers.layout.VerticalAlign.BOTTOM
.
*
* DEPRECATION WARNING: This constant is deprecated
* starting with Feathers 3.0. It will be removed in a future version of
* Feathers according to the standard
* Feathers deprecation policy.
*/
public static const VERTICAL_ALIGN_BOTTOM:String = "bottom";
/**
* The default IStyleProvider
for all Check
* components.
*
* @default null
* @see feathers.core.FeathersControl#styleProvider
*/
public static var globalStyleProvider:IStyleProvider;
/**
* Constructor.
*/
public function Check()
{
super();
this.labelStyleName = DEFAULT_CHILD_STYLE_NAME_LABEL;
super.isToggle = true;
}
/**
* @private
*/
override protected function get defaultStyleProvider():IStyleProvider
{
return Check.globalStyleProvider;
}
/**
* @private
*/
override public function set isToggle(value:Boolean):void
{
throw IllegalOperationError("CheckBox isToggle must always be true.");
}
}
}