//
// $Id: SafeScrollPane.java,v 1.3 2002/07/09 21:13:20 ray Exp $

package com.threerings.media;

import java.awt.Component;

import javax.swing.JScrollPane;
import javax.swing.JViewport;

/**
 * A scroll pane that is safe to use in frame managed views.
 */
public class SafeScrollPane extends JScrollPane
{
    public SafeScrollPane (Component view)
    {
        super(view);
    }

    protected JViewport createViewport ()
    {
        JViewport vp = new JViewport();
        vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE);
        return vp;
    }
}

//
// $Id: SafeScrollPane.java,v 1.4 2002/10/06 20:57:36 mdb Exp $

package com.threerings.media;

import java.awt.Component;

import javax.swing.JScrollPane;
import javax.swing.JViewport;

/**
 * A scroll pane that is safe to use in frame managed views.
 */
public class SafeScrollPane extends JScrollPane
{
    public SafeScrollPane ()
    {
    }

    public SafeScrollPane (Component view)
    {
        super(view);
    }

    protected JViewport createViewport ()
    {
        JViewport vp = new JViewport();
        vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE);
        return vp;
    }
}

Allow a safe scroll pane to be constructed without its viewport view (which should be set later via setViewportView()).
Allow a safe scroll pane to be constructed without its viewport view
(which should be set later via setViewportView()).


git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@1783 542714f4-19e9-0310-aa3c-eee0fc999fb1
