001/*
002 * (C) Copyright 2006-2008 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     troger
018 *
019 * $Id$
020 */
021
022package org.nuxeo.ecm.platform.pictures.tiles.gwt.client.util;
023
024/**
025 * @author <a href="mailto:troger@nuxeo.com">Thomas Roger</a>
026 */
027public class Point {
028
029    private int x;
030
031    private int y;
032
033    public Point(int x, int y) {
034        this.x = x;
035        this.y = y;
036    }
037
038    public Point() {
039        this(0, 0);
040    }
041
042    public void move(int x, int y) {
043        this.x += x;
044        this.y += y;
045    }
046
047    public void setLocation(int x, int y) {
048        this.x = x;
049        this.y = y;
050    }
051
052    /**
053     * @return the x.
054     */
055    public int getX() {
056        return x;
057    }
058
059    /**
060     * @return the y.
061     */
062    public int getY() {
063        return y;
064    }
065
066}