📄 jviewport.html
字号:
<B>Deprecated.</B> <I>As of Java 2 platform v1.3, replaced by <code>getScrollMode()</code>.</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#isOptimizedDrawingEnabled()">isOptimizedDrawingEnabled</A></B>()</CODE><BR> The <code>JViewport</code> overrides the default implementation of this method (in <code>JComponent</code>) to return false.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#paint(java.awt.Graphics)">paint</A></B>(<A HREF="../../java/awt/Graphics.html">Graphics</A> g)</CODE><BR> Depending on whether the <code>backingStore</code> is enabled, either paint the image through the backing store or paint just the recently exposed part, using the backing store to "blit" the remainder.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#paramString()">paramString</A></B>()</CODE><BR> Returns a string representation of this <code>JViewport</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#remove(java.awt.Component)">remove</A></B>(<A HREF="../../java/awt/Component.html">Component</A> child)</CODE><BR> Removes the <code>Viewport</code>s one lightweight child.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#removeChangeListener(javax.swing.event.ChangeListener)">removeChangeListener</A></B>(<A HREF="../../javax/swing/event/ChangeListener.html">ChangeListener</A> l)</CODE><BR> Removes a <code>ChangeListener</code> from the list that's notified each time the views size, position, or the viewports extent size has changed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#repaint(long, int, int, int, int)">repaint</A></B>(long tm, int x, int y, int w, int h)</CODE><BR> Always repaint in the parents coordinate system to make sure only one paint is performed by the <code>RepaintManager</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#reshape(int, int, int, int)">reshape</A></B>(int x, int y, int w, int h)</CODE><BR> Sets the bounds of this viewport.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#scrollRectToVisible(java.awt.Rectangle)">scrollRectToVisible</A></B>(<A HREF="../../java/awt/Rectangle.html">Rectangle</A> contentRect)</CODE><BR> Overridden to scroll the view so that <code>Rectangle</code> within the view becomes visible.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#setBackingStoreEnabled(boolean)">setBackingStoreEnabled</A></B>(boolean enabled)</CODE><BR> <B>Deprecated.</B> <I>As of Java 2 platform v1.3, replaced by <code>setScrollMode()</code>.</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#setBorder(javax.swing.border.Border)">setBorder</A></B>(<A HREF="../../javax/swing/border/Border.html">Border</A> border)</CODE><BR> The viewport "scrolls" it's child (called the "view") by the normal parent/child clipping (typically the view is moved in the opposite direction of the scroll).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#setExtentSize(java.awt.Dimension)">setExtentSize</A></B>(<A HREF="../../java/awt/Dimension.html">Dimension</A> newExtent)</CODE><BR> Sets the size of the visible part of the view using view coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#setScrollMode(int)">setScrollMode</A></B>(int mode)</CODE><BR> Used to control the method of scrolling the viewport contents.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#setUI(javax.swing.plaf.ViewportUI)">setUI</A></B>(<A HREF="../../javax/swing/plaf/ViewportUI.html">ViewportUI</A> ui)</CODE><BR> Sets the L&F object that renders this component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#setView(java.awt.Component)">setView</A></B>(<A HREF="../../java/awt/Component.html">Component</A> view)</CODE><BR> Sets the <code>JViewport</code>s one lightweight child (<code>view</code>), which can be <code>null</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#setViewPosition(java.awt.Point)">setViewPosition</A></B>(<A HREF="../../java/awt/Point.html">Point</A> p)</CODE><BR> Sets the view coordinates that appear in the upper left hand corner of the viewport, does nothing if there's no view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#setViewSize(java.awt.Dimension)">setViewSize</A></B>(<A HREF="../../java/awt/Dimension.html">Dimension</A> newSize)</CODE><BR> Sets the view coordinates that appear in the upper left hand corner of the viewport, and the size of the view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JViewport.html#toViewCoordinates(java.awt.Dimension)">toViewCoordinates</A></B>(<A HREF="../../java/awt/Dimension.html">Dimension</A> size)</CODE><BR> Converts a size in pixel coordinates to view coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -