scrollpane.html
来自「API資料大全」· HTML 代码 · 共 824 行 · 第 1/4 页
HTML
824 行
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="SCROLLBARS_AS_NEEDED"><!-- --></A><H3>SCROLLBARS_AS_NEEDED</H3><PRE>public static final int <B>SCROLLBARS_AS_NEEDED</B></PRE><DL><DD>Specifies that horizontal/vertical scrollbar should be shown only when the size of the child exceeds the size of the scrollpane in the horizontal/vertical dimension.</DL><HR><A NAME="SCROLLBARS_ALWAYS"><!-- --></A><H3>SCROLLBARS_ALWAYS</H3><PRE>public static final int <B>SCROLLBARS_ALWAYS</B></PRE><DL><DD>Specifies that horizontal/vertical scrollbars should always be shown regardless of the respective sizes of the scrollpane and child.</DL><HR><A NAME="SCROLLBARS_NEVER"><!-- --></A><H3>SCROLLBARS_NEVER</H3><PRE>public static final int <B>SCROLLBARS_NEVER</B></PRE><DL><DD>Specifies that horizontal/vertical scrollbars should never be shown regardless of the respective sizes of the scrollpane and child.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="ScrollPane()"><!-- --></A><H3>ScrollPane</H3><PRE>public <B>ScrollPane</B>()</PRE><DL><DD>Create a new scrollpane container with a scrollbar display policy of "as needed".</DL><HR><A NAME="ScrollPane(int)"><!-- --></A><H3>ScrollPane</H3><PRE>public <B>ScrollPane</B>(int scrollbarDisplayPolicy)</PRE><DL><DD>Create a new scrollpane container.<DD><DL><DT><B>Parameters:</B><DD><CODE>scrollbarDisplayPolicy</CODE> - policy for when scrollbars should be shown</DL></DD></DL><!-- ============ 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="addImpl(java.awt.Component, java.lang.Object, int)"><!-- --></A><H3>addImpl</H3><PRE>protected final void <B>addImpl</B>(<A HREF="../../java/awt/Component.html">Component</A> comp, <A HREF="../../java/lang/Object.html">Object</A> constraints, int index)</PRE><DL><DD>Adds the specified component to this scroll pane container. If the scroll pane has an existing child component, that component is removed and the new one is added.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Container.html#addImpl(java.awt.Component, java.lang.Object, int)">addImpl</A></CODE> in class <CODE><A HREF="../../java/awt/Container.html">Container</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>comp</CODE> - the component to be added<DD><CODE>constraints</CODE> - not applicable<DD><CODE>index</CODE> - position of child component (must be <= 0)</DL></DD></DL><HR><A NAME="getScrollbarDisplayPolicy()"><!-- --></A><H3>getScrollbarDisplayPolicy</H3><PRE>public int <B>getScrollbarDisplayPolicy</B>()</PRE><DL><DD>Returns the display policy for the scrollbars.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the display policy for the scrollbars</DL></DD></DL><HR><A NAME="getViewportSize()"><!-- --></A><H3>getViewportSize</H3><PRE>public <A HREF="../../java/awt/Dimension.html">Dimension</A> <B>getViewportSize</B>()</PRE><DL><DD>Returns the current size of the scroll pane's view port.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the size of the view port in pixels</DL></DD></DL><HR><A NAME="getHScrollbarHeight()"><!-- --></A><H3>getHScrollbarHeight</H3><PRE>public int <B>getHScrollbarHeight</B>()</PRE><DL><DD>Returns the height that would be occupied by a horizontal scrollbar, which is independent of whether it is currently displayed by the scroll pane or not.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the height of a horizontal scrollbar in pixels</DL></DD></DL><HR><A NAME="getVScrollbarWidth()"><!-- --></A><H3>getVScrollbarWidth</H3><PRE>public int <B>getVScrollbarWidth</B>()</PRE><DL><DD>Returns the width that would be occupied by a vertical scrollbar, which is independent of whether it is currently displayed by the scroll pane or not.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the width of a vertical scrollbar in pixels</DL></DD></DL><HR><A NAME="getVAdjustable()"><!-- --></A><H3>getVAdjustable</H3><PRE>public <A HREF="../../java/awt/Adjustable.html">Adjustable</A> <B>getVAdjustable</B>()</PRE><DL><DD>Returns the Adjustable object which represents the state of the vertical scrollbar.<DD><DL></DL></DD></DL><HR><A NAME="getHAdjustable()"><!-- --></A><H3>getHAdjustable</H3><PRE>public <A HREF="../../java/awt/Adjustable.html">Adjustable</A> <B>getHAdjustable</B>()</PRE><DL><DD>Returns the Adjustable object which represents the state of the horizontal scrollbar.<DD><DL></DL></DD></DL><HR><A NAME="setScrollPosition(int, int)"><!-- --></A><H3>setScrollPosition</H3><PRE>public void <B>setScrollPosition</B>(int x, int y)</PRE><DL><DD>Scrolls to the specified position within the child component. A call to this method is only valid if the scroll pane contains a child. Specifying a position outside of the legal scrolling bounds of the child will scroll to the closest legal position. Legal bounds are defined to be the rectangle: x = 0, y = 0, width = (child width - view port width), height = (child height - view port height). This is a convenience method which interfaces with the Adjustable objects which represent the state of the scrollbars.<DD><DL></DL>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?