package cnp.ew.displayer;
import java.awt.*;
import cnp.ew.layout.*;
import cnp.ew.lightweight.*;
/**
 * Any object that can be displayed within a rectangular area should
 * implement this interface. Note: coordinates are always in the
 * coordinates of the component that owns the graphics.
 *
 * @version        $Version$
 * @author         $Author: Ken $
 */
public interface CpDisplayable
{

    /**
     * Display the object using g in r.
     */
    public void paintIn(CpLightweightComponent c, Graphics g, Rectangle r);

    /**
     * Display the object using g in the rectangle defined
     * by x,y with width w and height h.
     */
    public void paintIn(CpLightweightComponent c, Graphics g, int x, int y, int w, int h);

    public Dimension preferredSize(CpLightweightComponent c);

}