Handles the click event for sibling resources check box.<p>

@param event the click event

@see com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event.dom.client.ClickEvent)
483118
@UiHandler("m_checkboxSiblings")
    protected void onSiblingClick(ClickEvent event) {

        if (!m_showResources) {
            return;
        }
        m_publishDialog.setIncludeSiblings(m_checkboxSiblings.isChecked());
        m_publishDialog.updateResourceList();
    }
1175975
public void onClick(MenuItemClickEvent event) {
		if (editController.getInfoLabel() == null) {
			editController.showGeometricInfo();
		} else {
			editController.hideGeometricInfo();
		}
	}
359251
public void onDoubleClick(DoubleClickEvent event) {
		//Check if there was a last click that was handled in this class.
		if (null != lastClickPosition) {
			// Zoom in on the event location.
			Bbox bounds = mapWidget.getMapModel().getMapView().getBounds();
			double x = lastClickPosition.getX() - (bounds.getWidth() / 4);
			double y = lastClickPosition.getY() - (bounds.getHeight() / 4);
			Bbox newBounds = new Bbox(x, y, bounds.getWidth() / 2, bounds.getHeight() / 2);
			mapWidget.getMapModel().getMapView().applyBounds(newBounds, ZoomOption.LEVEL_CHANGE);
		}
	}
1140034
private void handleEvent(XMLEvent event) {
    if(event.getEventType() == XMLStreamConstants.CHARACTERS) {
      Characters c = event.asCharacters();
      lastContents += c.getData();
    } else if(event.getEventType() == XMLStreamConstants.START_ELEMENT
        && isSpreadsheetTag(event.asStartElement().getName())) {
      StartElement startElement = event.asStartElement();
      String tagLocalName = startElement.getName().getLocalPart();

      if("row".equals(tagLocalName)) {
        Attribute rowNumAttr = startElement.getAttributeByName(new QName("r"));
        int rowIndex = currentRowNum;
        if(rowNumAttr != null) {
          rowIndex = Integer.parseInt(rowNumAttr.getValue()) - 1;
          currentRowNum = rowIndex;
        }
        Attribute isHiddenAttr = startElement.getAttributeByName(new QName("hidden"));
        boolean isHidden = isHiddenAttr != null && ("1".equals(isHiddenAttr.getValue()) || "true".equals(isHiddenAttr.getValue()));
        currentRow = new StreamingRow(rowIndex, isHidden);
        currentColNum = firstColNum;
      } else if("col".equals(tagLocalName)) {
        Attribute isHiddenAttr = startElement.getAttributeByName(new QName("hidden"));
        boolean isHidden = isHiddenAttr != null && ("1".equals(isHiddenAttr.getValue()) || "true".equals(isHiddenAttr.getValue()));
        if(isHidden) {
          Attribute minAttr = startElement.getAttributeByName(new QName("min"));
          Attribute maxAttr = startElement.getAttributeByName(new QName("max"));
          int min = Integer.parseInt(minAttr.getValue()) - 1;
          int max = Integer.parseInt(maxAttr.getValue()) - 1;
          for(int columnIndex = min; columnIndex <= max; columnIndex++)
            hiddenColumns.add(columnIndex);
        }
      } else if("c".equals(tagLocalName)) {
        Attribute ref = startElement.getAttributeByName(new QName("r"));

        if(ref != null) {
          String[] coord = splitCellRef(ref.getValue());
          currentColNum = CellReference.convertColStringToIndex(coord[0]);
          currentCell = new StreamingCell(currentColNum, Integer.parseInt(coord[1]) - 1, use1904Dates);
        } else {
          currentCell = new StreamingCell(currentColNum, currentRowNum, use1904Dates);
        }
        setFormatString(startElement, currentCell);

        Attribute type = startElement.getAttributeByName(new QName("t"));
        if(type != null) {
          currentCell.setType(type.getValue());
        } else {
          currentCell.setType("n");
        }

        Attribute style = startElement.getAttributeByName(new QName("s"));
        if(style != null) {
          String indexStr = style.getValue();
          try {
            int index = Integer.parseInt(indexStr);
            currentCell.setCellStyle(stylesTable.getStyleAt(index));
          } catch(NumberFormatException nfe) {
            log.warn("Ignoring invalid style index {}", indexStr);
          }
        } else {
          currentCell.setCellStyle(stylesTable.getStyleAt(0));
        }
      } else if("dimension".equals(tagLocalName)) {
        Attribute refAttr = startElement.getAttributeByName(new QName("ref"));
        String ref = refAttr != null ? refAttr.getValue() : null;
        if(ref != null) {
          // ref is formatted as A1 or A1:F25. Take the last numbers of this string and use it as lastRowNum
          for(int i = ref.length() - 1; i >= 0; i--) {
            if(!Character.isDigit(ref.charAt(i))) {
              try {
                lastRowNum = Integer.parseInt(ref.substring(i + 1)) - 1;
              } catch(NumberFormatException ignore) { }
              break;
            }
          }
          for(int i = 0; i < ref.length(); i++) {
            if(!Character.isAlphabetic(ref.charAt(i))) {
              firstColNum = CellReference.convertColStringToIndex(ref.substring(0, i));
              break;
            }
          }
        }
      } else if("f".equals(tagLocalName)) {
        if (currentCell != null) {
          currentCell.setFormulaType(true);
        }
      }

      // Clear contents cache
      lastContents = "";
    } else if(event.getEventType() == XMLStreamConstants.END_ELEMENT
        && isSpreadsheetTag(event.asEndElement().getName())) {
      EndElement endElement = event.asEndElement();
      String tagLocalName = endElement.getName().getLocalPart();

      if("v".equals(tagLocalName) || "t".equals(tagLocalName)) {
        currentCell.setRawContents(unformattedContents());
        currentCell.setContentSupplier(formattedContents());
      } else if("row".equals(tagLocalName) && currentRow != null) {
        rowCache.add(currentRow);
        currentRowNum++;
      } else if("c".equals(tagLocalName)) {
        currentRow.getCellMap().put(currentCell.getColumnIndex(), currentCell);
        currentCell = null;
        currentColNum++;
      } else if("f".equals(tagLocalName)) {
        if (currentCell != null) {
          currentCell.setFormula(lastContents);
        }
      }

    }
  }
466795
public static ClickHandler onClick (final Command onClick)
    {
        return (onClick == null) ? null : new ClickHandler() {
            public void onClick (ClickEvent event) {
                onClick.execute();
            }
        };
    }
901395
@Override
    public void onBrowserEvent(Event event) {

        switch (DOM.eventGetType(event)) {
            case Event.ONMOUSEUP:
                Event.releaseCapture(getElement());
                m_capturedMouse = false;
                break;
            case Event.ONMOUSEDOWN:
                Event.setCapture(getElement());
                m_capturedMouse = true;
                //$FALL-THROUGH$
            case Event.ONMOUSEMOVE:
                if (m_capturedMouse) {
                    event.preventDefault();
                    double abolut_top = getAbsoluteTop();
                    int y = ((event.getClientY() - (int)abolut_top) + Window.getScrollTop());
                    setSliderPosition(y);
                    if (m_parent != null) {
                        m_parent.onBarSelected(y);
                    }
                }
                //$FALL-THROUGH$
            default:

        }
    }
678973
@FXML
    private void send_btn_on_click(ActionEvent event) {
        // Future proof for other uses of send event handler
        if (this.dialogType == DialogType.INPUT_TEXT) {
            this.textEntry = this.inputTextField.getText();
        }

        setResponse(DialogResponse.SEND);
        close();
    }
446956
@UiHandler("m_checkboxRelated")
    protected void onRelatedClick(ClickEvent event) {

        if (!m_showResources) {
            return;
        }
        m_publishDialog.setIncludeRelated(m_checkboxRelated.isChecked());
        m_publishDialog.updateResourceList();
    }
431846
private void handleEvent(PrimitiveEvent event) {
    log.trace("Received {}", event);
    Set<Consumer<PrimitiveEvent>> listeners = eventListeners.get(event.type());
    if (listeners != null) {
      listeners.forEach(l -> l.accept(event));
    }
  }
889859
protected void onMouseWheelScroll(Event event) {

        int scrollStep = event.getMouseWheelVelocityY() * 5;
        Element scrollTarget;
        if (getCurrentTarget() != null) {
            scrollTarget = getCurrentTarget().getElement();
        } else {
            scrollTarget = RootPanel.getBodyElement();
        }
        while ((scrollTarget.getScrollHeight() == scrollTarget.getClientHeight())
            && (scrollTarget != RootPanel.getBodyElement())) {
            scrollTarget = scrollTarget.getParentElement();
        }
        if (scrollTarget == RootPanel.getBodyElement()) {
            int top = Window.getScrollTop() + scrollStep;
            int left = Window.getScrollLeft();
            if (top < 0) {
                top = 0;
            }
            Window.scrollTo(left, top);
        } else {
            int top = scrollTarget.getScrollTop() + scrollStep;
            if (top < 0) {
                top = 0;
            }
            scrollTarget.setScrollTop(top);
        }
        onMove(event);
    }
402916
@EventHandler("command")
    private void onCommand(CommandEvent event) {
        if (isEnabled()) {
            for (BaseComponent child : container.getChildren()) {
                EventUtil.send(event, child);

                if (event.isStopped()) {
                    break;
                }
            }
        }
    }
799407
public void onSelectionChanged(SelectionEvent event) {
		Record record = event.getRecord();
		String featureId = record.getAttribute(FIELD_NAME_FEATURE_ID);

		// Check if selection and deselection are really necessary, to avoid useless events.
		if (event.getState()) {
			// Only select a feature if it is not yet selected:
			if (!layer.isFeatureSelected(featureId)) {
				layer.getFeatureStore().getFeature(featureId, GeomajasConstant.FEATURE_INCLUDE_ALL,
						new LazyLoadCallback() {

							public void execute(List<Feature> response) {
								layer.selectFeature(response.get(0));
							}
						});
			}
		} else {
			// Only deselect a feature if it is not yet deselected:
			if (layer.isFeatureSelected(featureId)) {
				layer.getFeatureStore().getFeature(featureId, GeomajasConstant.FEATURE_INCLUDE_ALL,
						new LazyLoadCallback() {

							public void execute(List<Feature> response) {
								layer.deselectFeature(response.get(0));
							}
						});
			}
		}
	}
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;
	}
730610
protected void fireEvent(E event) {

    for (L listener : this.listeners) {
      try {
        fireEvent(event, listener);
      } catch (RuntimeException e) {
        handleListenerError(listener, event, e);
      }
    }
  }
664045
@Override
    public void onSelection(SelectionEvent<MaterialStep> event) {
        if (stepSkippingAllowed) {
            if (event.getSelectedItem().getState() == State.SUCCESS) {
                goToStep(event.getSelectedItem());
            }
        }
    }
929713
public <T> void handleEvent(final T event) throws EventException {
		final Class<?> type = event.getClass();
		if (!this.cachedListeners.containsKey(event.getClass())) {
			this.cachedListeners.put(type, new LinkedList<ListenerInstancePair<?>>());
			for (final ListenerInstancePair<?> listener : this.listeners) {
				final Type observableType = GenericsUtil.getEntityGenericType(listener.listener.getClass(), 0, Listener.class);
				final Class<?> observable = GenericsUtil.guessClazz(observableType);
				if (observable.isAssignableFrom(type)) {
					this.cachedListeners.get(type).add(listener);
				}
			}
		}
		@SuppressWarnings("unchecked")
		final List<ListenerInstancePair<T>> resolvedListeners = List.class.cast(this.cachedListeners.get(event.getClass()));
		for (final ListenerInstancePair<T> listener : resolvedListeners) {
			listener.handleEvent(event, null);
		}
	}
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);
		}
	}