Toggle a label that shows geometric information about the geometry being edited.

@param event
The {@link MenuItemClickEvent} from clicking the action.
772178
public void onClick(MenuItemClickEvent event) {
		if (editController.getEditMode() == EditMode.DRAG_MODE) {
			editController.setEditMode(EditMode.INSERT_MODE);
		} else {
			editController.setEditMode(EditMode.DRAG_MODE);
		}
	}
980823
function(event) {
        event = event || {};

        if (event.added) {
            this._renderSelectedItem(event.added);

            this._scrollToBottom();
        } else if (event.removed) {
            removeElement(this.$(getItemSelector(SELECTED_ITEM_SELECTOR, event.removed.id)));
        } else {
            this._forEachSelectedItem(removeElement);

            this._data.forEach(this._renderSelectedItem, this);

            this._updateInputWidth();
        }

        if (event.added || event.removed) {
            if (this.dropdown) {
                this.dropdown.showResults(this.filterResults(this.dropdown.results), {
                    hasMore: this.dropdown.hasMore
                });
            }

            if (!hasTouch) {
                this.focus();
            }
        }

        this.positionDropdown();

        this._updatePlaceholder();
    }
23152
public void onDoubleClick(DoubleClickEvent event) {
		tempLength = 0;
		mapWidget.unregisterWorldPaintable(distanceLine);
		mapWidget.unregisterWorldPaintable(lineSegment);
		distanceLine.setGeometry(null);
		lineSegment.setGeometry(null);
		if (panel != null) {
			panel.destroy();
		}
		dispatchState(State.STOP);
	}
68681
public void onClick(MenuItemClickEvent event) {
		FeatureTransaction featureTransaction = mapModel.getFeatureEditor().getFeatureTransaction();
		if (featureTransaction != null) {
			List<Activity> activities = new ArrayList<Activity>();
			activities.add(new ValidationActivity());
			activities.add(new CommitActivity());
			WorkflowProcessor processor = new SequenceProcessor(new MapModelWorkflowContext());
			processor.setDefaultErrorHandler(new WorkflowErrorHandler() {

				public void handleError(WorkflowContext context, Throwable throwable) {
					SC.warn(I18nProvider.getGlobal().saveEditingAborted() + throwable.getMessage());
				}
			});
			processor.setActivities(activities);
			processor.doActivities(mapModel);

			// Cleaning up duties: controller and MapWidget (if they're present)
			if (controller != null) {
				controller.cleanup();
			}
			if (mapWidget != null) {
				mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.DELETE);
			}
			mapModel.getFeatureEditor().stopEditing();
		}
	}
491624
@SuppressWarnings("unchecked")
    void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) {

        if (!event.isCtrlKey() && !event.isShiftKey()) {
            changeValueIfNotMultiSelect(itemId);
            // don't interfere with multi-selection using control key
            if (event.getButton().equals(MouseButton.RIGHT) || (propertyId == null)) {
                m_menu.setEntries(getMenuEntries(), (Set<String>)getValue());
                m_menu.openForTable(event, itemId, propertyId, this);
            } else if (event.getButton().equals(MouseButton.LEFT) && TableProperty.Name.equals(propertyId)) {
                String typeName = (String)itemId;
                openEditDialog(typeName);
            }
        }
    }
304542
protected void onMove(Event event) {

        m_clientX = event.getClientX();
        m_clientY = event.getClientY();
        checkTargets();
        positionHelper();
        scrollAction();
    }
991869
public void onClick(MenuItemClickEvent event) {
		Layer<?> layer = mapWidget.getMapModel().getSelectedLayer();
		if (layer != null && layer instanceof VectorLayer) {
			mapWidget.getMapModel().getFeatureEditor().startEditing(null, null);
			VectorLayer vLayer = (VectorLayer) layer;
			if (vLayer.getLayerInfo().getLayerType() == LayerType.POINT) {
				controller.setController(new PointEditController(mapWidget, controller));
			} else if (vLayer.getLayerInfo().getLayerType() == LayerType.LINESTRING) {
				controller.setController(new LineStringEditController(mapWidget, controller));
			} else if (vLayer.getLayerInfo().getLayerType() == LayerType.MULTILINESTRING) {
				controller.setController(new MultiLineStringEditController(mapWidget, controller));
			} else if (vLayer.getLayerInfo().getLayerType() == LayerType.POLYGON) {
				controller.setController(new PolygonEditController(mapWidget, controller));
			} else if (vLayer.getLayerInfo().getLayerType() == LayerType.MULTIPOLYGON) {
				controller.setController(new MultiPolygonEditController(mapWidget, controller));
			}
			controller.setEditMode(EditMode.INSERT_MODE);
		}
	}
868919
public void onGeometryEditMove(GeometryEditMoveEvent event) {
		// Find the elements that need updating:
		Map<GeometryIndex, Boolean> indicesToUpdate = new HashMap<GeometryIndex, Boolean>();
		for (GeometryIndex index : event.getIndices()) {
			if (!indicesToUpdate.containsKey(index)) {
				indicesToUpdate.put(index, false);
				if (!Geometry.POINT.equals(editService.getGeometry().getGeometryType())
						&& !Geometry.MULTI_POINT.equals(editService.getGeometry().getGeometryType())) {
					try {
						List<GeometryIndex> neighbors;
						switch (editService.getIndexService().getType(index)) {
							case TYPE_VERTEX:
								// Move current vertex to the back. This helps the delete operation.
								indicesToUpdate.put(index, true);
								neighbors = editService.getIndexService().getAdjacentEdges(event.getGeometry(), index);
								if (neighbors != null) {
									for (GeometryIndex neighborIndex : neighbors) {
										if (!indicesToUpdate.containsKey(neighborIndex)) {
											indicesToUpdate.put(neighborIndex, false);
										}
									}
								}

								neighbors = editService.getIndexService().getAdjacentVertices(event.getGeometry(),
										index);
								if (neighbors != null) {
									for (GeometryIndex neighborIndex : neighbors) {
										if (!indicesToUpdate.containsKey(neighborIndex)) {
											indicesToUpdate.put(neighborIndex, false);
										}
									}
								}
								break;
							case TYPE_EDGE:
								neighbors = editService.getIndexService().getAdjacentVertices(event.getGeometry(),
										index);
								if (neighbors != null) {
									for (GeometryIndex neighborIndex : neighbors) {
										if (!indicesToUpdate.containsKey(neighborIndex)) {
											indicesToUpdate.put(neighborIndex, false);
										}
									}
								}
								break;
							default:
						}
					} catch (GeometryIndexNotFoundException e) {
						throw new IllegalStateException(e);
					}
				}
			}
		}

		// Check if we need to draw the background (nice, but slows down):
		if (styleProvider.getBackgroundStyle() != null && styleProvider.getBackgroundStyle().getFillOpacity() > 0) {
			if (event.getGeometry().getGeometryType().equals(Geometry.POLYGON)) {
				update(null, false);
			} else if (event.getGeometry().getGeometryType().equals(Geometry.MULTI_POLYGON)
					&& event.getGeometry().getGeometries() != null) {
				for (int i = 0; i < event.getGeometry().getGeometries().length; i++) {
					GeometryIndex index = editService.getIndexService().create(GeometryIndexType.TYPE_GEOMETRY, i);
					indicesToUpdate.put(index, false);
				}
			}
		}

		// Next, redraw the list:
		for (GeometryIndex index : indicesToUpdate.keySet()) {
			update(index, indicesToUpdate.get(index));
		}
	}
201528
public void onClick(MenuItemClickEvent event) {
		final FeatureTransaction ft = mapWidget.getMapModel().getFeatureEditor().getFeatureTransaction();
		if (ft != null) {
			SimpleFeatureAttributeWindow window = new SimpleFeatureAttributeWindow(ft.getNewFeatures()[0]) {

				public void onOk(Feature feature) {
					// Copy the attributes to the real feature:
					// Don't overwrite the feature itself, as the GraphicsContext expects the same object for rendering!
					ft.getNewFeatures()[0].setAttributes(feature.getAttributes());
				}

				public void onClose() {
				}
			};
			window.show();
		}
	}
615449
public static Label makeActionLabel (Label label, ClickHandler onClick)
    {
        return makeActionable(label, onClick, null);
    }
604507
public void addVertexAction(final JsGeometryContextMenuAction action, String title) {
		delegate.addVertexAction(new GeometryContextMenuAction(title, null) {

			@Override
			public void onClick(MenuItemClickEvent event) {
				action.execute(JsGeometryContextMenuRegistry.this);

			}
		});
	}
1010735
public void onMouseDown(MouseDownEvent event) {
		Coordinate newCoords = getWorldPosition(event);
		geometry = factory.createPoint(newCoords);
	}
985585
def toggle(self, event):
        """"""

        if self.state < len(self.bitmap_list) - 1:
            self.state += 1
        else:
            self.state = 0

        self.SetBitmapLabel(self.bitmap_list[self.state])

        try:
            event.Skip()
        except AttributeError:
            pass

        """For compatibility with toggle buttons"""
        setattr(self, "GetToolState", lambda x: self.state)
1272
private void processLabelClicked(final String name, final ClickType clickType) {
            if (logger.isTraceEnabled()) {
                logger.trace("JS reports label {} clicked {}", name, clickType);
            }
            synchronized (mapCoordinateElements) {
                if (mapCoordinateElements.containsKey(name)) {
                    final MapCoordinateElement mapCoordinateElement = mapCoordinateElements.get(name).get();
                    if (mapCoordinateElement instanceof MapLabel) {
                        EventType<MapLabelEvent> eventType = null;
                        switch (clickType) {
                            case LEFT:
                                eventType = MapLabelEvent.MAPLABEL_CLICKED;
                                break;
                            case DOUBLE:
                                eventType = MapLabelEvent.MAPLABEL_DOUBLECLICKED;
                                break;
                            case RIGHT:
                                eventType = MapLabelEvent.MAPLABEL_RIGHTCLICKED;
                                break;
                            case MOUSEDOWN:
                                eventType = MapLabelEvent.MAPLABEL_MOUSEDOWN;
                                break;
                            case MOUSEUP:
                                eventType = MapLabelEvent.MAPLABEL_MOUSEUP;
                                break;
                            case ENTERED:
                                eventType = MapLabelEvent.MAPLABEL_ENTERED;
                                break;
                            case EXITED:
                                eventType = MapLabelEvent.MAPLABEL_EXITED;
                                break;
                        }
                        fireEvent(new MapLabelEvent(eventType, (MapLabel) mapCoordinateElement));
                    }
                }
            }
        }
725079
def toggle_codes(self, event):
        
        btn = event.GetEventObject()
        if btn.Label == 'Show method codes':
            self.code_msg_boxsizer.ShowItems(True)
            btn.SetLabel('Hide method codes')
        else:
            self.code_msg_boxsizer.ShowItems(False)
            btn.SetLabel('Show method codes')
        self.do_fit(None)
791463
public void onResize(final ResizeEvent event) {

        if ((m_selectedItem != null) && m_selectedItem.hasSubmenu()) {

            Scheduler.get().scheduleDeferred(new ScheduledCommand() {

                /**
                 * @see com.google.gwt.user.client.Command#execute()
                 */
                public void execute() {

                    getSelectedItem().getSubMenu().setSubMenuPosition(getSelectedItem());
                    getSelectedItem().getSubMenu().onResize(event);
                }
            });
        }
    }
203118
public void onGeometryEditMove(GeometryEditMoveEvent event) {
		
		// Find the elements that need updating:
		Map<GeometryIndex, Boolean> indicesToUpdate = new HashMap<GeometryIndex, Boolean>();
		for (GeometryIndex index : event.getIndices()) {
			if (!indicesToUpdate.containsKey(index)) {
				indicesToUpdate.put(index, false);
				if (!Geometry.POINT.equals(editingService.getGeometry().getGeometryType())
						&& !Geometry.MULTI_POINT.equals(editingService.getGeometry().getGeometryType())) {
					try {
						List<GeometryIndex> neighbors = null;
						switch (editingService.getIndexService().getType(index)) {
							case TYPE_VERTEX:
								// Move current vertex to the back. This helps the delete operation.
								indicesToUpdate.put(index, true);
								neighbors = editingService.getIndexService().getAdjacentEdges(event.getGeometry(),
										index);
								if (neighbors != null) {
									for (GeometryIndex neighborIndex : neighbors) {
										if (!indicesToUpdate.containsKey(neighborIndex)) {
											indicesToUpdate.put(neighborIndex, false);
										}
									}
								}

								neighbors = editingService.getIndexService().getAdjacentVertices(event.getGeometry(),
										index);
								if (neighbors != null) {
									for (GeometryIndex neighborIndex : neighbors) {
										if (!indicesToUpdate.containsKey(neighborIndex)) {
											indicesToUpdate.put(neighborIndex, false);
										}
									}
								}
								break;
							case TYPE_EDGE:
								neighbors = editingService.getIndexService().getAdjacentVertices(event.getGeometry(),
										index);
								if (neighbors != null) {
									for (GeometryIndex neighborIndex : neighbors) {
										if (!indicesToUpdate.containsKey(neighborIndex)) {
											indicesToUpdate.put(neighborIndex, false);
										}
									}
								}
								break;
							default:
						}
					} catch (GeometryIndexNotFoundException e) {
						throw new IllegalStateException(e);
					}
				}
			}
		}

		// Check if we need to draw the background (nice, but slows down):
		if (styleService.getBackgroundStyle() != null && styleService.getBackgroundStyle().getFillOpacity() > 0) {
			if (event.getGeometry().getGeometryType().equals(Geometry.POLYGON)) {
				org.geomajas.gwt.client.spatial.geometry.Geometry transformed = mapWidget.getMapModel()
						.getMapView().getWorldViewTransformer()
						.worldToPan(GeometryConverter.toGwt(event.getGeometry()));
				mapWidget.getVectorContext().drawPolygon(groups.get(baseName + ".background"), "background",
						(Polygon) transformed, styleService.getBackgroundStyle());
			} else if (event.getGeometry().getGeometryType().equals(Geometry.MULTI_POLYGON)
					&& event.getGeometry().getGeometries() != null) {
				for (int i = 0; i < event.getGeometry().getGeometries().length; i++) {
					Geometry polygon = event.getGeometry().getGeometries()[i];

					org.geomajas.gwt.client.spatial.geometry.Geometry transformed = mapWidget.getMapModel()
							.getMapView().getWorldViewTransformer().worldToPan(GeometryConverter.toGwt(polygon));
					mapWidget.getVectorContext().drawPolygon(
							groups.get(baseName + ".geometry" + i + ".background"), "background",
							(Polygon) transformed, styleService.getBackgroundStyle());
				}
			}
		}

		// Next, redraw the list:
		for (GeometryIndex index : indicesToUpdate.keySet()) {
			update(event.getGeometry(), index, indicesToUpdate.get(index));
		}

	}