Checks if the dragging should end based on the mouse button clicked.

@param button the button
@return true, if dragging should end
347309
public boolean shouldEndDrag(int button)
	{
		if (!isDraggingItemStack())
			return false;

		if (dragType == DRAG_TYPE_ONE || dragType == DRAG_TYPE_SPREAD)
			return dragType == button && draggedSlots.size() > 1;

		return dragType == DRAG_TYPE_PICKUP;
	}
514717
@UiHandler("m_cancelButton")
    void cancelAction(ClickEvent event) {

        m_clipboard.reloadFavorites();
        m_buttonEditingPanel.setVisible(false);
        m_buttonUsePanel.setVisible(true);
    }
223783
public void detach(AbstractButton button) {
		if (getDefaultButtonManager().isAttachedTo(button)) {
			getDefaultButtonManager().detach(button);
			onButtonDetached();
		}
	}
316502
@SuppressWarnings("serial")
    private Button createSaveExitButton() {

        Button saveExitBtn = CmsToolBar.createButton(
            FontOpenCms.SAVE_EXIT,
            m_messages.key(Messages.GUI_BUTTON_SAVE_AND_EXIT_0));
        saveExitBtn.addClickListener(new ClickListener() {

            public void buttonClick(ClickEvent event) {

                saveAction();
                closeAction();

            }
        });
        saveExitBtn.setEnabled(false);
        return saveExitBtn;
    }
889609
def on_mouse_move(self, event):
        """"""
        if event.modifiers:
            return
        if event.is_dragging:
            x0, y0 = self._normalize(event.press_event.pos)
            x1, y1 = self._normalize(event.last_event.pos)
            x, y = self._normalize(event.pos)
            dx, dy = x - x1, y - y1
            if event.button == 1:
                self.pan_delta((dx, dy))
            elif event.button == 2:
                c = np.sqrt(self.size[0]) * .03
                self.zoom_delta((dx, dy), (x0, y0), c=c)
624959
private void stopDragging() {
		if (dragging) {
			dragging = false;
			getContainer().remove(circle);
			getContainer().remove(line);
		}
	}
944955
public boolean shouldResetDrag(int button)
	{
		if (!isDraggingItemStack())
			return false;

		if (dragType == DRAG_TYPE_SPREAD)
			return button == 1 && draggedSlots.size() > 1;
		if (dragType == DRAG_TYPE_ONE)
			return button == 0 && draggedSlots.size() > 1;

		return dragType != DRAG_TYPE_PICKUP;
	}
237421
function trapClickAndEnd(event) {

    var untrap;

    // trap the click in case we are part of an active
    // drag operation. This will effectively prevent
    // the ghost click that cannot be canceled otherwise.
    if (context.active) {

      untrap = installClickTrap(eventBus);

      // remove trap after minimal delay
      setTimeout(untrap, 400);

      // prevent default action (click)
      preventDefault(event);
    }

    end(event);
  }
1333050
private void stopDragging() {
		if (dragging) {
			dragging = false;
			mapWidget.getVectorContext().deleteGroup(circleGroup);
			center = null;
			radius = 0;
		}
	}
1289722
public void end() {
		// if (((ArrayList) this.featureCollection).size() == 0) {
		this.endNewElement();
		// }
		contentHandler.endFeatureCollection(this.featureCollection);
		if (writerContentHandler != null)
			geoJSON = writerContentHandler.endFeatureCollection(geoJSON);
	}
641180
def _is_end(event, node, tagName): # pylint: disable=invalid-name
    """"""

    return event == pulldom.END_ELEMENT and node.tagName == tagName
766971
def has_button(self, button):
		

		rc = self._libinput.libinput_device_pointer_has_button(
			self._handle, button)
		assert rc >= 0, 'This device is not a pointer device'
		return bool(rc)
278036
private boolean canOutcomeBeRendered(Button button, String fragment, String outcome) {
		boolean renderOutcome = true;
		if (null == outcome && button.getAttributes() != null && button.getAttributes().containsKey("ng-click")) {
			String ngClick = (String)button.getAttributes().get("ng-click");
			if (null != ngClick && (ngClick.length() > 0)) {
				if (fragment == null) {
					renderOutcome = false;
				}
			}
		}
		return renderOutcome;
	}
464197
public void onMouseDown(MouseDownEvent event) {
		if (event.getNativeButton() != NativeEvent.BUTTON_RIGHT) {
			dragging = true;
			center = getScreenPosition(event);

			LineString radiusLine = mapWidget.getMapModel().getGeometryFactory().createLineString(
					new Coordinate[] { center, center });
			mapWidget.getVectorContext().drawGroup(mapWidget.getGroup(RenderGroup.SCREEN), circleGroup);
			mapWidget.getVectorContext().drawCircle(circleGroup, "outer", center, 1.0f, circleStyle);
			mapWidget.getVectorContext().drawCircle(circleGroup, "center", center, 2.0f, circleStyle);
			mapWidget.getVectorContext().drawLine(circleGroup, "radius", radiusLine, circleStyle);
		}
	}
384931
function (e) {
            if (this.dragging === false) {
                this.dragging = true;
                this.grabOffset.set(e.gameX, e.gameY);
                this.grabOffset.sub(this.pos);
                return false;
            }
        }
1093690
private JButton getBtnClose() {
		if (btnClose == null) {
			btnClose = new JButton();
			btnClose.setText("Close");
			btnClose.setVisible(false);
			btnClose.addActionListener(new ActionListener() {     // Close this window
				@Override
				public void actionPerformed(ActionEvent arg0) {					
				        
                      stop();
                      
				}
		    });
		}
		return btnClose;
	}
1206254
public boolean isAfter(final T element) {
        if (element == null) {
            return false;
        }

        return lowerEndpoint.includes(element) == false;
    }