Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

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.

Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.


Field Summary
JViewport  colHead
 
JScrollBar  hsb
 
int  hsbPolicy
 
Component  lowerLeft
 
Component  lowerRight
 
JViewport  rowHead
 
Component  upperLeft
 
Component  upperRight
 
JViewport  viewport
 
JScrollBar  vsb
 
int  vsbPolicy
 
 

Method Summary
void  addLayoutComponent(String s, Component c)
 
Component  addSingletonComponent(Component oldC, Component newC)
Only one of these is allowed, remove the old one if neccessary.
JViewport  getColumnHeader()
 
Component  getCorner(String key)
 
JScrollBar  getHorizontalScrollBar()
 
int  getHorizontalScrollBarPolicy()
 
JViewport  getRowHeader()
 
JScrollBar  getVerticalScrollBar()
 
int  getVerticalScrollBarPolicy()
 
JViewport  getViewport()
 
Rectangle  getViewportBorderBounds(JScrollPane sp)
 
void  layoutContainer(Container parent)
Layout the scrollpane according to the following constraints:
  • The row header, if present and visible, gets its preferred height and the viewports width.
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.
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.
void  removeLayoutComponent(Component c)
 
void  setHorizontalScrollBarPolicy(int x)
 
void  setVerticalScrollBarPolicy(int x)
 
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewport

protected JViewport viewport

vsb

protected JScrollBar vsb

hsb

protected JScrollBar hsb

rowHead

protected JViewport rowHead

colHead

protected JViewport colHead

lowerLeft

protected Component lowerLeft

lowerRight

protected Component lowerRight

upperLeft

protected Component upperLeft

upperRight

protected Component upperRight

vsbPolicy

protected int vsbPolicy

hsbPolicy

protected int hsbPolicy
Method Detail

addSingletonComponent

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

addLayoutComponent

public void addLayoutComponent(String s,
                               Component c)
Implements:
addLayoutComponent in interface LayoutManager

removeLayoutComponent

public void removeLayoutComponent(Component c)
Implements:
removeLayoutComponent in interface LayoutManager

getVerticalScrollBarPolicy

public int getVerticalScrollBarPolicy()

setVerticalScrollBarPolicy

public void setVerticalScrollBarPolicy(int x)

getHorizontalScrollBarPolicy

public int getHorizontalScrollBarPolicy()

setHorizontalScrollBarPolicy

public void setHorizontalScrollBarPolicy(int x)

getViewport

public JViewport getViewport()

getHorizontalScrollBar

public JScrollBar getHorizontalScrollBar()

getVerticalScrollBar

public JScrollBar getVerticalScrollBar()

getRowHeader

public JViewport getRowHeader()

getColumnHeader

public JViewport getColumnHeader()

getCorner

public Component getCorner(String key)

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.
Implements:
preferredLayoutSize in interface LayoutManager
Returns:
The preferred size of the viewport and any scrollbars.
See Also:
ViewportLayout, LayoutManager

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.
Implements:
minimumLayoutSize in interface LayoutManager

layoutContainer

public void layoutContainer(Container parent)
Layout the scrollpane according to the following constraints:
Implements:
layoutContainer in interface LayoutManager

getViewportBorderBounds

public Rectangle getViewportBorderBounds(JScrollPane sp)

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.