태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

ria/flex2008/09/04 10:24

added 어플리케이션 border
add root1 어플리케이션
preinitialize root1 어플리케이션

컴포넌트 // 생성자 호출

comp_added 어플리케이션 컴포넌트
added 어플리케이션 컴포넌트
childAdd root1 어플리케이션
comp_add 어플리케이션 컴포넌트
comp_preinitialize 어플리케이션 컴포넌트

컴포넌트_createChildren // 자식 생성

comp_initialize 어플리케이션 컴포넌트
initialize root1 어플리케이션

컴포넌트_commitProperties // 속성에 따른 컴포넌트 핸들링

컴포넌트_measure // 컴포넌트 디폴트 사이즈 계산

added 어플리케이션 backgroundMask
added 어플리케이션 ApplicationBackground13

컴포넌트_updateDisplayList // 디스플레이 핸들링 ( 위치, 크기, 정렬 등등 )

컴포넌트_layoutChrome // 컴포넌트 외곽 처리

comp_creationComplete 어플리케이션 컴포넌트
creationComplete root1 어플리케이션
added root1 어플리케이션
applicationComplete


* 컴포넌트 소스코드


package

{

    public class MyComponent extends UIComponent

    {

        public function MyComponent ()
        {
            trace ("MyComponent ");
            super ();
        }

        override protected function createChildren():void
        {
            trace ("createChildren");
            super.createChildren();
        }
        
        override protected function commitProperties():void
        {
            trace ("commitProperties");
            super.commitProperties();
        }
        
        override protected function measure():void
        {
            trace ("measure");
            super.measure();
        }
        
        override protected function updateDisplayList(unscaledWidth:Number, 
                                    unscaledHeight:Number):void
        {
            trace ("updateDisplayList");
            super.updateDisplayList (unscaledWidth, unscaledHeight);
        }
        
        override protected function layoutChrome(unscaledWidth:Number,
         unscaledHeight:Number):void
        {
          trace ("layoutChrome");
          super.layoutChrome (unscaledWidth, unscaledHeight);
        }

    }

}


Style에 따른 플렉스 내부 함수 호출 프로세스

참고로 스타일은 모두 updateDisplayList 내부에서 호출하도록 한 것. 
그래서 음영처리된 부분까지는 동일하게 호출 되는 것.


* borderStyle


생성자

createChildren
commitProperties
measure
updateDisplayList
layoutChrome
updateDisplayList
layoutChrome
measure
updateDisplayList
layoutChrome
updateDisplayList
layoutChrome
measure


 

* horizontalAlign


생성자
createChildren
commitProperties
measure
updateDisplayList
layoutChrome
measure


 

* fontSize


생성자

createChildren
commitProperties
measure
updateDisplayList
layoutChrome

commitProperties
measure
updateDisplayList
layoutChrome


 

* verticalAlign


생성자
createChildren
commitProperties
measure
updateDisplayList
layoutChrome

measure


 

* horizontalGap


생성자
createChildren
commitProperties
measure
updateDisplayList
layoutChrome

measure



* color


생성자
createChildren
commitProperties
measure
updateDisplayList
layoutChrome

commitProperties


 

* fontWeight


생성자
createChildren
commitProperties
measure
updateDisplayList
layoutChrome

commitProperties
measure
updateDisplayList
layoutChrome


 

* paddingLeft/paddingTop/paddingRight/paddingBottom


생성자
createChildren
commitProperties
measure
updateDisplayList
layoutChrome
measure
updateDisplayList
layoutChrome


 

추가...


* 자식 컴포넌트의 속성에 값을 반영한 경우 예)LabelTitle.text = _title;


생성자
createChildren
commitProperties
measure
updateDisplayList
layoutChrome
measure
updateDisplayList
layoutChrome



* 자식 컴포넌트의 width 값을 변경한 경우


생성자
createChildren
commitProperties
measure
updateDisplayList
layoutChrome

measure
updateDisplayList
layoutChrome


브라이언님이 정리해 놓은 글 포스팅.

http://gogothing.tistory.com/tag/custom%20component

Posted by THLIFE.net

TRACKBACK http://thlife.net/trackback/732 관련글 쓰기

댓글을 달아 주세요