import netscape_beta.application.*;
import netscape_beta.util.*;

/**
 * A class that provides a scrolling view of a DemClassView
 *
 * @version        1.0 12 Dec 1996
 * @author         Andrew Miller
 */
public class DemScrollVisitorView extends ScrollGroup
{
  private DemVisitorView m_viewVisitor  = null;
  protected DemDoc m_doc            = null;

    /**
     * Construct a DemScrollVisitorView with the given bounds in 
     * the specified parent displaying the visitors of the 
     * specified doc.
     * @param rcView            The window's bounds.
     * @param parent            The window's parent
     * @param doc               Document to display.
     */
  public DemScrollVisitorView(Rect rcView, View parent, DemDoc doc)
  {
       super(rcView);

       Rect rcContent = new Rect(0,0,rcView.width, rcView.height);

       m_viewVisitor = new DemVisitorView(rcContent, this, doc);

       setContentView(m_viewVisitor);
       setHasVertScrollBar(true);
       setHasHorizScrollBar(true);

       setHorizResizeInstruction(0);
       parent.addSubview(this);
  }

    /**
     * Provides access to the DemVisitorView
     * @return           The DemVisitorView being scrolled.
     */
  public DemVisitorView getVisitorView()
  {
     return m_viewVisitor;
  }

    /**
     * Inform the DemScrollVisitorView that it's contents
     * have been resized.
     */
  public void updateScrolls()
  {
     scrollView().subviewDidResize(contentView());
  }

}

