Changeset 2338


Ignore:
Timestamp:
10/29/12 19:01:36 (12 years ago)
Author:
olhsha
Message:

the even about accessibility of the vertical scroll bar on the comments panel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/browser/CommentsPanel.as

    r2337 r2338  
    2525        import mx.controls.scrollClasses.ScrollBar;
    2626       
     27       
     28       
    2729        [Event(name="commentsLoaded",type="flash.events.Event")]
    2830        public class CommentsPanel extends Canvas
    2931        {
    3032                public static const COMMENTS_LOADED:String = "commentsLoaded";
     33               
     34               
     35                public static const SCROLL_BAR_SWITCHED_EVENT:String = "verticalScrollBarSwitched";
     36                [Bindable]
     37                private var _vScrollBarVisibility:Boolean;
    3138               
    3239                [Bindable]
     
    5360                        this.setStyle("layout", "absolute");
    5461                        this.verticalScrollPolicy = "on";
    55                        
     62                        this.addEventListener(SCROLL_BAR_SWITCHED_EVENT, vScrollBarSwitchedHandler);
    5663                        // this is for responding to the deletion of comments. At this point there is no way to distinghuish between item and component deletion
    5764                        // and that probably is fine since they mostly require the same response. It does mean that this component will also reload when a
     
    6067                }
    6168               
    62        
     69            private function vScrollBarSwitchedHandler(e:Event):void{
     70                        this.verticalScrollBar.visible = _vScrollBarVisibility;
     71                }
     72               
     73                // where to put this dispatcher, where the panel is redrawn/made a displayObject? where is it?
     74                public function vScrollBarDispatcher():void {
     75                        if (_vScrollBarVisibility != this.verticalScrollBar.accessibilityEnabled) {
     76                                _vScrollBarVisibility = this.verticalScrollBar.accessibilityEnabled;
     77                                dispatchEvent(new Event(SCROLL_BAR_SWITCHED_EVENT));
     78                        }
     79                }
    6380               
    6481                private function makeRssLinkButton():RssLinkButton{
Note: See TracChangeset for help on using the changeset viewer.