All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.swing.ScrollPaneLayout

java.lang.Object
    |
    +----java.awt.swing.ScrollPaneLayout

public class ScrollPaneLayout
extends Object
implements LayoutManager, ScrollPaneConstants, Serializable
The layout manager used by JScrollPane. JScrollPaneLayout is responsible for nine components: a viewport, two scrollbars, a row header, a column header, and four "corner" components.


Variable Index

 o colHead
 o hsb
 o hsbPolicy
 o lowerLeft
 o lowerRight
 o rowHead
 o upperLeft
 o upperRight
 o viewport
 o vsb
 o vsbPolicy

Constructor Index

 o ScrollPaneLayout()

Method Index

 o addLayoutComponent(String, Component)
 o addSingletonComponent(Component, Component)
Only one of these is allowed, remove the old one if neccessary.
 o getColumnHeader()
 o getCorner(String)
 o getHorizontalScrollBar()
 o getHorizontalScrollBarPolicy()
 o getRowHeader()
 o getVerticalScrollBar()
 o getVerticalScrollBarPolicy()
 o getViewport()
 o getViewportBorderBounds(JScrollPane)
 o layoutContainer(Container)
Layout the scrollpane according to the following constraints:

Variables

 o viewport
protected JViewport viewport
 o vsb
protected JScrollBar vsb
 o hsb
protected JScrollBar hsb
 o rowHead
protected JViewport rowHead
 o colHead
protected JViewport colHead
 o lowerLeft
protected Component lowerLeft
 o lowerRight
protected Component lowerRight
 o upperLeft
protected Component upperLeft
 o upperRight
protected Component upperRight
 o vsbPolicy
protected int vsbPolicy
 o hsbPolicy
protected int hsbPolicy

Constructors

 o ScrollPaneLayout
public ScrollPaneLayout()

Methods

 o addSingletonComponent
protected Component addSingletonComponent(Component oldC,
                                          Component newC)
Only one of these is allowed, remove the old one if neccessary.

 o addLayoutComponent
public void addLayoutComponent(String s,
                               Component c)
 o removeLayoutComponent
public void removeLayoutComponent(Component c)
 o getVerticalScrollBarPolicy
public int getVerticalScrollBarPolicy()
 o setVerticalScrollBarPolicy
public void setVerticalScrollBarPolicy(int x)
 o getHorizontalScrollBarPolicy
public int getHorizontalScrollBarPolicy()
 o setHorizontalScrollBarPolicy
public void setHorizontalScrollBarPolicy(int x)
 o getViewport
public JViewport getViewport()
 o getHorizontalScrollBar
public JScrollBar getHorizontalScrollBar()
 o getVerticalScrollBar
public JScrollBar getVerticalScrollBar()
 o getRowHeader
public JViewport getRowHeader()
 o getColumnHeader
public JViewport getColumnHeader()
 o getCorner
public Component getCorner(String key)
 o preferredLayoutSize
public Dimension preferredLayoutSize(Container parent)
The preferred size of a ScrollPane is the size of the insets plus preferred size of the viewport plus the preferred size of the visible headers, plus the preferred size of the scrollbars that will appear given the current view and the current scrollbar displayPolicies.

Returns:
The preferred size of the viewport and any scrollbars.
See Also:
ViewportLayout, LayoutManager
 o minimumLayoutSize
public Dimension minimumLayoutSize(Container parent)
The minimum size of a ScrollPane is the size of the insets plus minimum size of the viewport, plus the scrollpanes viewportBorder insets, plus the minimum size of the visible headers, plus the minimum size of the scrollbars whose displayPolicy isn't NEVER.

 o layoutContainer
public void layoutContainer(Container parent)
Layout the scrollpane according to the following constraints:

 o getViewportBorderBounds
public Rectangle getViewportBorderBounds(JScrollPane sp)

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature