<commit_before>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2010 Adobe Systems Incorporated
//  All Rights Reserved.
//
//  NOTICE: Adobe permits you to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////

package spark.skins.mobile.supportClasses
{
import flash.display.DisplayObject;
import flash.display.Graphics;

/**
 *  Actionscript based skin for toggle buttons. This class can not be used 
 *  by itself. You must subclass and specify a 
 *  backgroundClass and selectedBackgroundClass
 * 
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 2.5 
 *  @productversion Flex 4.5
 */    
public class SelectableButtonSkinBase extends ButtonSkinBase
{
    /* Define the symbol fill items that should be colored by the "symbolColor" style. */
    static private const symbols:Array = ["symbolIcon"];
    
    public function SelectableButtonSkinBase()
    {
        super();
        layoutGap = 15;
        layoutPaddingLeft = 15;
        layoutPaddingRight = 15;
        layoutPaddingTop = 15;
        layoutPaddingBottom = 15;
        
        // Instruct the super class to ignore the "icon" style.
        // Instead, we're going to use the protected members
        // (initialized in the sub-classes):
        // upIconClass, 
        // upSelectedIconClass, 
        // downIconClass,
        // downSelectedIconClass
        useIconStyle = false;
        useChromeColor = true;
        useSymbolColor = true;
    }
    
    /**
     *  The Class used to create the icon in the up state
     * 
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var upIconClass:Class;
    
    /**
     *  The Class used to create the icon in the selected up state 
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var upSelectedIconClass:Class;
    
    /**
     *  The Class used to create the icon in the down state
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var downIconClass:Class;
    
    /**
     *  The Class used to create the icon in the selected down state 
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var downSelectedIconClass:Class;
    
    /**
     *  The Class used to create the symbol icon in all deselected states 
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var upSymbolIconClass:Class;
    
    /**
     *  The Class used to create the selected symbol icon in all selected states 
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var upSymbolIconSelectedClass:Class;
    
    /**
     *  The Class used to create the symbol icon in all deselected states 
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var downSymbolIconClass:Class;
    
    /**
     *  The Class used to create the selected symbol icon in all selected states 
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var downSymbolIconSelectedClass:Class;
    
    /**
     *  Optional symbol to display selection state 
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    public var symbolIcon:Object;
    
    //--------------------------------------------------------------------------
    //
    //  Overridden methods
    //
    //--------------------------------------------------------------------------
    
    override protected function createChildren():void
    {
        super.createChildren();
    }
    
    override public function get symbolItems():Array
    {
        return symbols;
    }
    
    /**
     *  @private
     *  CheckBox <code>chromeColor</code> is flat, no gradient.
     */
    override protected function beginChromeColorFill(chromeColorGraphics:Graphics):void
    {
        // solid color fill for selectable buttons
        chromeColorGraphics.beginFill(getChromeColor());
    }
    
    /**
     *  @private 
     */
    override protected function commitCurrentState():void
    {    
        super.commitCurrentState();<commit_msg>Transferred from the Adobe Open Source Subversion Repository<commit_after>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2010 Adobe Systems Incorporated
//  All Rights Reserved.
//
//  NOTICE: Adobe permits you to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////

package spark.skins.mobile.supportClasses
{
import flash.display.DisplayObject;
import flash.display.Graphics;

/**
 *  Actionscript based skin for toggle buttons. This class can not be used 
 *  by itself. You must subclass and specify a 
 *  backgroundClass and selectedBackgroundClass
 * 
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 2.5 
 *  @productversion Flex 4.5
 */    
public class SelectableButtonSkinBase extends ButtonSkinBase
{
    /* Define the symbol fill items that should be colored by the "symbolColor" style. */
    static private const symbols:Array = ["symbolIcon"];
    
    public function SelectableButtonSkinBase()
    {
        super();
        layoutGap = 15;
        layoutPaddingLeft = 15;
        layoutPaddingRight = 15;
        layoutPaddingTop = 15;
        layoutPaddingBottom = 15;
        
        // Instruct the super class to ignore the "icon" style.
        // Instead, we're going to use the protected members
        // (initialized in the sub-classes):
        // upIconClass, 
        // upSelectedIconClass, 
        // downIconClass,
        // downSelectedIconClass
        useIconStyle = false;
        useChromeColor = true;
        useSymbolColor = true;
    }
    
    /**
     *  The Class used to create the icon in the up state
     * 
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var upIconClass:Class;
    
    /**
     *  The Class used to create the icon in the selected up state 
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var upSelectedIconClass:Class;
    
    /**
     *  The Class used to create the icon in the down state
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var downIconClass:Class;
    
    /**
     *  The Class used to create the icon in the selected down state 
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var downSelectedIconClass:Class;
    
    /**
     *  The Class used to create the symbol icon in all deselected states 
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var upSymbolIconClass:Class;
    
    /**
     *  The Class used to create the selected symbol icon in all selected states 
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var upSymbolIconSelectedClass:Class;
    
    /**
     *  The Class used to create the symbol icon in all deselected states 
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var downSymbolIconClass:Class;
    
    /**
     *  The Class used to create the selected symbol icon in all selected states 
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    protected var downSymbolIconSelectedClass:Class;
    
    /**
     *  Optional symbol to display selection state 
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */
    public var symbolIcon:Object;
    
    //--------------------------------------------------------------------------
    //
    //  Overridden methods
    //
    //--------------------------------------------------------------------------
    
    /**
     *  @private
     */
    override protected function createChildren():void
    {
        super.createChildren();
    }
    
    override public function get symbolItems():Array
    {
        return symbols;
    }
    
    /**
     *  @private
     *  CheckBox <code>chromeColor</code> is flat, no gradient.
     */
    override protected function beginChromeColorFill(chromeColorGraphics:Graphics):void
    {
        // solid color fill for selectable buttons
        chromeColorGraphics.beginFill(getChromeColor());
    }
    
    /**
     *  @private 
     */
    override protected function commitCurrentState():void
    {    
        super.commitCurrentState();
{'fraction_non_alphanumeric': 0.13741922455573505, 'fraction_numerical': 0.018982229402261713, 'mean_word_length': 1.6893836546293781, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1379004', 'n_tokens_mistral': 2852, 'n_tokens_neox': 2612, 'n_words': 823}