All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jhotdraw.draw.locator.Locator Maven / Gradle / Ivy

The newest version!
/*
 * @(#)Locator.java
 *
 * Copyright (c) 1996-2010 by the original authors of JHotDraw and all its
 * contributors. All rights reserved.
 *
 * You may not use, copy or modify this file, except in compliance with the 
 * license agreement you entered into with the copyright holders. For details
 * see accompanying license terms.
 */


package org.jhotdraw.draw.locator;

import org.jhotdraw.draw.*;
import java.awt.geom.*;

/**
 * A locator encapsulates a strategy for locating a point on a
 * {@link Figure}.
 *
 * 
* Design Patterns * *

Strategy
* {@code Locator} encapsulates a strategy for locating a point on a * {@code Figure}.
* Strategy: {@link Locator}; Context: {@link Figure}. *


* * @author Werner Randelshofer * @version $Id: Locator.java 718 2010-11-21 17:49:53Z rawcoder $ */ public interface Locator { /** * Locates a position on the provided figure. * @return a point on the figure. */ public Point2D.Double locate(Figure owner); /** * Locates a position on the provided figure relative to the dependent * figure. * @return a point on the figure. */ public Point2D.Double locate(Figure owner, Figure dependent); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy