AdfUIComponents.createComponentClass("AdfDhtmlGeoMapToolbar",{componentType:"oracle.dss.adf.geoMap.GeoMapToolbar",propertyKeys:[{name:"id",type:"String"},{name:"mapId",type:"String"},{name:"clickButton",type:"String"}],namingContainer:!0,superclass:AdfUIComponent});var A_j=AdfRichUIPeer.createPeerClass(AdfRichUIPeer,"AdfDhtmlGeoMapToolbarPeer",!0);A_a("AdfDhtmlGeoMapToolbarPeer",A_j);AdfPage.PAGE.getLookAndFeel().registerPeerConstructor("oracle.dss.adf.geoMap.GeoMapToolbar","AdfDhtmlGeoMapToolbarPeer");
A_j.InitSubclass=function(){AdfObject.ensureClassInitialization(A_j);AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.CLICK_EVENT_TYPE)};A_j.LH=function(a,b){var c=document.getElementById(AdfRichUIPeer.CreateSubId(a,"content"));if(null!=c&&null!=b){c.rr=[];for(var d=!0,e=0,f=c.selectedIndex,g=0;g<b.length;g++)c.rr[g]=c.options[e].text,f==g&&(c.options.selected=!0),b[g]?(e++,d=!1):c.remove(e);if(d)for(;0<c.options.length;)c.remove(0)}};A_a("AdfDhtmlGeoMapToolbarPeer._initOptions",A_j.LH);
A_j.xJ=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);null!=b&&null!=a&&b.setSelected(!a.kg.isCollapsed())};A_a("AdfDhtmlGeoMapToolbarPeer._updateMenu",A_j.xJ);A_j.pJ=function(a){var b=a.getSource();a=a.getSource().getProperty("mapId");a=AdfPage.PAGE.findComponent(a);b.getSelected()?a.kg.mM.parentNode.click():a.kg.collapse()};
A_a("AdfDhtmlGeoMapToolbarPeer._toggleOverviewMap",A_j.pJ);A_j.yJ=function(a){var b=a.getSource().getProperty("mapId"),b=AdfPage.PAGE.findComponent(b);a.getSource().getSelected()?A_ta(b):null!=b.Ic&&b.Ic.setVisible(!1)};A_a("AdfDhtmlGeoMapToolbarPeer._updateNavigationBar",A_j.yJ);
A_j.vJ=function(a){var b=a.getSource();if(null!=b.getProperty("themeIds")&&null!=b.getProperty("comboBoxId")){var c=b.getProperty("themeIds").split(" "),d=b.getProperty("comboBoxId"),e=AdfPage.PAGE.findComponent(d),d=e.getProperty("selThemeId"),f=null;if(a.getNewValue()){if(f=e.getValue(),null==f||0==f.length){b.setValue(!1);return}}else f=[];a=f;1==f.length&&(a=[],a.push(f));A_j.uy(c,d,a)}};A_a("AdfDhtmlGeoMapToolbarPeer._updateCheckBox",A_j.vJ);
A_j.zJ=function(a){var b=a.getSource();if(null!=b.getProperty("themeIds")&&null!=b.getProperty("selThemeId")){var c=b.getProperty("themeIds").split(" "),d=b.getProperty("selThemeId"),b=b.getProperty("checkBoxId"),b=AdfPage.PAGE.findComponent(b);null==a.getNewValue()||0==a.getNewValue().length?b.setValue(!1):b.setValue(!0);b=a.getNewValue();1==a.getNewValue().length&&(b=[],b.push(a.getNewValue()));A_j.uy(c,d,b)}};A_a("AdfDhtmlGeoMapToolbarPeer._updateSelectedOneChoice",A_j.zJ);
A_j.uy=function(a,b,c){var d=document.getElementById(AdfRichUIPeer.CreateSubId(b,"content"));if(null!=d){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=null;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.rr[i];f.label=d.rr[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_j.Xm=function(a){return null==a?null:AdfPage.PAGE.findComponent(a)};
A_j.lJ=function(a,b,c,d,e){var f=[];f[0]=A_j.Xm(b);f[1]=A_j.Xm(c);f[2]=A_j.Xm(d);f[3]=A_j.Xm(e);if(null!=a){AdfPage.PAGE.findComponent(a);a=document.getElementById(AdfRichUIPeer.CreateSubId(a,"content"));b=a.options;a.Ex=[];for(c=0;c<a.options.length;c++)a.Ex.push(b[c]);for(c=a.options.length=0;3>c;c++)null!=f[c]&&(f[c].getSelectItems(),a.add(a.Ex[c],null))}};A_a("AdfDhtmlGeoMapToolbarPeer._themeOpened",A_j.lJ);A_j.aJ=function(a){a=a.getSource().getProperty("dialogID");AdfPage.PAGE.findComponent(a).show()};
A_a("AdfDhtmlGeoMapToolbarPeer._showThemeDialog",A_j.aJ);
A_j.bx=function(a,b){var c=AdfPage.PAGE.findComponent(b);if(null!=c){var d=c.getProperty("checkBoxId"),e=AdfPage.PAGE.findComponent(d);if(null!=e){var d=null,f=c.getProperty("themeIds").split(" ");e.getValue()&&(d=c.getValue(),null!=d&&1==d.length&&(d=[],d.push(c.getValue())));c=[];for(e=0;e<f.length;e++){for(var g=!1,h=0;null!=d&&h<d.length;h++)if(e==parseInt(d[h])){g=!0;break}h=a._getThemeEntry(f[e]);null!=h&&h.loaded&&("PointTheme"!=h.type?g?c.push(h):(A_pa(a,h,!1),h.toolbarVisible=!1):(A_oa(a,
h,g),h.toolbarVisible=g))}for(e=0;e<c.length;e++)A_pa(a,c[e],!0),c[e].toolbarVisible=!0;A_xa(a.getPeer(),a,!1)}}};A_a("AdfDhtmlGeoMapToolbarPeer._hideThemesOnSelection",A_j.bx);
A_j.kJ=function(a){if("ok"==a.getOutcome()&&null!=a.getCurrentTarget()&&null!=a.getCurrentTarget().getParent()){for(var b=AdfPage.PAGE.findComponent(a.getCurrentTarget().getProperty("mapId")),c=a.getCurrentTarget().getProperty("comboBoxIds").split(" "),d=0;d<c.length;d++)A_j.bx(b,c[d]);a=a.getCurrentTarget().getProperty("activeThemeComboId");a=AdfPage.PAGE.findComponent(a);c=a.getProperty("themeIds").split(" ");null!=a.getValue()?b.ro(c[parseInt(a.getValue())]):b.ro(null)}};
A_a("AdfDhtmlGeoMapToolbarPeer._themeDialogOK",A_j.kJ);
A_j.uw=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);null!=b&&b.setSelected(!1);null!=a&&a.setSelected(!1);b=this.getProperty("mapId");a=AdfRichUIPeer.CreateSubId(b,"hiddenLegend");a=document.getElementById(a);b=document.getElementById(b);null!=a&&(a.style.display="none",b.appendChild(a));c.removeEventListener("popupClosed",c.nx);c.nx=null};
A_a("AdfDhtmlGeoMapToolbarPeer._closeLegendListener",A_j.uw);
A_j.$I=function(a){var b=a.getSource().createCallback(A_j.uw),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.nx=b;c&&(a.getSource().getProperty("selected")&&!c.isPopupVisible()?(null!=e&&e.setSelected(!0),null!=d&&d.setSelected(!0),c.show()):!a.getSource().getProperty("selected")&&c.isPopupVisible()&&
(null!=e&&e.setSelected(!1),null!=d&&d.setSelected(!1),c.hide()))};A_a("AdfDhtmlGeoMapToolbarPeer._showLegend",A_j.$I);
A_j.wg=function(a){var b=a.getSource().getProperty("mapId"),c=a.getSource().getProperty("menuItemId"),d=a.getSource().getProperty("buttonId"),e=b+A_b.la+"latlong",f=b+A_b.la+"longitude",g=b+A_b.la+"latitude",h=b+A_b.la+"longlatConnector",l=b+A_b.la+"longlatEnd",m=AdfRichUIPeer.CreateSubId(b,"infoArea");null==document.getElementById(m)&&a.getSource().getProperty("selected")&&(A_6a(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);null!=e&&null!=h&&null!=l&&(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",null==this.KH&&(a=g.clientWidth,A_b.ox=f.clientWidth,A_b.mx=a,this.KH=0),null!=d&&d.setSelected(!0),null!=c&&c.setSelected(!0)):(f.style.display="none",g.style.display="none",e.style.display=
"none",h.style.display="none",l.style.display="none",null!=d&&d.setSelected(!1),null!=c&&c.setSelected(!1)),A_b.Aq(b))};A_a("AdfDhtmlGeoMapToolbarPeer._showInfoWindow",A_j.wg);
A_j.prototype.ra=function(a){var b=a.getSource();if(null!=b.getComponentType()){a=this.getComponent().getProperty("mapId");a=AdfPage.PAGE.findComponent(a);var c=b.getProperty("buttonType");"oracle.adf.RichCommandMenuItem"==b.getComponentType()?null!=b.getProperty("themeButtonType")&&"activeTheme"==b.getProperty("themeButtonType")&&(b=b.getProperty("themeID"),a.ro(b),b=new A_db(a,b),b.setPartial(!0),a.queueEvent(b)):c&&A_sa(a,c)}};A_j.prototype.HandleComponentClick=A_j.prototype.ra;
A_a("AdfDhtmlGeoMapToolbarPeer.prototype.HandleComponentClick",A_j.prototype.ra);A_j.prototype.GetComponent=function(){return this.getComponent()};A_j.prototype.GetComponent=A_j.prototype.GetComponent;A_j.prototype.Wt=function(a){return a.getProperty("mapId")};A_j.prototype.GetComponentMapId=A_j.prototype.Wt;A_a("AdfDhtmlGeoMapToolbarPeer.prototype.GetComponentMapId",A_j.prototype.Wt);A_j.prototype.InitDomElement=function(a,b){A_j.superclass.InitDomElement.call(this,a,b)};