import java.awt.*;

class formbase extends Panel{
	public String id;
	public formbase parent;
	public boolean modified;
	public int stretch_mode;
	public static final int STRETCH_NONE=0;
	public static final int STRETCH_LOOK=1;		// Accept to stretch itself
												// to enhance the look
	public static final int STRETCH_INFO=2;		// Has stretchable information
	public formbase(formbase _parent, String _id){
		parent = _parent;
		id = _id;
		modified = true;
	 	stretch_mode = STRETCH_NONE;
		setFont(new Font("Helvetica", Font.PLAIN, 14));
	}
	// Compute the path of a form, by appending the IDs of the parents
	public static String getabspath(formbase p){
		String ret = p.id;
		if (p.parent != null){
			ret = getabspath(p.parent) + "." + p.id;
		}
		return ret;
	}
	public boolean may_stretch(){
		return stretch_mode != STRETCH_NONE;
	}
	public void stretch (int new_width, int new_height){
	}
	public boolean was_modified(){
		return modified;
	}
	public void set_modified(){
		modified = true;
		if (parent != null) parent.set_modified();
	}
	public void dump(){
		System.err.println ("dump not redefined");
	}
	public Frame getframe(){
		Frame ret = null;
		if (parent == null){
			mainform mf = (mainform)this;
			ret = mf.fram;
		}else{
			ret = parent.getframe();
		}
		return ret;
	}
	public mainform gettop(){
		mainform ret = null;
		if (parent == null){
			ret = (mainform)this;
		}else{
			ret = parent.gettop();
		}
		return ret;
	}
}

