• Description
- AshGoogleSearch 패키지의 Image 서치를 위한 전용 클래스 이다.
- 기본 구성요소가 포함된 어플리케이션 형태로 제공되며 UI 디자인과 모션처리가 적용되어 있다.
• 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)
getHTML (Defined by AshAgent)
getOuterHTML (Defined by AshAgent)
setHTML (Defined by AshAgent)
insertHTML (Defined by AshAgent)
insertBeforeHTML (Defined by AshAgent)
setInnerText (Defined by AshAgent)
getInnerText (Defined by AshAgent)
addChild (Defined by AshAgent)
removeChild (Defined by AshAgent)
insertBefore (Defined by AshAgent)
getChildAt (Defined by AshAgent)
getFirstChild (Defined by AshAgent)
getLastChild (Defined by AshAgent)
getChildByName (Defined by AshAgent)
contains (Defined by AshAgent)
getStyle (Defined by AshAgent)
setStyle (Defined by AshAgent)
resetWidth (Defined by AshAgent)
resetHeight (Defined by AshAgent)
getWidth (Defined by AshAgent)
settWidth (Defined by AshAgent)
getHeight (Defined by AshAgent)
setHeight (Defined by AshAgent)
move (Defined by AshAgent)
resize (Defined by AshAgent)
rebound (Defined by AshAgent)
getBounds (Defined by AshAgent)
globalCoordinates (Defined by AshAgent)
hitTest (Defined by AshAgent)
setOpacity (Defined by AshAgent)
• Costants
-
• Static Properties
-
• Static Methods
-
• On Event Handler
onShow:Function // fire when application is shown.
onHide:Function // fire when application is hidden.
onSearch:Function // invoke when search is completed.
onImageLoaded:Function // invoke when the thumbnail image is loaded.
• Public Properties
(read-only)
gsi:ImageSearch = null // The google.search.ImageSearch instance.
google.search.ImageSearch의 인스턴스가 생성된 객체.
body // the body element.
메인 엘리먼트 객체.
prev // the prev element.
이전페이지를 처리하는 요소를 참조한다.
next // the next element.
다음페이지를 처리하는 요소를 참조한다.
pageInfo // the pageInfo element.
페이지 정보값을 출력하는 요소를 참조한다.
searchForm // the search form element. ( be used as clone type).
검색폼의 오리지널 요소 객체. (AshPopup으로 런타임에 생성되기 때문에 오리지널 객체로 참조.)
imgContainer // the image container element. ( be used as clone type).
검색결과 이미를 담고 있는 오리지널 객체.(clone으로 생성되기때문에 오리지널 객체로 참조.)
selectedImgSrc:String // the src string of current selected img.
현재 선택된 이미지의 src 경로값.
totalPage:int // the total page value of result to search.
검색된 이미지의 전체 페이지 수.
pageIndex:int // the total page index of result to search.
현재 결과페이지의 인덱스 넘버.
• Public Methods
show(src) // show the AshGoogleSearch.
어플리케이션을 보인다.
hide() // hide the AshGoogleSearch.
어플리케이션을 숨긴다.
search(keyword) // execute to search as the specified keyword.
주어진 키워드 값으로 이미지 서칭을 실행한다.
nextPage() // request the next page to search for result.
검색결과 페이지에서 다음페이지를 불러온다.
prevPage() // request the previous page to search for result.
검색결과 페이지에서 이전페이지를 불러온다.
• Constructor
AshGoogleSearch.Image( [config] );
config:Function = null // 인스턴스 생성과 동시에 초기에 추가구성을 위해서 실행되는 추가 구성함수이다.
• Example
<script type="text/javascript" src='../../AshAPI.js'></script>
<script type="text/javascript" src='../../AshGoogleSearch.js'></script>
<script type="text/javascript">
var sgs, siv;
var wEvent = new AshEventDispatcher(window);
AshGoogleSearch.addEventListener(AshGoogleSearch.START, function(e) {
sgsi = new AshGoogleSearch.Image();
siv = new AshImageViewer('../ajax-loader.gif');
sgsi.addEventListener(AshGoogleSearch.SELECTED, function(e) {
siv.show(e.parameters.selectedImgSrc);
});
sgsi.search('obama');
});
// 페이지의 모든 요소들이 먼저로드 된 후 GoogleSearch를 구동한다.
wEvent.addEventListener('load', function(e) {
AshGoogleSearch.start('GS.html');
});
</script>
</head>
window._createSGSI = function(kwd) {
if(!window.__sgsi ) {
window.__sgsi = new AshGoogleSearch.Image();
window.__sgsi.addEventListener(AshGoogleSearch.SELECTED, function(e) {
siv.show(e.parameters.selectedImgSrc);
});
};
window.__sgsi.search(kwd);
};
search('오바마');