javax.swing

Class ScrollPaneLayout

Implemented Interfaces:
LayoutManager, ScrollPaneConstants, Serializable
Known Direct Subclasses:
ScrollPaneLayout.UIResource

public class ScrollPaneLayout
extends Object
implements LayoutManager, ScrollPaneConstants, Serializable

ScrollPaneLayout

See Also:
Serialized Form

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

Fields inherited from interface javax.swing.ScrollPaneConstants

COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT

Constructor Summary

ScrollPaneLayout()

Method Summary

void
addLayoutComponent(String key, Component component)
protected Component
addSingletonComponent(Component oldComponent, Component newComponent)
JViewport
getColumnHeader()
Component
getCorner(String key)
JScrollBar
getHorizontalScrollBar()
int
getHorizontalScrollBarPolicy()
JViewport
getRowHeader()
JScrollBar
getVerticalScrollBar()
int
getVerticalScrollBarPolicy()
JViewport
getViewport()
Rectangle
getViewportBorderBounds(JScrollPane scrollPane)
Deprecated. As of Swing 1.1 replaced by
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)
void
setVerticalScrollBarPolicy(int policy)
void
syncWithScrollPane(JScrollPane scrollPane)

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

colHead

protected JViewport colHead


hsb

protected JScrollBar hsb


hsbPolicy

protected int hsbPolicy


lowerLeft

protected Component lowerLeft


lowerRight

protected Component lowerRight


rowHead

protected JViewport rowHead


upperLeft

protected Component upperLeft


upperRight

protected Component upperRight


viewport

protected JViewport viewport


vsb

protected JScrollBar vsb


vsbPolicy

protected int vsbPolicy

Constructor Details

ScrollPaneLayout

public ScrollPaneLayout()

Method Details

addLayoutComponent

public void addLayoutComponent(String key,
                               Component component)
Specified by:
addLayoutComponent in interface LayoutManager


addSingletonComponent

protected Component addSingletonComponent(Component oldComponent,
                                          Component newComponent)


getColumnHeader

public JViewport getColumnHeader()


getCorner

public Component getCorner(String key)


getHorizontalScrollBar

public JScrollBar getHorizontalScrollBar()


getHorizontalScrollBarPolicy

public int getHorizontalScrollBarPolicy()


getRowHeader

public JViewport getRowHeader()


getVerticalScrollBar

public JScrollBar getVerticalScrollBar()


getVerticalScrollBarPolicy

public int getVerticalScrollBarPolicy()


getViewport

public JViewport getViewport()


getViewportBorderBounds

public Rectangle getViewportBorderBounds(JScrollPane scrollPane)

Deprecated. As of Swing 1.1 replaced by

Returns the bounds of the border around a ScrollPane's viewport. JScrollPane.getViewportBorderBounds().

Parameters:
scrollPane - the ScrollPane for which's viewport the border is requested


layoutContainer

public 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
Specified by:
layoutContainer in interface LayoutManager


minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Specified by:
minimumLayoutSize in interface LayoutManager


preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Specified by:
preferredLayoutSize in interface LayoutManager


removeLayoutComponent

public void removeLayoutComponent(Component component)
Specified by:
removeLayoutComponent in interface LayoutManager


setHorizontalScrollBarPolicy

public void setHorizontalScrollBarPolicy(int policy)


setVerticalScrollBarPolicy

public void setVerticalScrollBarPolicy(int policy)


syncWithScrollPane

public void syncWithScrollPane(JScrollPane scrollPane)


ScrollPaneLayout.java -- Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.