/*
 * @(#)ElbowTextLocator.java 5.1
 *
 */

package CH.ifa.draw.figures;

import java.awt.Point;

import CH.ifa.draw.standard.AbstractLocator;
import de.renew.draw.storables.api.StorableApi;
import de.renew.draw.storables.ontology.Figure;

/**
 * A locator that allows locating a point 10 pixels above the center of a Figure.
 * @deprecated This class is not to be used externally. Please use the methods in {@link StorableApi} instead.
 */
@Deprecated(since = "5.0", forRemoval = true)
public class ElbowTextLocator extends AbstractLocator {

    /**
     * Creates a new ElbowTextLocator.
     * @deprecated This constructor is not to be used externally. Please use the method {@link StorableApi#createElbowTextLocator()} instead.
     */
    @Deprecated(since = "5.0", forRemoval = true)
    public ElbowTextLocator() {
        super();
    }

    @Override
    public Point locate(Figure owner) {
        Point p = owner.center();
        return new Point(p.x, p.y - 10); // hack
    }
}