<commit_before>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2009 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.accessibility
{

import flash.accessibility.Accessibility;
import flash.events.Event;

import mx.accessibility.AccConst;
import mx.core.UIComponent;
import mx.core.mx_internal;

import spark.components.supportClasses.ButtonBarBase;
import spark.components.supportClasses.ListBase;

use namespace mx_internal;

/**
 *  ButtonBarBaseAccImpl is a subclass of AccessibilityImplementation
 *  which implements accessibility for the ButtonBarBase class.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
public class ButtonBarBaseAccImpl extends ListBaseAccImpl
{
    include "../core/Version.as";

    //--------------------------------------------------------------------------
    //
    //  Class methods
    //
    //--------------------------------------------------------------------------

    /**
     *  Enables accessibility in the ButtonBarBase class.
     *
     *  <p>This method is called by application startup code
     *  that is autogenerated by the MXML compiler.
     *  Afterwards, when instances of ButtonBarBase are initialized,
     *  their <code>accessibilityImplementation</code> property
     *  will be set to an instance of this class.</p>
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */<commit_msg>Transferred from the Adobe Open Source Subversion Repository<commit_after>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2009 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.accessibility
{

import flash.accessibility.Accessibility;
import flash.events.Event;

import mx.accessibility.AccConst;
import mx.core.UIComponent;
import mx.core.mx_internal;

import spark.components.supportClasses.ButtonBarBase;
import spark.components.supportClasses.ListBase;

use namespace mx_internal;

/**
 *  ButtonBarBaseAccImpl is the accessibility implementation class
 *  for spark.components.ButtonBarBase.
 *
 *  <p>Although TabBar has its own accessibility implementation subclass,
 *  ButtonBar simply uses the one for ButtonBarBase.
 *  Therefore, the rest of this description refers to the commonly-used
 *  ButtonBar class rather than the ButtonBarBase base class.</p>
 *
 *  <p>When a Spark ButtonBar is created,
 *  its <code>accessibilityImplementation</code> property
 *  is set to an instance of this class.
 *  The Flash Player then uses this class to allow MSAA clients
 *  such as screen readers to see and manipulate the ButtonBar.
 *  See the mx.accessibility.AccImpl and
 *  flash.accessibility.AccessibilityImplementation classes
 *  for background information about accessibility implementation
 *  classes and MSAA.</p>
 *
 *  <p><b>Children</b></p>
 *
 *  <p>The MSAA children of a ButtonBar are its buttons.
 *  As described below, the accessibility of these Buttons
 *  is managed by the ButtonBar;
 *  their own <code>accessibilityImplementation</code>
 *  and <code>accessibilityProperties</code> are ignored
 *  by the Flash Player.</p>
 *
 *  <p><b>Role</b></p>
 *
 *  <p>The MSAA Role of a ButtonBar is ROLE_SYSTEM_TOOLBAR.</p>
 *
 *  <p>The Role of each Button in the ButtonBar is ROLE_SYSTEM_PUSHBUTTON.</p>
 *
 *  <p><b>Name</b></p>
 *
 *  <p>The MSAA Name of a ButtonBar is, by default, an empty string.
 *  When wrapped in a FormItem element, the Name is the FormItem's label.
 *  To override this behavior,
 *  set the ButtonBar's <code>accessibilityName</code> property.</p>
 *
 *  <p>The Name of each Button is determined by the ButtonBar's
 *  <code>itemToLabel()</code> method.</p>
 *
 *  <p>When the Name of the ButtonBar or one of its Buttons changes,
 *  a ButtonBar dispatches the MSAA event EVENT_OBJECT_NAMECHANGE
 *  with the proper childID for the Button or 0 for itself.</p>
 *
 *  <p><b>Description</b></p>
 *
 *  <p>The MSAA Description of a ButtonBar is, by default, an empty string,
 *  but you can set the ButtonBar's <code>accessibilityDescription</code>
 *  property.</p>
 *
 *  <p>The Description of each Button is the empty string.</p>
 *
 *  <p><b>State</b></p>
 *
 *  <p>The MSAA State of a ButtonBar is a combination of:
 *  <ul>
 *    <li>STATE_SYSTEM_UNAVAILABLE (when enabled is false)</li>
 *    <li>STATE_SYSTEM_FOCUSABLE (when enabled is true)</li>
 *    <li>STATE_SYSTEM_FOCUSED (when enabled is true
 *    and the ButtonBar has focus)</li>
 *  </ul></p>
 *
 *  <p>The State of a Button in a ButtonBar is a combination of:
 *  <ul>
 *    <li>STATE_SYSTEM_FOCUSED (when it has focus)</li>
 *    <li>STATE_SYSTEM_PRESSED (when it is selected)</li>
 *  </ul></p>
 *
 *  <p>When the State of the ButtonBar or one of its Buttons changes,
 *  a ButtonBar dispatches the MSAA event EVENT_OBJECT_STATECHANGE
 *  with the proper childID for the Button or 0 for itself.</p>
 *
 *  <p><b>Value</b></p>
 *
 *  <p>A ButtonBar, or a Button in a ButtonBar, does not have an MSAA Value.</p>
 *
 *  <p><b>Location</b></p>
 *
 *  <p>The MSAA Location of a ButtonBar, or a Button in a ButtonBar,
 *  is its bounding rectangle.</p>
 *
 *  <p><b>Default Action</b></p>
 *
 *  <p>A ButtonBar does not have an MSAA DefaultAction.</p>
 *
 *  <p>The DefaultAction for a Button in a ButtonBar is "Press".</p>
 *
 *  <p><b>Focus</b></p>
 *
 *  <p>Both the ButtonBar and its individual buttons accept focus.
 *  When they do so it dispatches the MSAA event EVENT_OBJECT_FOCUS.
 *  A button is not automatically selected when focused
 *  through arrow key navigation.
 *  To select a focused button, the user must press the spacebar.</p>
 *
 *  <p><b>Selection</b></p>
 *
 *  <p>MSAA Selection will press the button
 *  corresponding to the specified childID.
 *  Only one button can be pressed at a time.</p>
 *
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
public class ButtonBarBaseAccImpl extends ListBaseAccImpl
{
    include "../core/Version.as";

    //--------------------------------------------------------------------------
    //
    //  Class methods
    //
    //--------------------------------------------------------------------------

    /**
     *  Enables accessibility in the ButtonBarBase class.
     *
     *  <p>This method is called by application startup code
     *  that is autogenerated by the MXML compiler.
     *  Afterwards, when instances of ButtonBarBase are initialized,
     *  their <code>accessibilityImplementation</code> property
     *  will be set to an instance of this class.</p>
     *
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */
{'fraction_non_alphanumeric': 0.1759935117599351, 'fraction_numerical': 0.005136523384698567, 'mean_word_length': 2.3955943093162, 'pattern_counts': {'":': 0, '<': 115, '<?xml version=': 0, '>': 115, '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': '1220985', 'n_tokens_mistral': 2147, 'n_tokens_neox': 2078, 'n_words': 724}