/*

--- _onClickShowHide( MouseEvent ) ---

onclick event handler for the show/hide pins button

This event show or hide the pins
174220
function ( MouseEvent ) {
		if ( _PinsVisible ) {
			MouseEvent.target.id = 'PinControl-ShowButton';
			MouseEvent.target.setAttribute ( 'title' , _Translator.getText ( 'L.Marker.Pin.Control.onAdd.ShowButton' ) );
			_Pins.hide ( );
			_PinsVisible = false;
		}
		else {
			MouseEvent.target.id = 'PinControl-HideButton';
			MouseEvent.target.setAttribute ( 'title' , _Translator.getText ( 'L.Marker.Pin.Control.onAdd.HideButton' ) );
			_Pins.show ( );
			_PinsVisible = true;
		}
		MouseEvent.stopPropagation ( );
	}
303301
@EventBusListenerMethod(scope = EventScope.UI)
    public void onEvent(final PinUnpinEvent event) {
        final Optional<Long> pinnedDist = managementUIState.getTargetTableFilters().getPinnedDistId();

        if (event == PinUnpinEvent.PIN_DISTRIBUTION && pinnedDist.isPresent()) {
            displayCountLabel(pinnedDist.get());
        } else {
            setValue("");
            displayTargetCountStatus();
        }
    }
818273
function ( MainDiv ) {
		var PinsDiv = L.DomUtil.create ( 'div', 'PinControl-Pins', MainDiv );
		PinsDiv.id = 'PinControl-Pins';

		L.DomEvent.on ( MainDiv, 'click', _onClick );
		L.DomEvent.on ( MainDiv, 'dblclick', _onDblClick );
		L.DomEvent.on ( MainDiv, 'contextmenu', _onContextMenu );
		L.DomEvent.on ( MainDiv, 'dragstart', _onDragStart );
		L.DomEvent.on ( MainDiv, 'dragover', _onDragOver );
		L.DomEvent.on (	MainDiv, 'dragend', _onDragEnd );
		L.DomEvent.on ( MainDiv, 'mousedown', _onMouseDown );
		L.DomEvent.on ( MainDiv, 'drop', _onDrop );
		L.DomEvent.on ( MainDiv, 'mousewheel', _onWheel, false );
		L.DomEvent.on ( MainDiv, 'wheel', _onWheel, false );

		PinsDiv.dataset.minimized = 'no';
		
		return PinsDiv;
	}
1151978
@Override
    public void onAutoHide() {
        ColorPicker colorPicker = (ColorPicker) getControl();
        JFXColorPickerSkin cpSkin = (JFXColorPickerSkin) colorPicker.getSkin();
        cpSkin.syncWithAutoUpdate();
        if (!colorPicker.isShowing()) {
            super.onAutoHide();
        }
    }
614187
function (p_oEvent) {
        
            var oTarget = Event.getTarget(p_oEvent),
                nCharCode = Event.getCharCode(p_oEvent),
                sId = oTarget.parentNode.parentNode.id,
                oButton = m_oButtons[sId],
                nIndex = -1;
        
        
            if (nCharCode == 37 || nCharCode == 38) {
        
                nIndex = (oButton.index === 0) ? 
                            (this._buttons.length - 1) : (oButton.index - 1);
            
            }
            else if (nCharCode == 39 || nCharCode == 40) {
        
                nIndex = (oButton.index === (this._buttons.length - 1)) ? 
                            0 : (oButton.index + 1);
        
            }
        
        
            if (nIndex > -1) {
        
                this.check(nIndex);
                this.getButton(nIndex).focus();
            
            }        
        
        }
1328812
protected void onItemClick(ItemClickEvent event) {

        if (!event.isCtrlKey() && !event.isShiftKey()) {

            Set<String> nameSet = new LinkedHashSet<String>();

            CmsModuleRow moduleRow = (CmsModuleRow)(event.getItemId());
            select(moduleRow);
            nameSet.add(moduleRow.getModule().getName());
            if (event.getButton().equals(MouseButton.RIGHT) || (event.getPropertyId() == null)) {
                select(moduleRow);
                m_menu.setEntries(m_app.getMenuEntries(), nameSet);
                m_menu.openForTable(event, this);
            } else if (event.getButton().equals(MouseButton.LEFT) && "name".equals(event.getPropertyId())) {

                m_app.openModuleInfo(nameSet);
            }

        }
    }
567982
function(event, args) {
      var wire = args[0];
      // add the wire to the list if it isn't in
      if( WireIt.indexOf(wire, this.wires) == -1 ) {
         this.wires.push(wire);
         
         if(this.enableMouseEvents) {
            YAHOO.util.Event.addListener(wire.element, "mousemove", this.onWireMouseMove, this, true);
            YAHOO.util.Event.addListener(wire.element, "click", this.onWireClick, this, true);
         }
         
         // Re-Fire an event at the layer level
         this.eventAddWire.fire(wire);

			// Fire the layer changed event
			this.eventChanged.fire(this);
      }
   }
644920
function hideHandler( e )  {
				var inContainer = moduleFilter.contains( e.target );

				if ( e.keyCode === 27 || !inContainer ) {
					if ( e.keyCode === 27 && inContainer ) {
						moduleSearch.focus();
					}
					dropDown.style.display = "none";
					removeEvent( document, "click", hideHandler );
					removeEvent( document, "keydown", hideHandler );
					moduleSearch.value = "";
					searchInput();
				}
			}
640391
function beginControlsAutoHide( viewer ) {
    if ( !viewer.autoHideControls ) {
        return;
    }
    viewer.controlsShouldFade = true;
    viewer.controlsFadeBeginTime =
        $.now() +
        viewer.controlsFadeDelay;

    window.setTimeout( function(){
        scheduleControlsFade( viewer );
    }, viewer.controlsFadeDelay );
}
408323
function(event, args) {
      var wire = args[0];
      var index = WireIt.indexOf(wire, this.wires);
      if( index != -1 ) {
         this.wires[index] = null;
         this.wires = WireIt.compact(this.wires);
         this.eventRemoveWire.fire(wire);
			this.eventChanged.fire(this);
      }
   }
89100
@Override
    public void buttonClick(final ClickEvent event) {
        if (window.getParent() != null) {
            isImplicitClose = true;
            UI.getCurrent().removeWindow(window);
        }
        callback.response(event.getSource().equals(okButton));
    }
1281608
public void onClick(MenuItemClickEvent event) {
		if (feature != null && feature.isSelected()) {
			SC.confirm(
					I18nProvider.getGlobal().confirmDeleteFeature(feature.getLabel(), feature.getLayer().getLabel()),
					new BooleanCallback() {

						public void execute(Boolean value) {
							if (value) {
								feature.getLayer().deselectFeature(feature);
								mapWidget.getMapModel().getFeatureEditor()
										.startEditing(new Feature[] { feature }, null);
								SaveEditingAction action = new SaveEditingAction(mapWidget, controller);
								action.onClick(null);
							}
						}
					});
		}
	}
359800
function(delay, e) {
              // Disable popover if ns-popover value is false
              if ($parse(attrs.nsPopover)(scope) === false) {
                return;
              }

              $timeout.cancel(displayer_.id_);

              if (!isDef(delay)) {
                delay = 0;
              }

              // hide any popovers being displayed
              if (options.group) {
                $rootScope.$broadcast('ns:popover:hide', options.group);
              }

              displayer_.id_ = $timeout(function() {
                if (true === $popover.isOpen) {
                  return;
                }

                $popover.isOpen = true;
                $popover.css('display', 'block');

                // position the popover accordingly to the defined placement around the
                // |elm|.
                var elmRect = getBoundingClientRect(elm[0]);

                // If the mouse-relative options is specified we need to adjust the
                // element client rect to the current mouse coordinates.
                if (options.mouseRelative) {
                  elmRect = adjustRect(elmRect, options.mouseRelativeX, options.mouseRelativeY, e);
                }

                move($popover, placement_, align_, elmRect, $triangle);
                addEventListeners();

                // Hide the popover without delay on the popover click events.
                if (true === options.hideOnInsideClick) {
                  $popover.on('click', insideClickHandler);
                }

                // Hide the popover without delay on outside click events.
                if (true === options.hideOnOutsideClick) {
                  $document.on('click', outsideClickHandler);
                }

                // Hide the popover without delay on the button click events.
                if (true === options.hideOnButtonClick) {
                  elm.on('click', buttonClickHandler);
                }

                // Call the open callback
                options.onOpen(scope);
              }, delay*1000);
            }
1197872
function show(content, event){
      switch(arguments.length){
        case 1:
          // if there is only one argument, assume that it is event
          // just update the position and do not update content
          dom.style.display = 'block';
          updatePosition(arguments[0]);
          break;
        case 2:
          if(content){
            $tooltip.html(content);
          }
          dom.style.display = 'block';
          updatePosition(event);
          break;
      }
    }
291206
@Override
    public void mouseClicked(MouseEvent evt) {
        final boolean left = SwingUtilities.isLeftMouseButton(evt);
        final boolean singleClick = (evt.getClickCount() == 1);

        if ((left && singleClick)) {
            Rectangle bounds = viewer.getViewportBounds();
            int x = bounds.x + evt.getX();
            int y = bounds.y + evt.getY();
            Point pixelCoordinates = new Point(x, y);
            mapClicked(viewer.getTileFactory().pixelToGeo(pixelCoordinates, viewer.getZoom()));
        }
    }
1043110
function(hideDelay) {
			this._showByKB = undefined;
			
			if (this._timeout) {
				window.clearTimeout(this._timeout);
				this._timeout = null;
			}
			if (!this.isShowing()) { //$NON-NLS-0$
				return;
			}
			if (hideDelay === undefined) {
				hideDelay = this._hideDelay;
			}
			var self = this;
			this._timeout = window.setTimeout(function() {
				self._tip.classList.remove("tooltipShowing"); //$NON-NLS-0$
				self._tip.removeAttribute("style"); //$NON-NLS-0$
				if (self._afterHiding) {
					self._afterHiding();
				}
			}, hideDelay);
		}
979679
function bindToClick(selector, handler) {
    var elems = document.querySelectorAll(selector);
    var i = -1;
    var len = elems.length;
    while (++i < len) {
      elems[i].addEventListener('click', handler);
    }
  }