import java.awt.*;
import javax.swing.*;


/**
 * The requirements of a container that uses the MVC pattern
 * for layout.
 *
 * @version 1.0
 * @author  Prof. David Bernstein, James Madison University
 */
public interface JContainerModel
{
    /**
     * Gets a component in this container.
     *
     * @param name   The name of the component
     * @return       The component (or null)
     */
    public abstract JComponent getComponentNamed(String name);

    /**
     * Set the view associated with this container
     *
     * @param view   The view
     */
    public abstract void setJContainerView(JContainerView view);


    // These methods are implement by Container objects
    // and are included as part of this interface for
    // convenience
    public abstract Component add(Component comp);
    public abstract Component add(Component comp, int index);
    public abstract void      add(Component comp, Object constraints);
    public abstract Component add(String    name, Component comp);
    public abstract Color     getBackground();
    public abstract void      setFont(Font f);
    public abstract void      setLayout(LayoutManager mgr);
}
