public interface Scrollable 
      JViewport , JScrollPane , JScrollBar 
       | Modifier and Type | Method and Description | 
|---|---|
| Dimension | getPreferredScrollableViewportSize()
              返回视图组件的视口的首选大小。 
             | 
| int | getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
              显示逻辑行或列的组件应计算将根据取向值完全暴露一行行或列的滚动增量。 
             | 
| boolean | getScrollableTracksViewportHeight()
              如果视口总是强制此Scrollable的高度与视口的高度相匹配,则返回true。 
             | 
| boolean | getScrollableTracksViewportWidth()
              如果视口总是强制此 
              Scrollable的宽度与视口的宽度相匹配,则返回true。 | 
| int | getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
              显示逻辑行或列的组件应计算将根据取向值完全暴露一个新行或列的滚动增量。 
             | 
Dimension getPreferredScrollableViewportSize()
JList其列表中所有单元格所需的大小。 
           但是, preferredScrollableViewportSize的值是JList.getVisibleRowCount行所需的大小。 
           没有任何影响视口大小的getPreferredSize应该在这里返回getPreferredSize 。 
          JViewport的视图是这个 
            Scrollable 
           JComponent.getPreferredSize() 
           int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
滚动容器(如JScrollPane)将在用户请求单位滚动时使用此方法。
visibleRect - 在视口内可见的视图区域 
           orientation - SwingConstants.VERTICAL或SwingConstants.HORIZONTAL。 
           direction - 向上/向左滚动小于零,向下/向右大于零。 
           JScrollBar.setUnitIncrement(int) 
           int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
滚动容器(如JScrollPane)将在每次用户请求块滚动时使用此方法。
visibleRect - 在视口内可见的视图区域 
           orientation - SwingConstants.VERTICAL或SwingConstants.HORIZONTAL。 
           direction - 向上/向左滚动小于0,向下/向右大于零。 
           JScrollBar.setBlockIncrement(int) 
           boolean getScrollableTracksViewportWidth()
Scrollable的宽度与视口的宽度相匹配,则返回true。 
           例如,支持换行的常规文本视图在此处将返回true,因为包装线条不会超出视口右边缘消失。 
           请注意,对于其祖先是JScrollPane的Scrollable,返回true将有效地禁用水平滚动。 
           滚动容器(如JViewport)将在每次验证时使用此方法。
boolean getScrollableTracksViewportHeight()
滚动容器(如JViewport)将在每次验证时使用此方法。
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.