< prev index next >

src/java.desktop/share/classes/javax/swing/JScrollPane.java

Print this page




  38 
  39 import java.io.ObjectOutputStream;
  40 import java.io.IOException;
  41 
  42 import java.beans.JavaBean;
  43 import java.beans.BeanProperty;
  44 import java.beans.PropertyChangeEvent;
  45 import java.beans.PropertyChangeListener;
  46 import java.beans.Transient;
  47 
  48 /**
  49  * Provides a scrollable view of a lightweight component.
  50  * A <code>JScrollPane</code> manages a viewport, optional
  51  * vertical and horizontal scroll bars, and optional row and
  52  * column heading viewports.
  53  * You can find task-oriented documentation of <code>JScrollPane</code> in
  54  *  <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/scrollpane.html">How to Use Scroll Panes</a>,
  55  * a section in <em>The Java Tutorial</em>.  Note that
  56  * <code>JScrollPane</code> does not support heavyweight components.
  57  *
  58  * <TABLE STYLE="FLOAT:RIGHT" BORDER="0" SUMMARY="layout">

  59  *    <TR>
  60  *    <TD style="text-align:center">
  61  *      <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/JScrollPane-1.gif"
  62  *      alt="The following text describes this image."
  63  *      WIDTH="256" HEIGHT="248" STYLE="FLOAT:BOTTOM; BORDER:0px">
  64  *    </TD>
  65  *    </TR>
  66  * </TABLE>
  67  * The <code>JViewport</code> provides a window,
  68  * or &quot;viewport&quot; onto a data
  69  * source -- for example, a text file. That data source is the
  70  * &quot;scrollable client&quot; (aka data model) displayed by the
  71  * <code>JViewport</code> view.
  72  * A <code>JScrollPane</code> basically consists of <code>JScrollBar</code>s,
  73  * a <code>JViewport</code>, and the wiring between them,
  74  * as shown in the diagram at right.
  75  * <p>
  76  * In addition to the scroll bars and viewport,
  77  * a <code>JScrollPane</code> can have a
  78  * column header and a row header. Each of these is a




  38 
  39 import java.io.ObjectOutputStream;
  40 import java.io.IOException;
  41 
  42 import java.beans.JavaBean;
  43 import java.beans.BeanProperty;
  44 import java.beans.PropertyChangeEvent;
  45 import java.beans.PropertyChangeListener;
  46 import java.beans.Transient;
  47 
  48 /**
  49  * Provides a scrollable view of a lightweight component.
  50  * A <code>JScrollPane</code> manages a viewport, optional
  51  * vertical and horizontal scroll bars, and optional row and
  52  * column heading viewports.
  53  * You can find task-oriented documentation of <code>JScrollPane</code> in
  54  *  <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/scrollpane.html">How to Use Scroll Panes</a>,
  55  * a section in <em>The Java Tutorial</em>.  Note that
  56  * <code>JScrollPane</code> does not support heavyweight components.
  57  *
  58  * <table class="borderless" style="float:right">
  59  * <caption>Example</caption>
  60  *    <TR>
  61  *    <TD style="text-align:center">
  62  *      <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/JScrollPane-1.gif"
  63  *      alt="The following text describes this image."
  64  *      WIDTH="256" HEIGHT="248" STYLE="FLOAT:BOTTOM; BORDER:0px">
  65  *    </TD>
  66  *    </TR>
  67  * </TABLE>
  68  * The <code>JViewport</code> provides a window,
  69  * or &quot;viewport&quot; onto a data
  70  * source -- for example, a text file. That data source is the
  71  * &quot;scrollable client&quot; (aka data model) displayed by the
  72  * <code>JViewport</code> view.
  73  * A <code>JScrollPane</code> basically consists of <code>JScrollBar</code>s,
  74  * a <code>JViewport</code>, and the wiring between them,
  75  * as shown in the diagram at right.
  76  * <p>
  77  * In addition to the scroll bars and viewport,
  78  * a <code>JScrollPane</code> can have a
  79  * column header and a row header. Each of these is a


< prev index next >