33 import java.awt.Component;
34 import java.awt.ComponentOrientation;
35 import java.awt.Rectangle;
36 import java.awt.Insets;
37 import java.awt.LayoutManager;
38 import java.awt.Point;
39
40 import java.io.ObjectOutputStream;
41 import java.io.IOException;
42
43 import java.beans.PropertyChangeEvent;
44 import java.beans.PropertyChangeListener;
45 import java.beans.Transient;
46
47 /**
48 * Provides a scrollable view of a lightweight component.
49 * A <code>JScrollPane</code> manages a viewport, optional
50 * vertical and horizontal scroll bars, and optional row and
51 * column heading viewports.
52 * You can find task-oriented documentation of <code>JScrollPane</code> in
53 * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html">How to Use Scroll Panes</a>,
54 * a section in <em>The Java Tutorial</em>. Note that
55 * <code>JScrollPane</code> does not support heavyweight components.
56 * <p>
57 * <TABLE ALIGN="RIGHT" BORDER="0" SUMMARY="layout">
58 * <TR>
59 * <TD ALIGN="CENTER">
60 * <P ALIGN="CENTER"><IMG SRC="doc-files/JScrollPane-1.gif"
61 * alt="The following text describes this image."
62 * WIDTH="256" HEIGHT="248" ALIGN="BOTTOM" BORDER="0">
63 * </TD>
64 * </TR>
65 * </TABLE>
66 * The <code>JViewport</code> provides a window,
67 * or "viewport" onto a data
68 * source -- for example, a text file. That data source is the
69 * "scrollable client" (aka data model) displayed by the
70 * <code>JViewport</code> view.
71 * A <code>JScrollPane</code> basically consists of <code>JScrollBar</code>s,
72 * a <code>JViewport</code>, and the wiring between them,
73 * as shown in the diagram at right.
|
33 import java.awt.Component;
34 import java.awt.ComponentOrientation;
35 import java.awt.Rectangle;
36 import java.awt.Insets;
37 import java.awt.LayoutManager;
38 import java.awt.Point;
39
40 import java.io.ObjectOutputStream;
41 import java.io.IOException;
42
43 import java.beans.PropertyChangeEvent;
44 import java.beans.PropertyChangeListener;
45 import java.beans.Transient;
46
47 /**
48 * Provides a scrollable view of a lightweight component.
49 * A <code>JScrollPane</code> manages a viewport, optional
50 * vertical and horizontal scroll bars, and optional row and
51 * column heading viewports.
52 * You can find task-oriented documentation of <code>JScrollPane</code> in
53 * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/scrollpane.html">How to Use Scroll Panes</a>,
54 * a section in <em>The Java Tutorial</em>. Note that
55 * <code>JScrollPane</code> does not support heavyweight components.
56 * <p>
57 * <TABLE ALIGN="RIGHT" BORDER="0" SUMMARY="layout">
58 * <TR>
59 * <TD ALIGN="CENTER">
60 * <P ALIGN="CENTER"><IMG SRC="doc-files/JScrollPane-1.gif"
61 * alt="The following text describes this image."
62 * WIDTH="256" HEIGHT="248" ALIGN="BOTTOM" BORDER="0">
63 * </TD>
64 * </TR>
65 * </TABLE>
66 * The <code>JViewport</code> provides a window,
67 * or "viewport" onto a data
68 * source -- for example, a text file. That data source is the
69 * "scrollable client" (aka data model) displayed by the
70 * <code>JViewport</code> view.
71 * A <code>JScrollPane</code> basically consists of <code>JScrollBar</code>s,
72 * a <code>JViewport</code>, and the wiring between them,
73 * as shown in the diagram at right.
|