| public interface javax.swing Scrollable
|
Java SE 6 |
| version | 1.13 11/17/05 |
| See also | javax.swing.JViewport, javax.swing.JScrollPane, javax.swing.JScrollBar |
| Properties | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public Dimension | getPreferredScrollableViewportSize() Returns the preferred size of the viewport for a view component. For example, the preferred size of a JList component
is the size required to accommodate 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 affect the viewport
size should just return getPreferredSize here.
| ||||||||||
| public int | getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) 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. Scrolling containers, like JScrollPane, will use this method each time the user requests a block scroll.
| ||||||||||
| public boolean | getScrollableTracksViewportHeight() 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. Scrolling containers, like JViewport, will use this method each time they are validated.
| ||||||||||
| public boolean | getScrollableTracksViewportWidth() Return true if a viewport should always force the width of this Scrollable to match the width of the viewport.
For example a normal
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.
Scrolling containers, like JViewport, will use this method each time they are validated.
| ||||||||||
| public int | getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) 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. Scrolling containers, like JScrollPane, will use this method each time the user requests a unit scroll.
| ||||||||||
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2009 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|