Method: deactivate
Deactivates the control.

Returns:
{Boolean} The control was effectively deactivated.
766187
function () {
        if (this.active) {
            this.handlers.feature.deactivate();
            if(this.handlers.box) {
                this.handlers.box.deactivate();
            }
            if(this.layers) {
                this.map.removeLayer(this.layer);
            }
        }
        return OpenLayers.Control.prototype.deactivate.apply(
            this, arguments
        );
    }
90028
function() {
        var deactivated = false;
        if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
            this.started = false;
            this.pinching = false;
            this.start = null;
            this.last = null;
            deactivated = true;
        }
        return deactivated;
    }
28247
def deactivate(self):
        
        self.open()
        d = lvm_lv_deactivate(self.handle)
        self.close()
        if d != 0:
            raise CommitError("Failed to deactivate LV.")
176773
function() {
        if (this.pinchZoom) {
            this.pinchZoom.deactivate();
        }
        this.zoomBox.deactivate();
        this.dragPan.deactivate();
        this.handlers.click.deactivate();
        this.handlers.wheel.deactivate();
        return OpenLayers.Control.prototype.deactivate.apply(this,arguments);
    }
9624
def deactivate(self):
        

        raise foundations.exceptions.ProgrammingError(
            "{0} | '{1}' Component cannot be deactivated!".format(self.__class__.__name__, self.__name))
1221098
final boolean deactivate() throws InterruptedException {

      isActive = false; //Stop any reopen operations
      stats.deactivate();

      availableQueue.clear(); //No more open connections...

      reopenExecutor.getQueue().clear(); //Clear all active reopeners - don't care...
      
      //Wait for all open connections to be closed & connections in the process of closing to finish
      //Reopening connections don't matter

      long maxWaitMillis = activeTimeoutMillis;
      if(maxWaitMillis < 1L) {
         maxWaitMillis = 60000L;
      }

      long elapsedWaitMillis = 0L;

      outer:
      while(elapsedWaitMillis < maxWaitMillis) {

         for(ConnectionPoolConnection conn : connections) {
            int state = conn.state.get();
            if(state == ConnectionPoolConnection.STATE_OPEN ||
                    state == ConnectionPoolConnection.STATE_CLOSING) {
               Thread.sleep(500L);
               elapsedWaitMillis += 500L;
               continue outer;
            } else {
               conn.forceRealClose();
               conn.state.set(ConnectionPoolConnection.STATE_DISCONNECTED);
            }
         }

         return true;
      }

      return false;
   }
811130
function() {
        if (OpenLayers.Control.prototype.activate.apply(this, arguments)) {
            this.map.events.register('mousemove', this, this.redraw);
            this.map.events.register('mouseout', this, this.reset);
            this.redraw();
            return true;
        } else {
            return false;
        }
    }
409541
function() {
        var deactivated = false;
        if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
            for (var i=0, len=this.KEY_EVENTS.length; i<len; i++) {
                OpenLayers.Event.stopObserving(
                    this.observeElement, this.KEY_EVENTS[i], this.eventListener);
            }
            deactivated = true;
        }
        return deactivated;
    }
1180853
def deactivate(self, mod):
        
        if mod in self.active:
            self.active.remove(mod)
310590
function () {
			if (this.element === null) {
				//!steal-remove-start
				if(process.env.NODE_ENV !== 'production') {
					dev.warn("can-control: Control already destroyed");
				}
				//!steal-remove-end
				return;
			}
			var Class = this.constructor,
				pluginName = Class.pluginName || (Class.shortName && string.underscore(Class.shortName)),
				controls;

			this.off();

			if (pluginName && pluginName !== 'can_control' && this.element.classList) {
                this.element.classList.remove(pluginName);
			}

			controls = this.element[controlsSymbol];
			if (controls) {
				controls.splice(controls.indexOf(this), 1);
			}

			//canEvent.dispatch.call(this, "destroyed");

			this.element = null;
		}
355106
function() {
                    if (this.element === null) {

                        return;
                    }
                    var Class = this.constructor,
                        pluginName = Class.pluginName || Class._fullName,
                        controls;

                    this.off();

                    if (pluginName && pluginName !== 'can_control') {
                        this.element.removeClass(pluginName);
                    }

                    controls = can.data(this.element, "controls");
                    controls.splice(can.inArray(this, controls), 1);

                    can.trigger(this, "destroyed");

                    this.element = null;
                }
295598
@Override
    public synchronized void deactivate() throws InterruptedException, CouldNotPerformException {
        manageLock.lockWrite(this);
        try {
            try {
                validateInitialization();
            } catch (InvalidStateException ex) {
                // was never initialized!
                return;
            }

            // skip initial data sync if still running
            if (initialDataSyncFuture != null && !initialDataSyncFuture.isDone()) {
                initialDataSyncFuture.cancel(true);
            }

            logger.debug("Deactivate AbstractControllerServer for: " + this);
            // The order is important: The informer publishes a zero event when the availabilityState is set to deactivating which leads remotes to disconnect
            // The remotes try to reconnect again and start a requestData. If the server is still active it will respond
            // and the remotes will think that the server is still there..
            if (serverWatchDog != null) {
                serverWatchDog.deactivate();
            }
            // inform remotes about deactivation
            setAvailabilityState(DEACTIVATING);
            if (informerWatchDog != null) {
                informerWatchDog.deactivate();
            }
            setAvailabilityState(OFFLINE);
        } finally {
            manageLock.unlockWrite(this);
        }
    }
667056
def deactivate(self):
        
        if self._parser.env.get('current_program', 0) != 0:
            self._parser.env['current_program'] = 0
            gl.glUseProgram(0)
132928
def deactivate(self):
        
        self.ide.project.sigProjectChanged.disconnect(self.__collectGarbage)
        self.ide.editorsManager.sigTabClosed.disconnect(self.__collectGarbage)

        WizardInterface.deactivate(self)
1020086
function() {
        var activated = false;
        if(OpenLayers.Handler.prototype.activate.apply(this, arguments)) {
            this.moveLayerToTop();
            this.map.events.on({
                "removelayer": this.handleMapEvents,
                "changelayer": this.handleMapEvents,
                scope: this
            });
            activated = true;
        }
        return activated;
    }
1359980
function() {
        var deactivated = OpenLayers.Strategy.prototype.deactivate.call(this);
        if(deactivated) {
            if(this.auto) {
                if(typeof this.auto === "number") {
                    window.clearInterval(this.timer);
                } else {
                    this.layer.events.un({
                        "featureadded": this.triggerSave,
                        "afterfeaturemodified": this.triggerSave,
                        scope: this
                    });
                }
            }
        }
        return deactivated;
    }
165429
@Deactivate
    protected void deactivate(Map<String, Object> properties, int reason) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(this, tc, "HttpDispatcher deactivated, id=" + properties.get(ComponentConstants.COMPONENT_ID) + ",reason=" + reason);
        }

        // Clear this as the active HttpDispatcher instance (unless another has already replaced)
        instance.get().compareAndSet(this, null);
    }