|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.ScrollPaneLayout
public class ScrollPaneLayout
ScrollPaneLayout
| 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)
Deprecated. As of Swing 1.1 replaced by JScrollPane.getViewportBorderBounds(). |
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)
Calculates the minimum size for this container, taking into account the components it contains. |
Dimension |
preferredLayoutSize(Container parent)
Calculates the preferred size for this container, taking into account the components it contains. |
void |
removeLayoutComponent(Component component)
Removes the specified component from the layout group. |
void |
setHorizontalScrollBarPolicy(int policy)
Sets the horizontal scrollbar policy. |
void |
setVerticalScrollBarPolicy(int policy)
Sets the vertical scrollbar policy. |
void |
syncWithScrollPane(JScrollPane scrollPane)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected JViewport viewport
protected JScrollBar vsb
protected JScrollBar hsb
protected JViewport rowHead
protected JViewport colHead
protected Component lowerLeft
protected Component lowerRight
protected Component upperLeft
protected Component upperRight
protected int vsbPolicy
protected int hsbPolicy
| Constructor Detail |
|---|
public ScrollPaneLayout()
| Method Detail |
|---|
public void syncWithScrollPane(JScrollPane scrollPane)
protected Component addSingletonComponent(Component oldComponent,
Component newComponent)
oldComponent - the old Component that may need to be removed.newComponent - the Component to add.
public void addLayoutComponent(String key,
Component component)
addLayoutComponent in interface LayoutManagerkey - 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
IllegalArgumentException - if key is not as abovepublic void removeLayoutComponent(Component component)
LayoutManager
removeLayoutComponent in interface LayoutManagercomponent - the component to removepublic int getVerticalScrollBarPolicy()
public void setVerticalScrollBarPolicy(int policy)
policy - must be one of VERTICAL_SCROLLBAR_AS_NEEDED,
VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_ALWAYS.
IllegalArgumentException - if policy is not one of the valid
JScrollBar policies.public int getHorizontalScrollBarPolicy()
public void setHorizontalScrollBarPolicy(int policy)
policy - must be one of HORIZONTAL_SCROLLBAR_AS_NEEDED,
HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_ALWAYS.
IllegalArgumentException - if policy is not one of the valid
JScrollbar policies.public JViewport getViewport()
public JScrollBar getHorizontalScrollBar()
public JScrollBar getVerticalScrollBar()
public JViewport getRowHeader()
public JViewport getColumnHeader()
public Component getCorner(String key)
key - the corner.
public Dimension preferredLayoutSize(Container parent)
LayoutManager
preferredLayoutSize in interface LayoutManagerparent - the parent container to lay out
LayoutManager.minimumLayoutSize(Container)public Dimension minimumLayoutSize(Container parent)
LayoutManager
minimumLayoutSize in interface LayoutManagerparent - the parent container to lay out
LayoutManager.preferredLayoutSize(Container)public void layoutContainer(Container parent)
layoutContainer in interface LayoutManagerparent - the container to lay outpublic Rectangle getViewportBorderBounds(JScrollPane scrollPane)
JScrollPane.getViewportBorderBounds().
scrollPane - the ScrollPane for which's viewport the border
is requested
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||