org.nakedobjects.nos.client.dnd.DragStart Maven / Gradle / Ivy
The newest version!
package org.nakedobjects.nos.client.dnd;
import org.nakedobjects.nof.core.util.ToString;
import org.nakedobjects.nos.client.dnd.drawing.Location;
import org.nakedobjects.nos.client.dnd.drawing.Offset;
public class DragStart extends PointerEvent {
private final Location location;
public DragStart(final Location location, final int mods) {
super(mods);
this.location = location;
}
public Location getLocation() {
return location;
}
public void subtract(final Location location) {
this.location.subtract(location);
}
public void subtract(final int x, final int y) {
location.subtract(x, y);
}
public void add(final Offset offset) {
location.add(offset.getDeltaX(), offset.getDeltaY());
}
public String toString() {
ToString str = new ToString(this);
str.append("location", location);
str.append("buttons", super.toString());
return str.toString();
}
}
// Copyright (c) Naked Objects Group Ltd.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy