AdfUIComponents.createComponentClass("AdfDhtmlGeoMapToolbar",{componentType:"oracle.dss.adf.geoMap.GeoMapToolbar",propertyKeys:[{name:"id",type:"String"},{name:"mapId",type:"String"},{name:"clickButton",type:"String"}],namingContainer:A_b,superclass:AdfUIComponent});var A_q=AdfRichUIPeer.createPeerClass(AdfRichUIPeer,"AdfDhtmlGeoMapToolbarPeer",A_b);A_h("AdfDhtmlGeoMapToolbarPeer",A_q);AdfPage.PAGE.getLookAndFeel().registerPeerConstructor("oracle.dss.adf.geoMap.GeoMapToolbar","AdfDhtmlGeoMapToolbarPeer");
A_q.InitSubclass=function(){AdfObject.ensureClassInitialization(A_q);AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.CLICK_EVENT_TYPE)};A_q.PG=function(a,b){var c=document.getElementById(AdfRichUIPeer.CreateSubId(a,"content"));if(!(c==A_||b==A_)){c.Iq=[];for(var d=A_b,e=0,f=c.selectedIndex,g=0;g<b.length;g++)c.Iq[g]=c.options[e].text,f==g&&(c.options.selected=A_b),b[g]?(e++,d=A_c):c.remove(e);if(d)for(;0<c.options.length;)c.remove(0)}};A_h("AdfDhtmlGeoMapToolbarPeer._initOptions",A_q.PG);
A_q.FI=function(a){var b=a.getSource();a=a.getSource().getProperty("mapId");b=b.getProperty("overviewMapMenuId");b=AdfPage.PAGE.findComponent(b);a=AdfPage.PAGE.findComponent(a);b!=A_&&a!=A_&&b.setSelected(!a.Wf.isCollapsed())};A_h("AdfDhtmlGeoMapToolbarPeer._updateMenu",A_q.FI);A_q.wI=function(a){var b=a.getSource();a=a.getSource().getProperty("mapId");a=AdfPage.PAGE.findComponent(a);b.getSelected()?a.Wf.xL.parentNode.click():a.Wf.collapse()};A_h("AdfDhtmlGeoMapToolbarPeer._toggleOverviewMap",A_q.wI);
A_q.GI=function(a){var b=a.getSource().getProperty("mapId"),b=AdfPage.PAGE.findComponent(b);a.getSource().getSelected()?A_Fa(b):b.Ac!=A_&&b.Ac.setVisible(A_c)};A_h("AdfDhtmlGeoMapToolbarPeer._updateNavigationBar",A_q.GI);
A_q.CI=function(a){var b=a.getSource();if(!(b.getProperty("themeIds")==A_||b.getProperty("comboBoxId")==A_)){var c=b.getProperty("themeIds").split(" "),d=b.getProperty("comboBoxId"),e=AdfPage.PAGE.findComponent(d),d=e.getProperty("selThemeId"),f=A_;if(a.getNewValue()){if(f=e.getValue(),f==A_||0==f.length){b.setValue(A_c);return}}else f=[];a=f;1==f.length&&(a=[],a.push(f));A_q.Hx(c,d,a)}};A_h("AdfDhtmlGeoMapToolbarPeer._updateCheckBox",A_q.CI);
A_q.HI=function(a){var b=a.getSource();if(!(b.getProperty("themeIds")==A_||b.getProperty("selThemeId")==A_)){var c=b.getProperty("themeIds").split(" "),d=b.getProperty("selThemeId"),b=b.getProperty("checkBoxId"),b=AdfPage.PAGE.findComponent(b);a.getNewValue()==A_||0==a.getNewValue().length?b.setValue(A_c):b.setValue(A_b);b=a.getNewValue();1==a.getNewValue().length&&(b=[],b.push(a.getNewValue()));A_q.Hx(c,d,b)}};A_h("AdfDhtmlGeoMapToolbarPeer._updateSelectedOneChoice",A_q.HI);
A_q.Hx=function(a,b,c){var d=document.getElementById(AdfRichUIPeer.CreateSubId(b,"content"));if(d!=A_){b=AdfPage.PAGE.findComponent(b).getProperty("themeIds").split(" ");var e=[];for(i=0;i<a.length;i++)e[a[i]]="UnSelect";for(i=0;i<c.length;i++)e[a[parseInt(c[i])]]="Select";a=d.options.length-1;for(i=b.length-1;0<=i;i--){c=c=A_;0<=a&&(c=d.options[a],c=parseInt(c.value));if("UnSelect"==e[b[i]]&&0<=a)c==i&&d.remove(a);else if("Select"==e[b[i]]&&(0>a||c!=i)){var f=document.createElement("OPTION");f.text=
d.Iq[i];f.label=d.Iq[i];f.value=i.toString();AdfAgent.getAgent().getPlatform()==AdfAgent.IE_PLATFORM?0>a?d.options.add(f,0):d.options.add(f,a+1):d.add(f,d.options[a+1])}i==c&&a--}}};A_q.um=function(a){return a==A_?A_:AdfPage.PAGE.findComponent(a)};
A_q.sI=function(a,b,c,d,e){var f=[];f[0]=A_q.um(b);f[1]=A_q.um(c);f[2]=A_q.um(d);f[3]=A_q.um(e);if(a!=A_){AdfPage.PAGE.findComponent(a);a=document.getElementById(AdfRichUIPeer.CreateSubId(a,"content"));b=a.options;a.Rw=[];for(c=0;c<a.options.length;c++)a.Rw.push(b[c]);for(c=a.options.length=0;3>c;c++)f[c]!=A_&&(f[c].getSelectItems(),a.add(a.Rw[c],A_))}};A_h("AdfDhtmlGeoMapToolbarPeer._themeOpened",A_q.sI);A_q.gI=function(a){a=a.getSource().getProperty("dialogID");AdfPage.PAGE.findComponent(a).show()};
A_h("AdfDhtmlGeoMapToolbarPeer._showThemeDialog",A_q.gI);
A_q.ow=function(a,b){var c=AdfPage.PAGE.findComponent(b);if(c!=A_){var d=c.getProperty("checkBoxId"),e=AdfPage.PAGE.findComponent(d);if(e!=A_){var d=A_,f=c.getProperty("themeIds").split(" ");e.getValue()&&(d=c.getValue(),d!=A_&&1==d.length&&(d=[],d.push(c.getValue())));c=[];for(e=0;e<f.length;e++){for(var g=A_c,h=0;d!=A_&&h<d.length;h++)if(e==parseInt(d[h])){g=A_b;break}h=a._getThemeEntry(f[e]);h!=A_&&h.loaded&&("PointTheme"!=h.type?g?c.push(h):(A_Ba(a,h,A_c),h.toolbarVisible=A_c):(A_Aa(a,h,g),h.toolbarVisible=
g))}for(e=0;e<c.length;e++)A_Ba(a,c[e],A_b),c[e].toolbarVisible=A_b;A_Ia(a.getPeer(),a,A_c)}}};A_h("AdfDhtmlGeoMapToolbarPeer._hideThemesOnSelection",A_q.ow);
A_q.rI=function(a){if("ok"==a.getOutcome()&&a.getCurrentTarget()!=A_&&a.getCurrentTarget().getParent()!=A_){for(var b=AdfPage.PAGE.findComponent(a.getCurrentTarget().getProperty("mapId")),c=a.getCurrentTarget().getProperty("comboBoxIds").split(" "),d=0;d<c.length;d++)A_q.ow(b,c[d]);a=a.getCurrentTarget().getProperty("activeThemeComboId");a=AdfPage.PAGE.findComponent(a);c=a.getProperty("themeIds").split(" ");a.getValue()!=A_?b.Jn(c[parseInt(a.getValue())]):b.Jn(A_)}};
A_h("AdfDhtmlGeoMapToolbarPeer._themeDialogOK",A_q.rI);
A_q.Fv=function(){var a=this.getProperty("menuItemId"),b=this.getProperty("buttonId"),c=this.getProperty("dialogId"),b=AdfPage.PAGE.findComponent(b),a=AdfPage.PAGE.findComponent(a),c=AdfPage.PAGE.findComponent(c);b!=A_&&b.setSelected(A_c);a!=A_&&a.setSelected(A_c);b=this.getProperty("mapId");a=AdfRichUIPeer.CreateSubId(b,"hiddenLegend");a=document.getElementById(a);b=document.getElementById(b);a!=A_&&(a.style.display="none",b.appendChild(a));c.removeEventListener("popupClosed",c.Bw);c.Bw=A_};
A_h("AdfDhtmlGeoMapToolbarPeer._closeLegendListener",A_q.Fv);
A_q.fI=function(a){var b=a.getSource().createCallback(A_q.Fv),c=a.getSource().getProperty("dialogId"),d=a.getSource().getProperty("menuItemId"),e=a.getSource().getProperty("buttonId"),e=AdfPage.PAGE.findComponent(e),d=AdfPage.PAGE.findComponent(d),c=AdfPage.PAGE.findComponent(c);c.addEventListener("popupClosed",b);c.Bw=b;c&&(a.getSource().getProperty("selected")&&!c.isPopupVisible()?(e!=A_&&e.setSelected(A_b),d!=A_&&d.setSelected(A_b),c.show()):!a.getSource().getProperty("selected")&&c.isPopupVisible()&&
(e!=A_&&e.setSelected(A_c),d!=A_&&d.setSelected(A_c),c.hide()))};A_h("AdfDhtmlGeoMapToolbarPeer._showLegend",A_q.fI);
A_q.hg=function(a){var b=a.getSource().getProperty("mapId"),c=a.getSource().getProperty("menuItemId"),d=a.getSource().getProperty("buttonId"),e=b+A_i.ea+"latlong",f=b+A_i.ea+"longitude",g=b+A_i.ea+"latitude",h=b+A_i.ea+"longlatConnector",l=b+A_i.ea+"longlatEnd",m=AdfRichUIPeer.CreateSubId(b,"infoArea");document.getElementById(m)==A_&&a.getSource().getProperty("selected")&&(A_$a(AdfPage.PAGE.findComponent(b)),document.getElementById(m));e=document.getElementById(e);f=document.getElementById(f);g=document.getElementById(g);
h=document.getElementById(h);l=document.getElementById(l);e==A_||(h==A_||l==A_)||(d=AdfPage.PAGE.findComponent(d),c=AdfPage.PAGE.findComponent(c),a.getSource().getProperty("selected")?(f.style.display="block",g.style.display="block",e.style.display="block",l.style.display="block",this.OG==A_&&(a=g.clientWidth,A_i.Cw=f.clientWidth,A_i.Aw=a,this.OG=0),d!=A_&&d.setSelected(A_b),c!=A_&&c.setSelected(A_b)):(f.style.display="none",g.style.display="none",e.style.display="none",h.style.display="none",l.style.display=
"none",d!=A_&&d.setSelected(A_c),c!=A_&&c.setSelected(A_c)),A_i.Up(b))};A_h("AdfDhtmlGeoMapToolbarPeer._showInfoWindow",A_q.hg);
A_q.prototype.ia=function(a){var b=a.getSource();if(b.getComponentType()!=A_){a=this.getComponent().getProperty("mapId");a=AdfPage.PAGE.findComponent(a);var c=b.getProperty("buttonType");"oracle.adf.RichCommandMenuItem"==b.getComponentType()?b.getProperty("themeButtonType")!=A_&&"activeTheme"==b.getProperty("themeButtonType")&&(b=b.getProperty("themeID"),a.Jn(b),b=new A_ib(a,b),b.setPartial(A_b),a.queueEvent(b)):c&&A_Ea(a,c)}};A_h("AdfDhtmlGeoMapToolbarPeer.prototype.HandleComponentClick",A_q.prototype.ia);
A_h("AdfDhtmlGeoMapToolbarPeer.prototype.HandleComponentClick",A_q.prototype.ia);A_q.prototype.GetComponent=function(){return this.getComponent()};A_h("AdfDhtmlGeoMapToolbarPeer.prototype.GetComponent",A_q.prototype.GetComponent);A_q.prototype.it=function(a){return a.getProperty("mapId")};A_h("AdfDhtmlGeoMapToolbarPeer.prototype.GetComponentMapId",A_q.prototype.it);A_h("AdfDhtmlGeoMapToolbarPeer.prototype.GetComponentMapId",A_q.prototype.it);
A_q.prototype.InitDomElement=function(a,b){A_q.superclass.InitDomElement.call(this,a,b)};