Apply a new cursor on the map.

@param cursor
The new cursor to be used when the mouse hovers over the map.
@since 1.10.0
198686
@Api
	public void setCursorString(String cursor) {
		try {
			Cursor c = Cursor.valueOf(cursor.toUpperCase());
			setCursor(c);
		} catch (Exception e) { // NOSONAR
			// Let us assume the cursor points to an image:
			this.cursor = cursor;
			if (!cursor.contains("url")) {
				this.cursor = "url('" + cursor + "'),auto";
			}
			graphics.getRasterContext().setCursor(null, this.cursor);
			graphics.getVectorContext().setCursor(null, this.cursor);
		}
	}
788979
def set_editor_cursor(self, editor, cursor):
        """"""
        pos = cursor.position()
        anchor = cursor.anchor()

        new_cursor = QTextCursor()
        if pos == anchor:
            new_cursor.movePosition(pos)
        else:
            new_cursor.movePosition(anchor)
            new_cursor.movePosition(pos, QTextCursor.KeepAnchor)
        editor.setTextCursor(cursor)
901576
function Cursor(tree, start, end) {
        this.tree = tree;
        this.start = start;
        this.end = end;
        
        var self = this;
        this.walk = function walk(node, iterator) {
            if (node === null) return;
            
            if (start !== undefined && node.key < start) {
                walk(node.right, iterator);
            } else if (end !== undefined && node.key > end) {
                walk(node.left, iterator);
            } else {
                walk(node.left, iterator);
                iterator(node.value, node.key, self.tree);
                walk(node.right, iterator);
            }
        };
    }
143299
function (cursor) {
            var cs = this.lineCursors;
            for (var i = 0; i < cs.length; i++) {
                if (cs[i].position > cursor.position) {
                    return i - 1;
                }
            }
            return i;
        }
1304448
def update_cursor(self, dc, grid, row, col):
        """"""

        old_row, old_col = self.old_cursor_row_col

        bgcolor = get_color(config["background_color"])

        self._draw_cursor(dc, grid, old_row, old_col,
                          pen=wx.Pen(bgcolor), brush=wx.Brush(bgcolor))
        self._draw_cursor(dc, grid, row, col)
1344121
private void showSettingsMenu(final Cursor cursor) {
        Log.d(TAG, "showSettingsMenu");
        enableSettingsCursor(cursor);
        context.runOnGlThread(new Runnable() {
            @Override
            public void run() {
                new SettingsView(context, scene, CursorManager.this,
                        settingsCursor.getIoDevice().getCursorControllerId(), cursor, new
                        SettingsChangeListener() {
                            @Override
                            public void onBack(boolean cascading) {
                                disableSettingsCursor();
                            }

                            @Override
                            public int onDeviceChanged(IoDevice device) {
                                // we are changing the io device on the settings cursor
                                removeCursorFromScene(settingsCursor);
                                IoDevice clickedDevice = getAvailableIoDevice(device);
                                settingsCursor.setIoDevice(clickedDevice);
                                addCursorToScene(settingsCursor);
                                return device.getCursorControllerId();
                            }
                        });
            }
        });
    }
993135
public static <T extends Model> List<T> processCursor(Class<T> cls, Cursor cursor) {
		final List<T> entities = new ArrayList<T>();
		try {
			Constructor<T> entityConstructor = cls.getConstructor();
			if (cursor.moveToFirst()) {
				do {
					T entity = getEntity(cls, cursor.getLong(cursor.getColumnIndex(BaseColumns._ID)));
					if (entity == null) {
						entity = entityConstructor.newInstance();
					}

					entity.load(cursor);
					entities.add(entity);
				}
				while (cursor.moveToNext());
			}
		} catch (Exception e) {
			Log.e(TAG, "Failed to process cursor.", e);
		}

		return entities;
	}
880893
public void onMouseUp(ListenerEvent event) {
		if (clickstart && !dragging) {
			Coordinate worldPosition = event.getWorldPosition();
			Point point = mapWidget.getMapModel().getGeometryFactory().createPoint(worldPosition);

			SearchByLocationRequest request = new SearchByLocationRequest();
			request.setLocation(GeometryConverter.toDto(point));
			request.setCrs(mapWidget.getMapModel().getCrs());
			request.setQueryType(SearchByLocationRequest.QUERY_INTERSECTS);
			request.setSearchType(SearchByLocationRequest.SEARCH_ALL_LAYERS);
			request.setBuffer(calculateBufferFromPixelTolerance());
			request.setFeatureIncludes(GwtCommandDispatcher.getInstance().getLazyFeatureIncludesSelect());
			
			for (Layer<?> layer : mapWidget.getMapModel().getLayers()) {
				if (layer.isShowing() && layer instanceof VectorLayer  && !layersToExclude.contains(layer.getId())) {
					request.addLayerWithFilter(layer.getId(), layer.getServerLayerId(),
							((VectorLayer) layer).getFilter());
				}
			}
			final SearchByPointRequest rasterLayerRequest = new SearchByPointRequest();
			rasterLayerRequest.setLocation(point.getCoordinate());
			rasterLayerRequest.setCrs(mapWidget.getMapModel().getCrs());
			rasterLayerRequest.setSearchType(SearchByPointRequest.SEARCH_ALL_LAYERS);
			rasterLayerRequest.setPixelTolerance(pixelTolerance);
			final Map<String, String> rasterLayerIds = new HashMap<String, String>();
			for (Layer<?> layer : mapWidget.getMapModel().getLayers()) {
				if (layer.isShowing() && layer instanceof RasterLayer && !layersToExclude.contains(layer.getId())) {
					rasterLayerIds.put(layer.getId(), layer.getServerLayerId());
				}
			}
			rasterLayerRequest.setLayerMapping(rasterLayerIds);
			rasterLayerRequest.setBbox(toBbox(mapWidget.getMapModel().getMapView().getBounds()));
			rasterLayerRequest.setScale(mapWidget.getMapModel().getMapView().getCurrentScale());

			GwtCommand commandRequest = new GwtCommand(SearchByLocationRequest.COMMAND);
			commandRequest.setCommandRequest(request);
			// TODO: commands are now chained. Perhaps we should combine this
			// into a single command?
			GwtCommandDispatcher.getInstance().execute(commandRequest, 
								new AbstractCommandCallback<SearchByLocationResponse>() {
				public void execute(final SearchByLocationResponse vectorResponse) {
					if (includeRasterLayers) {
						GwtCommand commandRequest = new GwtCommand(SearchByPointRequest.COMMAND);
						commandRequest.setCommandRequest(rasterLayerRequest);
						GwtCommandDispatcher.getInstance().execute(commandRequest,
								new AbstractCommandCallback<SearchByPointResponse>() {
									public void execute(final SearchByPointResponse rasterResponse) {
										//Featuremap maps client layer on feature
										Map<String, List<org.geomajas.layer.feature.Feature>> featureMap = 
											vectorResponse.getFeatureMap();
										featureMap.putAll(rasterResponse.getFeatureMap());
										showFeatureInfo(featureMap);
									}
								});

					} else {
						showFeatureInfo(vectorResponse.getFeatureMap());
					}
				}
			});

		} else {
			dragging = false;
		}
		clickstart = false;
	}
234110
public function useCursor()
	{
	    //@codeCoverageIgnoreStart
	    if (! $this->jsWriter instanceOf \AltaMira\JsWriter\Ability\Cursorable ) {
            throw new \BadMethodCallException( "JsWriter cannot use cursor" );
	    }
	    //@codeCoverageIgnoreEnd
	    
	    $this->jsWriter->useCursor();
	    
	    return $this;
	}
836251
public void declareCursor(SqlSelect select, SqlValidatorScope parentScope) {
		cursorSet.add(select);

		// add the cursor to a map that maps the cursor to its select based on
		// the position of the cursor relative to other cursors in that call
		FunctionParamInfo funcParamInfo = functionCallStack.peek();
		Map<Integer, SqlSelect> cursorMap = funcParamInfo.cursorPosToSelectMap;
		int numCursors = cursorMap.size();
		cursorMap.put(numCursors, select);

		// create a namespace associated with the result of the select
		// that is the argument to the cursor constructor; register it
		// with a scope corresponding to the cursor
		SelectScope cursorScope = new SelectScope(parentScope, null, select);
		cursorScopes.put(select, cursorScope);
		final SelectNamespace selectNs = createSelectNamespace(select, select);
		String alias = deriveAlias(select, nextGeneratedId++);
		registerNamespace(cursorScope, alias, selectNs, false);
	}
43829
def on_cursor_shape_changed(self, combo):
        
        index = combo.get_active()
        self.settings.style.set_int('cursor-shape', index)
682384
function setToolCursor(element, svgCursor) {
  if (!globalConfiguration.state.showSVGCursors) {
    return;
  }
  // TODO: (state vs options) Exit if cursor wasn't updated
  // TODO: Exit if invalid options to create cursor

  // Note: Max size of an SVG cursor is 128x128, default is 32x32.
  const cursorBlob = svgCursor.getIconWithPointerSVG();
  const mousePoint = svgCursor.mousePoint;

  const svgCursorUrl = window.URL.createObjectURL(cursorBlob);
  element.style.cursor = `url('${svgCursorUrl}') ${mousePoint}, auto`;

  state.svgCursorUrl = svgCursorUrl;
}
133668
public void setOnmouseover(java.lang.String onmouseover) {
        getStateHelper().put(PropertyKeys.onmouseover, onmouseover);
        handleAttribute("onmouseover", onmouseover);
    }
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);
		}
	}
30695
private void addText(TextCursor cursor, int limit, ArrayList<MDText> elements) {
        if (cursor.currentOffset < limit) {
            elements.add(new MDRawText(cursor.text.substring(cursor.currentOffset, limit)));
            cursor.currentOffset = limit;
        }
    }
441577
private void changeCursor(@Nullable Cursor newCursor) {
        Cursor oldCursor = mCursor;
        if (mCursor != newCursor) {
            int oldSize = 0;
            int deltaSize = 0;
            if (oldCursor != null) {
                int oldCount = oldCursor.getCount();
                oldSize = oldCount;
                deltaSize -= oldCount;
                oldCursor.close();
            }
            mCursor = newCursor;
            int newSize = 0;
            if (newCursor != null) {
                int newCount = newCursor.getCount();
                deltaSize += newCount;
                newSize = newCount;
            }
            updateCursorObserver();
            int changed = min(oldSize, newSize);
            if (changed > 0) {
                notifyItemRangeChanged(0, changed);
            }
            if (deltaSize < 0) {
                notifyItemRangeRemoved(oldSize + deltaSize, abs(deltaSize));
            } else if (deltaSize > 0) {
                notifyItemRangeInserted(oldSize, abs(deltaSize));
            }
        }
    }
1129925
protected void setComponentCursor (Component comp)
    {
        Cursor c = comp.getCursor();
        if (c != _curCursor) {
            assertComponentCursorCleared();
            _lastComp = comp;
            _oldCursor = comp.isCursorSet() ? c : null;
            comp.setCursor(_curCursor);
        }
    }