package relative;

import java.awt.Component;

/**
 * Represents a rectangle on the screen using thousandths of the dimensions of
 * the container.
 */
public class RelativePlacement
{
    /**
     * The x location in thousandths of the container's width.
     */
    public int xLoc;

    /**
    * The y location in thousandths of the container's height.
    */
    public int yLoc;

    /**
    * The x dimension in thousandths of the container's width.
    */
    public int width;

    /**
    * The y dimension in thousandths of the container's height.
    */
    public int height;

    /**
     * Once a component is placed this will be set by the layout manager
     * to bind the component and coordinates for storage.
     */
    protected Component component;

    /**
     * Constructs a RelativePlacement with the given dimensions.
     * @param x The x location
     * @param y The y location
     * @param w The width
     * @param h The height
     */
    public RelativePlacement(int x, int y, int w, int h)
    {
        xLoc = x;
        yLoc = y;
        width = w;
        height = h;
    }
}
