📄 scrollable.html
字号:
<!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getPreferredScrollableViewportSize()"><!-- --></A><H3>getPreferredScrollableViewportSize</H3><PRE>public <A HREF="../../java/awt/Dimension.html">Dimension</A> <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>(<A HREF="../../java/awt/Rectangle.html">Rectangle</A> visibleRect, int orientation, int 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>(<A HREF="../../java/awt/Rectangle.html">Rectangle</A> visibleRect, int orientation, int 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" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Scrollable.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/swing/RootPaneContainer.html"><B>PREV CLASS</B></A> <A HREF="../../javax/swing/ScrollPaneConstants.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Scrollable.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <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>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -