<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jun 29 05:55:02 GMT+01:00 1999 -->
<TITLE>
Swing 1.1 API Specification: Interface  Scrollable
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/Scrollable.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/swing/RootPaneContainer.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/swing/ScrollPaneConstants.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Scrollable.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.swing</FONT>
<BR>
Interface  Scrollable</H2>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../javax/swing/text/JTextComponent.html">JTextComponent</A>, <A HREF="../../javax/swing/JTree.html">JTree</A>, <A HREF="../../javax/swing/JTable.html">JTable</A>, <A HREF="../../javax/swing/JList.html">JList</A></DD>
</DL>
<HR>
<DL>
<DT>public abstract interface <B>Scrollable</B></DL>

<P>
An interface that provides information to a scrolling container
 like JScrollPane.  A complex component that's likely to be used 
 as a viewin a JScrollPane viewport (or other scrolling container) 
 should implement this interface.
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../javax/swing/JViewport.html"><CODE>JViewport</CODE></A>, 
<A HREF="../../javax/swing/JScrollPane.html"><CODE>JScrollPane</CODE></A>, 
<A HREF="../../javax/swing/JScrollBar.html"><CODE>JScrollBar</CODE></A></DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->


<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.awt.Dimension</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Scrollable.html#getPreferredScrollableViewportSize()">getPreferredScrollableViewportSize</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the preferred size of the viewport for a view component.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Scrollable.html#getScrollableBlockIncrement(java.awt.Rectangle, int, int)">getScrollableBlockIncrement</A></B>(java.awt.Rectangle&nbsp;visibleRect,
                            int&nbsp;orientation,
                            int&nbsp;direction)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Components that display logical rows or columns should compute
 the scroll increment that will completely expose one block
 of rows or columns, depending on the value of orientation.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Scrollable.html#getScrollableTracksViewportHeight()">getScrollableTracksViewportHeight</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return true if a viewport should always force the height of this 
 Scrollable to match the height of the viewport.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Scrollable.html#getScrollableTracksViewportWidth()">getScrollableTracksViewportWidth</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return true if a viewport should always force the width of this 
 Scrollable to match the width of the viewport.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/Scrollable.html#getScrollableUnitIncrement(java.awt.Rectangle, int, int)">getScrollableUnitIncrement</A></B>(java.awt.Rectangle&nbsp;visibleRect,
                           int&nbsp;orientation,
                           int&nbsp;direction)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Components that display logical rows or columns should compute
 the scroll increment that will completely expose one new row
 or column, depending on the value of orientation.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->


<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getPreferredScrollableViewportSize()"><!-- --></A><H3>
getPreferredScrollableViewportSize</H3>
<PRE>
public java.awt.Dimension <B>getPreferredScrollableViewportSize</B>()</PRE>
<DL>
<DD>Returns the preferred size of the viewport for a view component.
 For example the preferredSize of a JList component is the size
 required to acommodate all of the cells in its list however the
 value of preferredScrollableViewportSize is the size required for
 JList.getVisibleRowCount() rows.   A component without any properties
 that would effect the viewport size should just return 
 getPreferredSize() here.<DD><DL>
<DT><B>Returns:</B><DD>The preferredSize of a JViewport whose view is this Scrollable.<DT><B>See Also: </B><DD><A HREF="../../javax/swing/JComponent.html#getPreferredSize()"><CODE>JComponent.getPreferredSize()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getScrollableUnitIncrement(java.awt.Rectangle, int, int)"><!-- --></A><H3>
getScrollableUnitIncrement</H3>
<PRE>
public int <B>getScrollableUnitIncrement</B>(java.awt.Rectangle&nbsp;visibleRect,
                                      int&nbsp;orientation,
                                      int&nbsp;direction)</PRE>
<DL>
<DD>Components that display logical rows or columns should compute
 the scroll increment that will completely expose one new row
 or column, depending on the value of orientation.  Ideally, 
 components should handle a partially exposed row or column by 
 returning the distance required to completely expose the item.
 <p>
 Scrolling containers, like JScrollPane, will use this method
 each time the user requests a unit scroll.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>visibleRect</CODE> - The view area visible within the viewport<DD><CODE>orientation</CODE> - Either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL.<DD><CODE>direction</CODE> - Less than zero to scroll up/left, greater than zero for down/right.<DT><B>Returns:</B><DD>The "unit" increment for scrolling in the specified direction<DT><B>See Also: </B><DD><A HREF="../../javax/swing/JScrollBar.html#setUnitIncrement(int)"><CODE>JScrollBar.setUnitIncrement(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getScrollableBlockIncrement(java.awt.Rectangle, int, int)"><!-- --></A><H3>
getScrollableBlockIncrement</H3>
<PRE>
public int <B>getScrollableBlockIncrement</B>(java.awt.Rectangle&nbsp;visibleRect,
                                       int&nbsp;orientation,
                                       int&nbsp;direction)</PRE>
<DL>
<DD>Components that display logical rows or columns should compute
 the scroll increment that will completely expose one block
 of rows or columns, depending on the value of orientation. 
 <p>
 Scrolling containers, like JScrollPane, will use this method
 each time the user requests a block scroll.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>visibleRect</CODE> - The view area visible within the viewport<DD><CODE>orientation</CODE> - Either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL.<DD><CODE>direction</CODE> - Less than zero to scroll up/left, greater than zero for down/right.<DT><B>Returns:</B><DD>The "block" increment for scrolling in the specified direction.<DT><B>See Also: </B><DD><A HREF="../../javax/swing/JScrollBar.html#setBlockIncrement(int)"><CODE>JScrollBar.setBlockIncrement(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getScrollableTracksViewportWidth()"><!-- --></A><H3>
getScrollableTracksViewportWidth</H3>
<PRE>
public boolean <B>getScrollableTracksViewportWidth</B>()</PRE>
<DL>
<DD>Return true if a viewport should always force the width of this 
 Scrollable to match the width of the viewport.  For example a noraml 
 text view that supported line wrapping would return true here, since it
 would be undesirable for wrapped lines to disappear beyond the right
 edge of the viewport.  Note that returning true for a Scrollable
 whose ancestor is a JScrollPane effectively disables horizontal
 scrolling.
 <p>
 Scrolling containers, like JViewport, will use this method each 
 time they are validated.<DD><DL>
<DT><B>Returns:</B><DD>True if a viewport should force the Scrollables width to match its own.</DL>
</DD>
</DL>
<HR>

<A NAME="getScrollableTracksViewportHeight()"><!-- --></A><H3>
getScrollableTracksViewportHeight</H3>
<PRE>
public boolean <B>getScrollableTracksViewportHeight</B>()</PRE>
<DL>
<DD>Return true if a viewport should always force the height of this 
 Scrollable to match the height of the viewport.  For example a 
 columnar text view that flowed text in left to right columns 
 could effectively disable vertical scrolling by returning
 true here.
 <p>
 Scrolling containers, like JViewport, will use this method each 
 time they are validated.<DD><DL>
<DT><B>Returns:</B><DD>True if a viewport should force the Scrollables height to match its own.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/Scrollable.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/swing/RootPaneContainer.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/swing/ScrollPaneConstants.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Scrollable.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries.<br>Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font>
</BODY>
</HTML>
