/* $Id$
 *
 * Copyright (c) 1998 Xenonsoft Limited. All Rights Reserved.
 *
 * This software is protected by copyright. You are hereby notified from
 * now by reading this message. This software is also the confidential 
 * and proprietary information of Xenonsoft Limited.  ("Confidential
 * Information"). You are NOT permitted to publish or disclose such
 * Confidential Information, in anyway. Moreover, this software must be
 * used in accordance with, and in compliance of, the license agreement
 * you entered with Xenonsoft.
 */

// RowColumnConstraint.java

// Description:
//	
// Author:
//	Peter Pilgrim
//	Tue Aug 18 14:49:26 BST 1998
// 
// RCS HEADER ``RowColumnConstraints.java''
// 
// $Author$
// $Date$
// $Source$
// $Revision$    $State$    $Locker$
//
// History 
// ================================================================================
//	$Log$

package xenon.swing;

import java.lang.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;

public class RowColumnConstraints implements Cloneable, java.io.Serializable
{
    public Insets	insets;			// Insets TBA
    public int		ipadx, ipady;		// Padded rectangle TBA
    
    protected int	tempX, tempY;		// The kid's temporary (X,Y)
    protected int	tempWidth, tempHeight;	// temporary dimension during layouts
    protected int	prefWidth, prefHeight;	// preferred dimension of the kid
    
    public int		visited;		// counter: number times we visited
    
    public RowColumnConstraints()
    {
	insets = new Insets(0, 0, 0, 0);
	resetConstraints();
    }

    public void resetConstraints()
    {
	ipadx = 0;
	ipady = 0;
	visited	= 0;
    }
    
    synchronized public RowColumnConstraints setInsets( Insets insets )
    {
	this.insets = insets;
	return (this);	
    }
    
    synchronized public Insets getInsets()
    {
	return (insets);
    }

    public Object clone () {
	try { 
	    RowColumnConstraints c = (RowColumnConstraints)super.clone();
	    c.insets = (Insets)insets.clone();
	    return c;
	} 
	catch (CloneNotSupportedException e) { 
	    // this shouldn't happen, since we are Cloneable
	    throw new InternalError();
	}
    }
}

// fini
