blob: 3f8668e8772083828698bbafe6a5937f13069300 [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Florian Pirchner <florian.pirchner@gmail.com> - Initial implementation
*/
package org.eclipse.osbp.vaadin.addons.absolutelayout.client;
// TODO: Auto-generated Javadoc
/**
* Defines the x and y pixel to the next snapping position. Location defines the
* type of resizing operation done.
*/
public class OAlignmentSnapInfo {
/** The x. */
private final int x;
/** The y. */
private final int y;
/** The location. */
private final OResizeLocation location;
/**
* Instantiates a new o alignment snap info.
*
* @param x the x
* @param y the y
*/
public OAlignmentSnapInfo(int x, int y) {
super();
this.x = x;
this.y = y;
this.location = null;
}
/**
* Instantiates a new o alignment snap info.
*
* @param x the x
* @param y the y
* @param location the location
*/
public OAlignmentSnapInfo(int x, int y, OResizeLocation location) {
super();
this.x = x;
this.y = y;
this.location = location;
}
/**
* X value is delta from dragElement - absoluteLayout#child. A negative
* value means, that the dragged element is more left (left is smaller) then
* the child from absolute layout.
*
* @return the x
*/
public int getX() {
return x;
}
/**
* Y value is delta from dragElement - absoluteLayout#child. A negative
* value means, that the dragged element is more top (top is smaller) then
* the child from absolute layout.
*
* @return the y
*/
public int getY() {
return y;
}
/**
* Gets the location.
*
* @return the location
*/
public OResizeLocation getLocation() {
return location;
}
}