|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.gui.ScrollablePanels
public class ScrollablePanels
Helper class for panels that implement the Scrollable interface.
| Method Summary | |
|---|---|
static java.awt.Dimension |
getPreferredScrollableViewportSize(javax.swing.JPanel component)
Returns the preferred size of the viewport for a view component. |
static int |
getScrollableBlockIncrement(javax.swing.JPanel component,
java.awt.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. |
static boolean |
getScrollableTracksViewportHeight(javax.swing.JPanel component)
Return true if a viewport should always force the height of this Scrollable to match the height of the viewport. |
static boolean |
getScrollableTracksViewportWidth(javax.swing.JPanel component)
Return true if a viewport should always force the width of this Scrollable to match the width of the viewport. |
static int |
getScrollableUnitIncrement(javax.swing.JPanel component,
java.awt.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.awt.Dimension getPreferredScrollableViewportSize(javax.swing.JPanel component)
JComponent.getPreferredSize()
public static int getScrollableBlockIncrement(javax.swing.JPanel component,
java.awt.Rectangle visibleRect,
int orientation,
int direction)
Scrolling containers, like JScrollPane, will use this method each time the user requests a block scroll.
visibleRect - The view area visible within the viewportorientation - Either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL.direction - Less than zero to scroll up/left, greater than zero for down/right.
JScrollBar.setBlockIncrement(int)public static boolean getScrollableTracksViewportHeight(javax.swing.JPanel component)
Scrolling containers, like JViewport, will use this method each time they are validated.
public static boolean getScrollableTracksViewportWidth(javax.swing.JPanel component)
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 static int getScrollableUnitIncrement(javax.swing.JPanel component,
java.awt.Rectangle visibleRect,
int orientation,
int direction)
Scrolling containers, like JScrollPane, will use this method each time the user requests a unit scroll.
visibleRect - The view area visible within the viewportorientation - Either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL.direction - Less than zero to scroll up/left, greater than zero for down/right.
JScrollBar.setUnitIncrement(int)
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||