javax.swing
public class ScrollPaneLayout extends Object implements LayoutManager, ScrollPaneConstants, Serializable
Nested Class Summary | |
---|---|
static class | ScrollPaneLayout.UIResource |
Field Summary | |
---|---|
protected JViewport | colHead |
protected JScrollBar | hsb |
protected int | hsbPolicy |
protected Component | lowerLeft |
protected Component | lowerRight |
protected JViewport | rowHead |
protected Component | upperLeft |
protected Component | upperRight |
protected JViewport | viewport |
protected JScrollBar | vsb |
protected int | vsbPolicy |
Constructor Summary | |
---|---|
ScrollPaneLayout() |
Method Summary | |
---|---|
void | addLayoutComponent(String key, Component component)
Add the specified component to the layout. |
protected Component | addSingletonComponent(Component oldComponent, Component newComponent)
Removes an existing component. |
JViewport | getColumnHeader() |
Component | getCorner(String key)
Returns the Component at the specified corner. |
JScrollBar | getHorizontalScrollBar() |
int | getHorizontalScrollBarPolicy() |
JViewport | getRowHeader() |
JScrollBar | getVerticalScrollBar() |
int | getVerticalScrollBarPolicy() |
JViewport | getViewport() |
Rectangle | getViewportBorderBounds(JScrollPane scrollPane)
Returns the bounds of the border around a ScrollPane's viewport.
|
void | layoutContainer(Container parent)
+----+--------------------+----+ y1
| c1 | column header | c2 |
+----+--------------------+----+ y2
| r | | v |
| o | | |
| w | | s |
| | | r |
| h | | o |
| e | viewport | l |
| a | | l |
| d | | b |
| e | | a |
| r | | r |
+----+--------------------+----+ y3
| c3 | h scrollbar | c4 |
+----+--------------------+----+ y4
x1 x2 x3 x4
|
Dimension | minimumLayoutSize(Container parent) |
Dimension | preferredLayoutSize(Container parent) |
void | removeLayoutComponent(Component component) |
void | setHorizontalScrollBarPolicy(int policy)
Sets the horizontal scrollbar policy. |
void | setVerticalScrollBarPolicy(int policy)
Sets the vertical scrollbar policy. |
void | syncWithScrollPane(JScrollPane scrollPane) |
Parameters: key must be one of VIEWPORT, VERTICAL_SCROLLBAR, HORIZONTAL_SCROLLBAR, ROW_HEADER, COLUMN_HEADER, LOWER_RIGHT_CORNER, LOWER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_LEFT_CORNER. component the Component to add
Throws: IllegalArgumentException if key is not as above
Parameters: oldComponent the old Component that may need to be removed. newComponent the Component to add.
Returns: the newComponent
Parameters: key the corner.
Returns: the Component at the specified corner, or null if key is not one of the four valid corners.
Deprecated: As of Swing 1.1 replaced by {@link javax.swing.JScrollPane#getViewportBorderBounds}.
Returns the bounds of the border around a ScrollPane's viewport.Parameters: scrollPane the ScrollPane for which's viewport the border is requested
Parameters: policy must be one of HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_ALWAYS.
Throws: IllegalArgumentException if policy is not one of the valid JScrollbar policies.
Parameters: policy must be one of VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_ALWAYS.
Throws: IllegalArgumentException if policy is not one of the valid JScrollBar policies.