<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
{
import flash.display.GradientType;
import flash.display.Graphics;
import flash.events.Event;
import flash.text.TextFormatAlign;

import mx.core.DeviceDensity;
import mx.core.mx_internal;
import mx.utils.ColorUtil;

import spark.components.ActionBar;
import spark.components.Group;
import spark.components.supportClasses.StyleableTextField;
import spark.core.SpriteVisualElement;
import spark.layouts.HorizontalAlign;
import spark.layouts.HorizontalLayout;
import spark.layouts.VerticalAlign;
import spark.skins.mobile.assets.ActionBarBackground;
import spark.skins.mobile.supportClasses.MobileSkin;
import spark.skins.mobile320.assets.ActionBarBackground;

use namespace mx_internal;

/**
 *  The default skin class for the Spark ActionBar component.  
 *  
 *  @see spark.components.ActionBar
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 2.5
 *  @productversion Flex 4.5
 */
public class ActionBarSkin extends MobileSkin
{
    //--------------------------------------------------------------------------
    //
    //  Class constants
    //
    //--------------------------------------------------------------------------
    
    mx_internal static const ACTIONBAR_CHROME_COLOR_RATIOS:Array = [0, 80];
    
    //--------------------------------------------------------------------------
    //
    //  Constructor
    //
    //--------------------------------------------------------------------------
    
    public function ActionBarSkin()
    {
        super();
        
        useChromeColor = true;
        
        switch (authorDensity)
        {
            case DeviceDensity.PPI_320:
            {
                layoutBorderHeight = 2;
                layoutShadowHeight = 6;
                layoutContentGroupHeight = 86;
                layoutTitleGroupHorizontalPadding = 26;
                
                borderClass = spark.skins.mobile320.assets.ActionBarBackground;
                
                break;
            }
            case DeviceDensity.PPI_240:
            {
                layoutBorderHeight = 1;
                layoutShadowHeight = 3;
                layoutContentGroupHeight = 65;
                layoutTitleGroupHorizontalPadding = 20;
                
                borderClass = spark.skins.mobile.assets.ActionBarBackground;
                
                break;
            }
            default:
            {
                // default PPI160
                layoutBorderHeight = 1;
                layoutShadowHeight = 3;
                layoutContentGroupHeight = 43;
                layoutTitleGroupHorizontalPadding = 13;
                
                borderClass = spark.skins.mobile.assets.ActionBarBackground;
                
                break;
            }
        }
    }
    
    //--------------------------------------------------------------------------
    //
    //  Graphics variables
    //
    //--------------------------------------------------------------------------
    
    protected var borderClass:Class;
    
    //--------------------------------------------------------------------------
    //
    //  Layout variables
    //
    //--------------------------------------------------------------------------
    
    protected var layoutBorderHeight:uint;
    
    protected var layoutShadowHeight:uint;
    
    protected var layoutContentGroupHeight:uint;
    
    protected var layoutTitleGroupHorizontalPadding:uint;
    
    //--------------------------------------------------------------------------
    //
    //  Variables
    //
    //--------------------------------------------------------------------------
    
    public var hostComponent:ActionBar;
    
    private var _navigationVisible:Boolean = false;
    
    private var _titleContentVisible:Boolean = false;
    
    private var _actionVisible:Boolean = false;
    
    private var border:SpriteVisualElement;
    
    //--------------------------------------------------------------------------
    //
    //  Skin parts
    //
    //--------------------------------------------------------------------------
    
    public var navigationGroup:Group;
    
    public var titleGroup:Group;
    
    public var actionGroup:Group;
    
    public var titleDisplay:TitleDisplayComponent;
    
    //--------------------------------------------------------------------------
    //
    //  Overridden methods
    //
    //--------------------------------------------------------------------------
    
    override protected function createChildren():void<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
{
import flash.display.GradientType;
import flash.display.Graphics;
import flash.events.Event;
import flash.text.TextFormatAlign;

import mx.core.DeviceDensity;
import mx.core.mx_internal;
import mx.utils.ColorUtil;

import spark.components.ActionBar;
import spark.components.Group;
import spark.components.supportClasses.StyleableTextField;
import spark.core.SpriteVisualElement;
import spark.layouts.HorizontalAlign;
import spark.layouts.HorizontalLayout;
import spark.layouts.VerticalAlign;
import spark.skins.mobile.assets.ActionBarBackground;
import spark.skins.mobile.supportClasses.MobileSkin;
import spark.skins.mobile320.assets.ActionBarBackground;

use namespace mx_internal;

/**
 *  The default skin class for the Spark ActionBar component.  
 *  
 *  @see spark.components.ActionBar
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 2.5
 *  @productversion Flex 4.5
 */
public class ActionBarSkin extends MobileSkin
{
    //--------------------------------------------------------------------------
    //
    //  Class constants
    //
    //--------------------------------------------------------------------------
    
    mx_internal static const ACTIONBAR_CHROME_COLOR_RATIOS:Array = [0, 80];
    
    //--------------------------------------------------------------------------
    //
    //  Constructor
    //
    //--------------------------------------------------------------------------
    
    public function ActionBarSkin()
    {
        super();
        
        useChromeColor = true;
        
        switch (authorDensity)
        {
            case DeviceDensity.PPI_320:
            {
                layoutBorderHeight = 2;
                layoutShadowHeight = 6;
                layoutContentGroupHeight = 86;
                layoutTitleGroupHorizontalPadding = 26;
                
                borderClass = spark.skins.mobile320.assets.ActionBarBackground;
                
                break;
            }
            case DeviceDensity.PPI_240:
            {
                layoutBorderHeight = 1;
                layoutShadowHeight = 3;
                layoutContentGroupHeight = 65;
                layoutTitleGroupHorizontalPadding = 20;
                
                borderClass = spark.skins.mobile.assets.ActionBarBackground;
                
                break;
            }
            default:
            {
                // default PPI160
                layoutBorderHeight = 1;
                layoutShadowHeight = 3;
                layoutContentGroupHeight = 43;
                layoutTitleGroupHorizontalPadding = 13;
                
                borderClass = spark.skins.mobile.assets.ActionBarBackground;
                
                break;
            }
        }
    }
    
    //--------------------------------------------------------------------------
    //
    //  Graphics variables
    //
    //--------------------------------------------------------------------------
    
    protected var borderClass:Class;
    
    //--------------------------------------------------------------------------
    //
    //  Layout variables
    //
    //--------------------------------------------------------------------------
    
    protected var layoutBorderHeight:uint;
    
    protected var layoutShadowHeight:uint;
    
    protected var layoutContentGroupHeight:uint;
    
    protected var layoutTitleGroupHorizontalPadding:uint;
    
    //--------------------------------------------------------------------------
    //
    //  Variables
    //
    //--------------------------------------------------------------------------
    
    public var hostComponent:ActionBar;
    
    private var _navigationVisible:Boolean = false;
    
    private var _titleContentVisible:Boolean = false;
    
    private var _actionVisible:Boolean = false;
    
    private var border:SpriteVisualElement;
    
    //--------------------------------------------------------------------------
    //
    //  Skin parts
    //
    //--------------------------------------------------------------------------
    
    public var navigationGroup:Group;
    
    public var titleGroup:Group;
    
    public var actionGroup:Group;
    
    /**
     *  Wraps a StyleableTextField in a UIComponent to be compatible with
     *  ViewTransition effects.
     */
    public var titleDisplay:TitleDisplayComponent;
    
    //--------------------------------------------------------------------------
    //
    //  Overridden methods
    //
    //--------------------------------------------------------------------------
    
    override protected function createChildren():void
{'fraction_non_alphanumeric': 0.2917196206862841, 'fraction_numerical': 0.009385081630657934, 'mean_word_length': 0.9545280855941918, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5937577', 'n_tokens_mistral': 2231, 'n_tokens_neox': 2081, 'n_words': 448}