HOME | EXPERIENCE | GUESTBOOK | ADMIN | ABOUT
 
AshEditorPanel(extends AshMotionAgent)
• CREATION DATE |   2009.01.05
• LAST MODIFY |   2009.01.05
• VERSION |   0.7
• Description

- 본클래스는 AshAPI 라이브러리를 필요로한다.
- 인스턴스 생성시 어플리케이션으로 동작한다.
- Body embeded로  AshHtmlEditor 클래스를 내장하고 있다.

그외 추가적인 규칙에 준한 embeded될 컨테이너와 각 자식 element들에 대한 구성요소들이 필요하다.
 container의 div 내 자식요소에는 dragbar(div) / toolbar(div) / body(div) 가 name attribute 로 정의되어야 한다.
각 툴바들에 대한 추가지정은 toolbar div안에 inline태그로 지정하면 된다.
resizeable를 위한 gap 값과 toolbar 값을 별도로 지정할 수 있다.
원할한 drag 수행을 위해 container의 position은 absolute / relative 가 지정되어야 한다.
본 클래스는 정해진 템플릿을 기본으로 채택했기때문에 다른 스타일 형식의 커스텀 에디터 제작을 위해서는
AshHtmlEditor 클래스를 이용하여 직접 제작해야만 한다.

등록된 client가 존재하고 client에 onEditorPanelCallback이라는 메소드가 정의되어 있을경우 리턴값으로
event타입이 발생된다.
이 이벤트를 타입을 이용하여 개별 client별로 각 모드별 액션수행이 가능하다.
this.client.onEditorPanelCallback(eventType). 이것은 editorPanel에 정의하는 addEventListener와는 좀 다르다.
왜냐면 client는 그때그때 한 에디터에따라 의뢰자가 달라질수 있기때문에 addEventListener로 등록한경우
현재 client가 자신이 아닌경우에도 이벤트가 수신되기때문이다.
이러한 애로점을 막기위해 만들어진 리턴콜백개념으로 이해하면 되겠다.

[standard coding]
------------------------------------------------------------------------------------------------------------
<div id='Editor1' style='position:relative; display:none; width:500px; height:500px; border:1px solid #000000;' >
 <div name='dragbar'>
  
 </div>
 <div name='toolbar'>
  <!-- 이곳에 툴바 버튼들을 삽입한다 -->
 </div>
 <div name='body'>
  <textarea>내용입력</textarea>
 </div>
 <div name='submitbar'>
  <!-- 확인 및 취소 버튼들을 삽입한다 -->
 </div>
</div>
------------------------------------------------------------------------------------------------------------
<script>
var editPanel = new AshEditorPanel(AshUtil.obj('Editor1'), 'sample.html' ); // sample.html 페이지가 정의되지 않으면
textarea에 정의된 내용이 기본 에디터로 표시된다.
editPanel.showHide(true); // container 의 style:display 가 'none' 일경우에만 적용(보통 초기에 에디터는 보이지 않고
버튼을 눌러서 에디터를 실행하고자 할때 버튼에 이 스크립터가 정의되어 있으면된다.)
</script>

- 본 클래스는 AshMotionAgent를 확장했기때문에 container를 위한  x,y,width,height,alpha 등의 기본 모셔닝 처리를
 runtime에 바로 수행할 수 있다. resize / drag 기능이 기본 내장 구현되어 있다.

• ClassType
public extends
• Inherited Public Properties
instancedCount (Defined by Ash)
owner (Defined by AshEventDispatcher)
openData (Defined by AshEventDispatcher)
• Inherited Public Methods
getClass (Defined by Ash)
toString (Defined by Ash)
addEventListener (Defined by AshEventDispatcher)
removeEventListener (Defined by AshEventDispatcher)
dispatchEvent (Defined by AshEventDispatcher)
hasEventListener (Defined by AshEventDispatcher)
getEventListeners (Defined by AshEventDispatcher)
x, left (Defined by AshMotionAgent)
y, top (Defined by AshMotionAgent)
width (Defined by AshMotionAgent)
height (Defined by AshMotionAgent)
alpha (Defined by AshMotionAgent)
tween, play (Defined by AshMotionAgent)
getMotioner(Defined by AshMotionAgent)
• Costants
AshEditorPanel.MINIMUM = 'minimum'; // when the editor panel's size was to the minimum.
에디터패널의 사이즈가 최소모드로 동작될때 이벤트가 발생한다.

AshEditorPanel.NORMAL = 'normal';  // when the editor panel's size became to the normal.
패널의 사이즈가 노멀모드로 변경될때 이벤트가 발생한다.

AshEditorPanel.MAXIMUM = 'maximum'; // when the editor panel's size became to the maximum.
패널의 크기가 최대사이즈로 변경될때 이벤트가 발생한다.

AshEditorPanel.OK = 'ok';    // invoke that ok order has been called.
패널에서 OK오더가 내려질때 이벤트가 발생한다.

AshEditorPanel.CANCEL = 'cancel';  // invoke that cancel order has been called.
에디터패널에서 Cancel 오더가 수행될때 이벤트가 발생.

AshEditorPanel.SHOW = 'show';   // when the editor panel show.
패널이 보여질때 이벤트가 실행.

AshEditorPanel.HIDE = 'hide';   // when the editor panel hide.
패널이 숨겨질때 이벤트가 발생.
• Static Properties
• Static Methods
-
• On Event Handler
onMinimum:Function // when the editor panel's size was to the minimum.
onNormal:Function // when the editor panel's size was to the normal.
onMaximum:Function // when the editor panel's size was to the maximum.
onOk:Function // invoke that ok order has been called.
onCancel:Function // invoke that cancel order has been called.
onShow:Function // when the editor panel show.
onHide:Function // when the editor panel hide.
• Public Properties
(realonly)
container:null
현재 에디터패널의 컨테이너 요소를 참조.

editor:AshHtmlEditor = null;
현재 에디터패널에서 editor객체를 참조.

body:null
에디터패널에서 바디요소를 참조.

dragbar:null
에디터패널에서 드래그바의 엘리먼트를 참조한다.

toolbar:null
패널에서 툴바 요소를 참조한다.

submitbar:null
패널에서 submitbar 요소를 참조한다.

resizer:AshResize
리사이즈 객체를 참조한다.

resizeGap:int = 10;
리사이즈와의 간격을 구해온다.

dragbarHeight:int = 30
드래그영역의 높이값을 구해온다.

submitbarHeight:int = 25
서브밋바의 높이값을 구해온다.

toolbarSize:int = 80
툴바의 상대적인 크기값을 구해온다.

minWidth:int = 20
에디터패널의 최소 폭을 구해온다.

minHeight:int = 20
에디터 패널의 최소 높이값을 구해온다.

defaultWidth:int = 0
에디터 패널의 디폴트 폭을 구해온다.

defaultHeight:int = 0
에디터패널의 디폴트 높이값을 구해온다.

currentWidth:int = 0
에디터패널의 현재 값을 구해온다.

currentHeight:int = 0
에디터패널의 현재 값을 구해온다.

isMaximum:Boolean = false
현재 에디터가 최대상태인지 확인한다.

client:null
에디터를 의뢰한 클라이언트를 참조한다.

toolbarDirection:String = 'n'
에디터의 툴바 방향을 읽어온다.
• Public Methods

setClient // set the request client. // Set the client. | client is requested element  to edit to AshEditor object.
에디터패널을 수행할 클라이언트를 등록한다.


show(client, defaultWidth, defaultHeight) // show the editor's panel.
* parameters |
client:Element // the html value to be display to the editor.  [optional]
defaultWidth:String // change the default width to be display.
defaultHeight:String // change the default height to be display.
에디터를 실행한다. defaultWidth, height값을 통해 실행과 동시에 에디터의 디폴트 사이즈를 변경할수 있다.


hide() // hide the editor's panel.
에디터를 종료한다.


redraw() // update the lastest situration.
에디터의 최신상황을 업데이트 한다.


ok() // apply the edited content to the client.
이명령이 실행되면 의뢰한 클라이언트에 변경된 에디트상태를 즉각 반영한다.


cancel() // cancel the request.
요청 및 수행을 취소한다.


setResizeGap(value, skipDraw) // set the resizer object's gap value.
패널의 리사이즈영역의 간격을 직접 설정한다.
skipDraw는 간격을 설정하면서 redraw 수행을 스킵한다.


setDragbarHeight(value, skipDraw) // set the dragbar's height value.
패널의 드래그바 높이값을 설정한다.


setSubmitbarHeight(value, skipDraw) // set the submitbar's height value.
패널의 submitbar 높이값을 설정한다.


setToolbarSize(value, skipDraw) // set the toolbar's size.
패널의 툴바 사이즈를 지정한다.


setToolbarDirection(direction, skipDraw) // change the toolbar's direction.
패널에서 툴바 방향을 설정한다 skipDraw값이 true 이면 redraw상태를 스킵한다.


setMinSize(width, height) // set the minsize value of the editor panel.
패널의 최소사이즈를 등록한다.


setMinimum(duration, engin) // set minimum.
에디트를 최소모드로 실행한다. duration, engin을 통해 모션처리시간, 모션엔진을 지정할 수 있다.


setNormal(duration, engin) // set the normal.
에디트를 노멀모드로 실행한다. duration, engin을 통해 모션처리시간, 모션엔진을 지정할 수 있다.


setMaximum(duration, engin) // set the maximum.
에디트를 최대모드로 실행한다. duration, engin을 통해 모션처리시간, 모션엔진을 지정할 수 있다.


setToggle() // set the toggle.
에디터의 최대 노멀모드를 토글한다.

• Constructor
AshEditorPanel(div, [iframe-src]);
*parameter
 - div // 패널로 사용할 div 엘리먼트.
- iframe-src // 초기 에디터의 iframe의 페이지에 사용될 html페이지 주소, 옵션값이기 때문에 스타일시트와
연관될때 사용될 수 있다.
• Example
EDIT | DELETE
All Articles
  • AshScrollPane LivePrevi...
  • AshScrollPane
  • 유니코드 문자열 아랍어(Arab) 검사
  • 네...ㅎㅎ 머니클립으로 바꾸고 나서 외...
  • 나와 같은 고민을 하는 사람이 또 있다고 ...
  • 안녕하세요. 물론 MB를 지지하는 편에...
  • AdobeApple의 공격에 대응할 전...
  • 스티브 잡스가 멍석 깔아준 다양한 이야기
  • 말의 힘과 사이비 과학, 그리고 사이비 종...

  • 2008     1
    LINK • SUMMARY