1 /*******************************************************************************
2 * Copyright (c) 2007, 2011 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.scenegraph.g2d.events.command;
14 import java.awt.geom.Point2D;
17 * @author Tuukka Lehtonen
19 public class ShowPopup extends Command {
21 private static final long serialVersionUID = 8693557919059826895L;
23 private Point2D controlPosition;
25 public ShowPopup(Point2D controlPosition) {
27 this.controlPosition = controlPosition;
30 public Point2D getControlPosition() {
31 return controlPosition;
35 public int hashCode() {
37 int result = super.hashCode();
38 result = prime * result + ((controlPosition == null) ? 0 : controlPosition.hashCode());
43 public boolean equals(Object obj) {
46 if (!super.equals(obj))
48 if (getClass() != obj.getClass())
50 ShowPopup other = (ShowPopup) obj;
51 if (controlPosition == null) {
52 if (other.controlPosition != null)
54 } else if (!controlPosition.equals(other.controlPosition))
60 public String toString() {
61 return super.toString() + "(" + controlPosition + ")";