You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by al...@apache.org on 2021/02/25 11:25:13 UTC

[royale-asjs] branch develop updated: added in Accordion

This is an automated email from the ASF dual-hosted git repository.

alinakazi pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new b14eac1  added in Accordion
b14eac1 is described below

commit b14eac121d4d9f1a585bed0a8c247f31299c9e55
Author: alinakazi <al...@gmail.com>
AuthorDate: Thu Feb 25 16:25:00 2021 +0500

    added in Accordion
---
 .../src/main/royale/mx/containers/Accordion.as     | 69 ++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Accordion.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Accordion.as
index 03fb717..2c3cc5e 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Accordion.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Accordion.as
@@ -26,6 +26,7 @@ import mx.events.FocusEvent;
 import mx.events.KeyboardEvent;
 import mx.events.MouseEvent;
 import mx.core.Container;
+import mx.controls.Button;
 
 [RequiresDataBinding(true)]
 
@@ -348,7 +349,75 @@ public class Accordion extends Container //implements IHistoryManagerClient, IFo
 
       
     }
+	
+	//--------------------------------------------------------------------------
+    //
+    //  Public methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Returns a reference to the navigator button for a child container.
+     *
+     *  @param index Zero-based index of the child.
+     *
+     *  @return Button object representing the navigator button.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function getHeaderAt(index:int):Button
+    {
+        return new Button();
+    }
+	
+	//----------------------------------
+    //  selectedIndex
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the selectedIndex and selectedChild properties.
+     */
+    private var _selectedIndex:int = -1;
 
+/**
+     *  The zero-based index of the currently visible child container.
+     *  Child indexes are in the range 0, 1, 2, ..., n - 1, where n is the number
+     *  of children.
+     *  The default value is 0, corresponding to the first child.
+     *  If there are no children, this property is <code>-1</code>.
+     *
+     *  @default 0
+     *
+     *  @tiptext Specifies the index of the child view that is currently displayed
+     *  @helpid 3402
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get selectedIndex():int
+    {
+       
+        return _selectedIndex;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selectedIndex(value:int):void
+    {
+        // Bail if new index isn't a number.
+        if (value == -1)
+            return;
+		
+		_selectedIndex = value;
+      
+    }
     //--------------------------------------------------------------------------
     //
     //  Variables