All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.JScrollPane

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JScrollPane

public class JScrollPane
extends JComponent
implements ScrollPaneConstants, Accessible
A specialized container that manages a viewport, optional vertical and horizontal scrollbars, and optional row and column heading viewports.

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.

See Also:
JScrollPane. ScrollBar

Variable Index

 o cornerKeywords

Constructor Index

 o JScrollPane()
 o JScrollPane(Component)
 o JScrollPane(Component, int, int)
 o JScrollPane(int, int)

Method Index

 o createHorizontalScrollBar()
Used by ScrollPaneUI implementations to create the horizontal scrollbar.
 o createVerticalScrollBar()
Used by ScrollPaneUI implementations to create the vertical scrollbar.
 o createViewport()
Returns 'new JViewport()' by default.
 o getAccessibleContext()
Get the AccessibleContext associated with this JComponent
 o getColumnHeader()
 o getCorner(String)
 o getHorizontalScrollBar()
 o getHorizontalScrollBarPolicy()
 o getRowHeader()
 o getUI()
 o getUIClassID()
 o getVerticalScrollBar()
 o getVerticalScrollBarPolicy()
 o getViewport()
 o getViewportBorder()
 o isOpaque()
Returns true if this component is completely opaque.
 o isValidateRoot()
Calls to revalidate() any descendant of this JScrollPane, e.g.
 o setColumnHeader(JViewport)
 o setColumnHeaderView(Component)
Creates a ColumnHeader viewport if neccessary and then sets its view.
 o setCorner(String, Component)
 o setHorizontalScrollBarPolicy(int)
 o setRowHeader(JViewport)
 o setRowHeaderView(Component)
Creates a RowHeader viewport if neccessary and then sets its view.
 o setUI(ScrollPaneUI)
 o setVerticalScrollBarPolicy(int)
 o setViewport(JViewport)
 o setViewportBorder(Border)
Add a border around the viewport.
 o setViewportView(Component)
Creates a viewport if neccessary and then sets its view.
 o updateUI()
Resets the UI property to a value from the current look and feel.

Variables

 o cornerKeywords
 protected static final String cornerKeywords[]

Constructors

 o JScrollPane
 public JScrollPane(Component view,
                    int vsbPolicy,
                    int hsbPolicy)
 o JScrollPane
 public JScrollPane(Component view)
 o JScrollPane
 public JScrollPane(int vsbPolicy,
                    int hsbPolicy)
 o JScrollPane
 public JScrollPane()

Methods

 o getUI
 public ScrollPaneUI getUI()
 o setUI
 public void setUI(ScrollPaneUI ui)
 o updateUI
 public void updateUI()
Resets the UI property to a value from the current look and feel.

Overrides:
updateUI in class JComponent
 o getUIClassID
 public String getUIClassID()
Returns:
"ScrollPaneUI"
Overrides:
getUIClassID in class JComponent
See Also:
getUIClassID, getUI
 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 getViewportBorder
 public Border getViewportBorder()
Returns:
the value of the viewportBorder property.
See Also:
setViewportBorder
 o setViewportBorder
 public void setViewportBorder(Border viewportBorder)
Add a border around the viewport. Note that the border isn't set on the viewport directly, JViewport doesn't support the JComponent border property. Similarly setting the JScrollPanes viewport doesn't effect the viewportBorder property.

The default value of this property is computed by the look and feel implementation.

This is a JavaBeans bound property.

See Also:
getViewportBorder, setViewport
 o createHorizontalScrollBar
 public JScrollBar createHorizontalScrollBar()
Used by ScrollPaneUI implementations to create the horizontal scrollbar. Returns a JScrollPane.ScrollBar by default. Subclasses may override this method to force ScrollPaneUI implementations to use a JScrollBar subclass.

Returns:
The horizontal JScrollBar
See Also:
JScrollPane. ScrollBar
 o createVerticalScrollBar
 public JScrollBar createVerticalScrollBar()
Used by ScrollPaneUI implementations to create the vertical scrollbar. Returns a JScrollPane.ScrollBar by default. Subclasses may override this method to force ScrollPaneUI implementations to use a JScrollBar subclass.

Returns:
The vertical JScrollBar
See Also:
JScrollPane. ScrollBar
 o getHorizontalScrollBar
 public JScrollBar getHorizontalScrollBar()
 o getVerticalScrollBar
 public JScrollBar getVerticalScrollBar()
 o createViewport
 protected JViewport createViewport()
Returns 'new JViewport()' by default. Used to create the viewport (as needed) in setViewportView(), setRowHeaderView(), and setColumnHeaderView(). Subclasses my override this method to return a subclass of JViewport.

 o getViewport
 public JViewport getViewport()
 o setViewport
 public void setViewport(JViewport x)
 o setViewportView
 public void setViewportView(Component view)
Creates a viewport if neccessary and then sets its view.

 o getRowHeader
 public JViewport getRowHeader()
 o setRowHeader
 public void setRowHeader(JViewport x)
 o setRowHeaderView
 public void setRowHeaderView(Component view)
Creates a RowHeader viewport if neccessary and then sets its view.

 o getColumnHeader
 public JViewport getColumnHeader()
 o setColumnHeader
 public void setColumnHeader(JViewport x)
 o setColumnHeaderView
 public void setColumnHeaderView(Component view)
Creates a ColumnHeader viewport if neccessary and then sets its view.

 o getCorner
 public Component getCorner(String key)
 o setCorner
 public void setCorner(String key,
                       Component x)
 o isOpaque
 public boolean isOpaque()
Returns true if this component is completely opaque.

Overrides:
isOpaque in class JComponent
 o isValidateRoot
 public boolean isValidateRoot()
Calls to revalidate() any descendant of this JScrollPane, e.g. the viewports view, will cause a request to be queued that will validate this JScrollPane and all its descendants.

Returns:
true
Overrides:
isValidateRoot in class JComponent
See Also:
revalidate, invalidate, validate
 o getAccessibleContext
 public AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this JComponent

Returns:
the AccessibleContext of this JComponent
Overrides:
getAccessibleContext in class JComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index