<commit_before>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2011 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.BlendMode;
import flash.display.DisplayObject;
import flash.display.GradientType;
import flash.display.Graphics;
import flash.display.GraphicsPathCommand;
import flash.display.Sprite;

import mx.core.DPIClassification;
import mx.core.FlexGlobals;
import mx.core.IVisualElement;
import mx.core.UIComponent;
import mx.core.mx_internal;
import mx.utils.ColorUtil;

import spark.components.Application;
import spark.components.ArrowDirection;
import spark.components.Callout;
import spark.core.SpriteVisualElement;
import spark.skins.mobile.CalloutSkin;

use namespace mx_internal;

/**
 *  The arrow skin part for CalloutSkin. 
 *  
 *  @see spark.skin.mobile.CalloutSkin
 *  
 *  @langversion 3.0
 *  @playerversion AIR 3
 *  @productversion Flex 4.5.2
 */ 
public class CalloutArrow extends UIComponent
{
    public function CalloutArrow()
    {
        super();
        
        useBackgroundGradient = true;
        
        var applicationDPI:Number = Application(FlexGlobals.topLevelApplication).applicationDPI;
        
        // Copy DPI-specific values from CalloutSkin
        switch (applicationDPI)
        {
            case DPIClassification.DPI_320:
            {
                gap = 16;
                backgroundGradientHeight = 220;
                highlightWeight = 2;
                
                break;
            }
            case DPIClassification.DPI_240:
            {
                gap = 12;
                backgroundGradientHeight = 165;
                highlightWeight = 1;
                
                break;
            }
            default:
            {
                // default DPI_160
                gap = 8;
                backgroundGradientHeight = 110;
                highlightWeight = 1;
                
                break;
            }
        }
    }
    
    /**
     *  A gap on the frame-adjacent side of the arrow graphic to avoid
     *  drawing past the CalloutSkin backgroundCornerRadius.
     * 
     *  <p>The default implementation matches the gap value with the
     *  <code>backgroundCornerRadius</code> value in <code>CalloutSkin</code>.</p>
     * 
     *  @see spark.skins.mobile.CalloutSkin#backgroundCornerRadius
     *  
     *  @langversion 3.0
     *  @playerversion AIR 3
     *  @productversion Flex 4.5.2
     */
    protected var gap:Number;
    
    /**
     *  @copy spark.skins.mobile.CalloutSkin#backgroundGradientHeight
     */
    protected var backgroundGradientHeight:Number;
    
    /**
     *  @copy spark.skins.mobile.CalloutSkin#highlightWeight
     */<commit_msg>Transferred from the Adobe Open Source Subversion Repository<commit_after>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2011 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.BlendMode;
import flash.display.DisplayObject;
import flash.display.GradientType;
import flash.display.Graphics;
import flash.display.GraphicsPathCommand;
import flash.display.Sprite;

import mx.core.DPIClassification;
import mx.core.FlexGlobals;
import mx.core.IVisualElement;
import mx.core.UIComponent;
import mx.core.mx_internal;
import mx.utils.ColorUtil;

import spark.components.Application;
import spark.components.ArrowDirection;
import spark.components.Callout;
import spark.core.SpriteVisualElement;
import spark.skins.mobile.CalloutSkin;

use namespace mx_internal;

/**
 *  The arrow skin part for CalloutSkin. 
 *  
 *  @see spark.skin.mobile.CalloutSkin
 *  
 *  @langversion 3.0
 *  @playerversion AIR 3
 *  @productversion Flex 4.6
 */ 
public class CalloutArrow extends UIComponent
{
    public function CalloutArrow()
    {
        super();
        
        useBackgroundGradient = true;
        
        var applicationDPI:Number = Application(FlexGlobals.topLevelApplication).applicationDPI;
        
        // Copy DPI-specific values from CalloutSkin
        switch (applicationDPI)
        {
            case DPIClassification.DPI_320:
            {
                gap = 16;
                backgroundGradientHeight = 220;
                highlightWeight = 2;
                
                break;
            }
            case DPIClassification.DPI_240:
            {
                gap = 12;
                backgroundGradientHeight = 165;
                highlightWeight = 1;
                
                break;
            }
            default:
            {
                // default DPI_160
                gap = 8;
                backgroundGradientHeight = 110;
                highlightWeight = 1;
                
                break;
            }
        }
    }
    
    /**
     *  A gap on the frame-adjacent side of the arrow graphic to avoid
     *  drawing past the CalloutSkin backgroundCornerRadius.
     * 
     *  <p>The default implementation matches the gap value with the
     *  <code>backgroundCornerRadius</code> value in <code>CalloutSkin</code>.</p>
     * 
     *  @see spark.skins.mobile.CalloutSkin#backgroundCornerRadius
     *  
     *  @langversion 3.0
     *  @playerversion AIR 3
     *  @productversion Flex 4.6
     */
    protected var gap:Number;
    
    /**
     *  @copy spark.skins.mobile.CalloutSkin#backgroundGradientHeight
     */
    protected var backgroundGradientHeight:Number;
    
    /**
     *  @copy spark.skins.mobile.CalloutSkin#highlightWeight
     */
{'fraction_non_alphanumeric': 0.12696356275303644, 'fraction_numerical': 0.013279352226720647, 'mean_word_length': 1.7327433628318585, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6545100', 'n_tokens_mistral': 1734, 'n_tokens_neox': 1616, 'n_words': 383}