|
void
|
add
노드를 추가합니다.
Parameters:
| Name |
Type |
Description |
id |
|
아이디 |
parentId |
|
부모노드 아이디 |
text |
|
노드의 텍스트 |
value |
|
노드의 값 |
icon |
|
노드의 아이콘 |
expandIcon |
|
노드의 폴더 (열려진 상태) 아이콘 |
collapseIcon |
|
노드의 폴더 (닫혀진 상태) 아이콘 |
Example
WUX.getComponent('comp').add(id, parentId, text, value, title, icon, expandIcon, collapseIcon);
|
|
|
void
|
collapse
하위 노드가 있는 노드를 닫히게 합니다.
Parameters:
| Name |
Type |
Description |
nodeId |
String
|
|
Example
WUX.getComponent('comp').collapse('nodeId2');
|
|
|
void
|
collapseAll
하위 노드가 있는 모든 노드를 닫히게 합니다.
Example
WUX.getComponent('comp').collapseAll();
|
|
|
void
|
expand
하위 노드가 있는 노드를 열리게 합니다.
Parameters:
| Name |
Type |
Description |
nodeId |
String
|
|
Example
WUX.getComponent('comp').expand('nodeId2');
|
|
|
void
|
expandAll
하위 노드가 있는 모든 노드를 열리게 합니다.
Example
WUX.getComponent('comp').expandAll();
|
|
|
TreeNode
|
getNode
아이디로 트리 노드를 찾아서 반환합니다.
Parameters:
| Name |
Type |
Description |
노드 |
String
|
아이디 |
Returns:
-
Type
-
TreeNode
Example
WUX.getComponent('comp').getNode(id);
|
|
|
void
|
getNodeCount
트리가 전체 몇개의 노드가 있는지를 반환합ㄴ디ㅏ.
Example
WUX.getComponent('comp').getNodeCount();
|
|
|
String
|
getNodeText
노드의 텍스트 값을 반환합니다.
Parameters:
| Name |
Type |
Description |
nodeId |
String
|
|
Returns:
-
Type
-
String
Example
WUX.getComponent('comp').getNodeText('nodeId2');
|
|
|
String
|
getNodeValue
노드의 아이콘 값을 반환합니다.
Parameters:
| Name |
Type |
Description |
nodeId |
String
|
|
Returns:
value
-
Type
-
String
Example
WUX.getComponent('comp').getNodeValue('nodeId2');
|
|
|
TreeNode
|
getSelectedNode
선택된 노드를 반환한다.
Returns:
selectedNode
-
Type
-
TreeNode
|
|
|
Boolean
|
hasNode
트리노드의 존재 유무를 반환합니다.
Parameters:
| Name |
Type |
Description |
노드 |
String
|
아이디 |
Returns:
노드 존여 여부
-
Type
-
Boolean
Example
WUX.getComponent('comp').hasNode(id);
|
|
|
void
|
insert
노드를 특정 노드 다음에 추가합니다., 첫번째 노드가 String일 경우 아이디로, Number 일경우 인덱스로 인식합니다.
Parameters:
| Name |
Type |
Description |
이전노드 |
String | | Number
|
아이디 | 인덱스 |
노드 |
String
|
아이디 |
부모노드 |
String
|
아이디 |
노드의 |
String
|
텍스트 |
노드의 |
String
|
값 |
노드의 |
String
|
아이콘 |
노드의 |
String
|
폴더 (열려진 상태) 아이콘 |
노드의 |
String
|
폴더 (닫혀진 상태) 아이콘 |
Example
WUX.getComponent('comp').insert(prevId,id, parentId, text, value, icon, expandIcon, collapseIcon);
|
|
|
Boolean
|
isExpand
현재 노드가 열려 있는지를 반환합니다.
Parameters:
| Name |
Type |
Description |
노드 |
String
|
아이디 |
Returns:
-
Type
-
Boolean
Example
WUX.getComponent('comp').isExpand(id);
|
|
|
void
|
remove
노드를 삭제합니다..
Parameters:
| Name |
Type |
Description |
노드 |
String
|
아이디 |
Example
WUX.getComponent('comp').remove(id);
|
|
|
void
|
selectNode
노드를 선택되게 합니다.
Parameters:
| Name |
Type |
Description |
노드 |
String
|
아이디 |
Example
WUX.getComponent('comp').selectNode(id);
|
|
|
void
|
setNodeText
노드의 텍스트 값을 변경합니다.
Parameters:
| Name |
Type |
Description |
nodeId |
String
|
|
Example
WUX.getComponent('comp').setNodeText('nodeId2','텍스트 변경');
|
|
|
void
|
setNodeValue
노드의 value 값을 변경합니다.
Parameters:
| Name |
Type |
Description |
nodeId |
String
|
|
Example
WUX.getComponent('comp').setNodeValue('nodeId2','노드 값');
|
|
|
void
|
toggleNode
폴더 노드를 토글(열림/닫힘) 합니다.
Parameters:
| Name |
Type |
Description |
노드 |
String
|
아이디 |
Example
WUX.getComponent('comp').toggleNode(id);
|
|
|
void
|
addEvent
Parameters:
| Name |
Type |
Description |
type |
String
|
이벤트 타입 |
fn |
Function
|
콜백함수 |
context |
Object
|
컨텍스트 |
|
inherited from Observer
|
|
void
|
removeEvent
Parameters:
| Name |
Type |
Description |
type |
String
|
타입 |
args |
String
|
파라미터 |
context |
String
|
컨텍스트 |
|
inherited from Observer
|
|
boolean
|
triggerEvent
옵저버에 등록된 이벤트를 발생시킵니다.
등록된 다른 모든 리스너에 이벤트가 전달됩니다.
Parameters:
| Name |
Type |
Description |
type |
String
|
타입 |
args |
String
|
파라미터 |
Returns:
-
Type
-
boolean
|
inherited from Observer
|
|
String
|
getCx
컴포넌트 객체가 어떤 컴포넌트인지 판별할 수 있는 문자열을 반환합니다.
Returns:
컴포넌트 식별 문자
-
Type
-
String
Example
//Button Component var compCx =
WUX.getComponent('comp').getCx(); // Button
|
inherited from AbstractComponent
|
|
String
|
getId
컴포넌트의 id(식별자)를 반환합니다.
Returns:
컴포넌트 Id
-
Type
-
String
Example
var idComp = WUX.getComponent('comp').getId();
|
inherited from AbstractComponent
|
|
Component
|
getParent
부모 컴포넌트를 반환합니다.
Returns:
부모 컴포넌트
-
Type
-
Component
Example
var parentComp = WUX.getComponent('comp').getParent();
|
inherited from AbstractComponent
|
|
String or Object
|
getUserData
컴포넌트에 저장되어 있는 사용자 정의 데이터를 반환합니다.
map 객체로 저장되 어있을경우 key를 넘기면 해당 key의 value만 반환합니다.
Parameters:
| Name |
Type |
Description |
key |
String
|
맵으로 입력되었을 경우의 key 값 |
Returns:
userData 사용자 정의 데이터
-
Type
-
String or Object
Example
WUX.getComponent('comp').getUserData('key'); // return 맵의 키에
해당하는 값 WUX.getComponent('comp').getUserData(); // return Object
|
inherited from AbstractComponent
|
|
Component
|
getWindow
대상 컴포넌트가 포함된 Window 컴포넌트를 반환합니다.
Returns:
컴포넌트
-
Type
-
Component
Example
var windowComp = WUX.getComponent('comp').getWindow();
|
inherited from AbstractComponent
|
|
String or Object
|
setUserData
컴포넌트에 사용자 정의데이터를 세팅합니다.
서버로 전송되지 않습니다.
Returns:
userData 사용자 정의 데이터
-
Type
-
String or Object
Example
WUX.getComponent('comp').setUserData('aa');
WUX.getComponent('comp').setUserData('key', 'value');
WUX.getComponent('comp').setUserData({key:'value',key2:'value'});
|
inherited from AbstractComponent
|
|
void
|
addClass
컴포넌트에 선언 되어있는 CSS Class를 추가합니다.
Parameters:
| Name |
Type |
Description |
CSSClass |
String
|
|
Example
WUX.getComponent('comp').addClass('user-css');
|
inherited from AbstractUIComponent
|
|
String
|
getCaption
현재의 캡션 텍스트를 반환합니다.
Returns:
캡션 텍스트
-
Type
-
String
Example
WUX.getComponent('comp').getCaption();
|
inherited from AbstractUIComponent
|
|
String
|
getHeight
컴포넌트의 높이를 반환합니다.
Returns:
컴포넌트 높이
-
Type
-
String
Example
var height = WUX.getComponent('comp').getHeight();
|
inherited from AbstractUIComponent
|
|
String
|
getWidth
컴포넌트의 넓이를 반환합니다.
Returns:
컴포넌트 넓이
-
Type
-
String
Example
var width = WUX.getComponent('comp').getWidth();
|
inherited from AbstractUIComponent
|
|
void
|
hasClass
컴포넌트에서 동일한 CSS Class를 갖고 있는지를 확인합니다..
Parameters:
| Name |
Type |
Description |
CSSClass |
String
|
|
Example
if(WUX.getComponent('comp').hasClass('user-css')){ //hasClass }
|
inherited from AbstractUIComponent
|
|
Boolean
|
isDisabled
컴포넌트의 비활성화 여부를 반환합니다.
Returns:
비활성화 여부
-
Type
-
Boolean
Example
WUX.getComponent('comp').isDisabled();
|
inherited from AbstractUIComponent
|
|
Boolean
|
isDisableOnClick
비활성화일때 클릭 가능한지 여부를 반환합니다.
Returns:
비활성화 클릭 가능여부
-
Type
-
Boolean
Example
WUX.getComponent('comp').isDisableOnClick();
|
inherited from AbstractUIComponent
|
|
Boolean
|
isVisible
컴포넌트의 화면 표시 여부를 반환합니다.
Returns:
화면표시 여부
-
Type
-
Boolean
Example
WUX.getComponent('comp').isVisible();
|
inherited from AbstractUIComponent
|
|
void
|
removeClass
컴포넌트에서 동일한 CSS Class를 삭제합니다.
Parameters:
| Name |
Type |
Description |
CSSClass |
String
|
|
Example
WUX.getComponent('comp').removeClass('user-css');
|
inherited from AbstractUIComponent
|
|
void
|
setCaption
캡션 텍스트를 변경합니다.
Example
WUX.getComponent('comp').setCaption('캡션');
|
inherited from AbstractUIComponent
|
|
void
|
setDisabled
컴포넌트의 활성화/비활성화를 변경합니다.
Parameters:
| Name |
Type |
Description |
비활성화 |
Boolean
|
여부 |
Example
WUX.getComponent('comp').setDisabled(true);
|
inherited from AbstractUIComponent
|
|
void
|
setDisableOnClick
비활성화일때 클릭 가능한지 여부를 변경합니다.
Parameters:
| Name |
Type |
Description |
disableOnClick |
Boolean
|
비활성화 여부 |
Examples
WUX.getComponent('comp').setDisableOnClick(false) // 이벤트 발생안함
WUX.getComponent('comp').setDisableOnClick(true) // 이벤트 발함
WUX.getComponent('comp').setDisableOnClick(false) // 이벤트 발생안함
WUX.getComponent('comp').setDisableOnClick(true) // 이벤트 발함
|
inherited from AbstractUIComponent
|
|
void
|
setHeight
컴포넌트의 높이를 변경합니다.
Parameters:
| Name |
Type |
Description |
컴포넌트 |
String
or Number
|
높이 |
Example
WUX.getComponent('comp').setHeight(200);
|
inherited from AbstractUIComponent
|
|
void
|
setLabelAlign
레이블의 Align을 설정합니다. (left, right, center)_(top,bottom, center) 식으로 표현이
가능하며 앞 부분은 좌,우 정렬, 뒷 부분은 위, 아래의 정렬을 하고 단일 center의 입력도 가능하다.
Example
WUX.getComponent('comp').setLabelAlign('center_center');
|
inherited from AbstractUIComponent
|
|
void
|
setSizeFull
컴포넌트를 넓이, 높이 모두 Fit 합니다.
Example
WUX.getComponent('comp').setSizeFull();
|
inherited from AbstractUIComponent
|
|
void
|
setVisible
컴포넌트의 화면 표시 여부를 변경합니다.
Parameters:
| Name |
Type |
Description |
화면표시여부 |
Boolean
|
|
Example
WUX.getComponent('comp').setVisible(true);
|
inherited from AbstractUIComponent
|
|
void
|
setWidth
컴포넌트의 넓이를 변경합니다.
Parameters:
| Name |
Type |
Description |
컴포넌트 |
String
or Number
|
넓이 |
Example
WUX.getComponent('comp').setWidth(200);
|
inherited from AbstractUIComponent
|
|
Array
|
validate
컴포넌트가 갖고 있는 rule이 있다면 바인딩되어 있는 ValueObject를 통해 이를 체크하여 invalid를 반환한다.
또한 WUX.data.ValueObject.onEndValidate와 ValueObject 인스턴스의 onInvalid 이벤트를 실행시켜준다.
단, 바인딩 되어 있지 않은 컴포넌트는 체크를 수행하지 않는다.
Returns:
of WUX.Invalid
-
Type
-
Array
|
inherited from AbstractUIComponent
|
|
void
|
componentIterator
자신의 하위 컴포넌트 또는 자신의 모든 하위 컴포넌트를 Iterate 할 수 있습니다.
- callback에서 Component 객체를 파라미터로 전달합니다.
- 첫번째 파라미터는 callback 함수
- 두번째 파라미터에서 true를 사용할 경우 모든 하위 컴포넌트를 탐색합니다.
Parameters:
| Name |
Type |
Description |
필터 |
Function
|
|
하위의 |
Boolean
|
모든 컴포넌트 열거 여부 |
Example
// 자신의 하위만 탐색
WUX.getComponent('comp').componentIterator(function(comp){
var id = comp.getId();
});
// 하위의 모든 컴포넌트 탐색
WUX.getComponent('comp').componentIterator(function(comp){
var id = comp.getId();
}, true);
|
inherited from AbstractComponentContainer
|
|
Number
|
getContentHeight
컴포넌트 컨텐츠 영역의 높이를 반환합니다.
Returns:
컨텐츠의 높이
-
Type
-
Number
Example
WUX.getComponent('comp').getContentHeight();
|
inherited from AbstractComponentContainer
|
|
Number
|
getContentWidth
컴포넌트 컨텐츠 영역의 넓이를 반환합니다.
Returns:
컨텐츠의 넓이
-
Type
-
Number
Example
WUX.getComponent('comp').getContentWidth();
|
inherited from AbstractComponentContainer
|
|
void
|
collapse
패널을 접히게 합니다.
Example
WUX.getComponent('comp').collapse();
|
inherited from Panel
|
|
void
|
expand
패널을 펼치게합니다.
Example
WUX.getComponent('comp').expand();
|
inherited from Panel
|
|
Boolean
|
isCollapse
패널이 접혀있는지를 반환합니다.
Returns:
접힘여부
-
Type
-
Boolean
Example
WUX.getComponent('comp').isCollapse();
|
inherited from Panel
|
|
Boolean
|
isCollapsible
패널의 접힘기능이 사용중인지 여부를 반환합니다.
Returns:
접힘기능의 사용유무
-
Type
-
Boolean
|
inherited from Panel
|