@Deprecated
public class LeftHandScrollbarLayout
extends javax.swing.ScrollPaneLayout
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JViewport |
colHead
Deprecated.
The column header child.
|
protected javax.swing.JScrollBar |
hsb
Deprecated.
The scrollpane's horizontal scrollbar child.
|
protected int |
hsbPolicy
Deprecated.
The display policy for the horizontal scrollbar.
|
protected java.awt.Component |
lowerLeft
Deprecated.
The component to display in the lower left corner.
|
protected java.awt.Component |
lowerRight
Deprecated.
The component to display in the lower right corner.
|
protected javax.swing.JViewport |
rowHead
Deprecated.
The row header child.
|
protected java.awt.Component |
upperLeft
Deprecated.
The component to display in the upper left corner.
|
protected java.awt.Component |
upperRight
Deprecated.
The component to display in the upper right corner.
|
protected javax.swing.JViewport |
viewport
Deprecated.
The scrollpane's viewport child.
|
protected javax.swing.JScrollBar |
vsb
Deprecated.
The scrollpane's vertical scrollbar child.
|
protected int |
vsbPolicy
Deprecated.
The display policy for the vertical scrollbar.
|
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 and Description |
---|
LeftHandScrollbarLayout()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(java.lang.String s,
java.awt.Component c)
Deprecated.
Adds the specified component to the layout.
|
protected java.awt.Component |
addSingletonComponent(java.awt.Component oldC,
java.awt.Component newC)
Deprecated.
Removes an existing component.
|
javax.swing.JViewport |
getColumnHeader()
Deprecated.
Returns the
JViewport object that is the column header. |
java.awt.Component |
getCorner(java.lang.String key)
Deprecated.
Returns the
Component at the specified corner. |
javax.swing.JScrollBar |
getHorizontalScrollBar()
Deprecated.
Returns the
JScrollBar object that handles horizontal scrolling. |
int |
getHorizontalScrollBarPolicy()
Deprecated.
Returns the horizontal scrollbar-display policy.
|
javax.swing.JViewport |
getRowHeader()
Deprecated.
Returns the
JViewport object that is the row header. |
javax.swing.JScrollBar |
getVerticalScrollBar()
Deprecated.
Returns the
JScrollBar object that handles vertical scrolling. |
int |
getVerticalScrollBarPolicy()
Deprecated.
Returns the vertical scrollbar-display policy.
|
javax.swing.JViewport |
getViewport()
Deprecated.
Returns the
JViewport object that displays the
scrollable contents. |
java.awt.Rectangle |
getViewportBorderBounds(javax.swing.JScrollPane scrollpane)
Deprecated.
As of JDK version Swing1.1
replaced by
JScrollPane.getViewportBorderBounds() . |
void |
layoutContainer(java.awt.Container parent)
Deprecated.
Lays out the scrollpane.
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Deprecated.
The minimum size of a
ScrollPane is the size of the insets
plus minimum size of the viewport, plus the scrollpane's
viewportBorder insets, plus the minimum size
of the visible headers, plus the minimum size of the
scrollbars whose displayPolicy isn't NEVER. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Deprecated.
The preferred size of a
ScrollPane is the size of the insets,
plus the 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(java.awt.Component c)
Deprecated.
Removes the specified component from the layout.
|
void |
setHorizontalScrollBarPolicy(int x)
Deprecated.
Sets the horizontal scrollbar-display policy.
|
void |
setVerticalScrollBarPolicy(int x)
Deprecated.
Sets the vertical scrollbar-display policy.
|
void |
syncWithScrollPane(javax.swing.JScrollPane sp)
Deprecated.
This method is invoked after the ScrollPaneLayout is set as the
LayoutManager of a
JScrollPane . |
protected javax.swing.JViewport viewport
JViewport
.JScrollPane.setViewport(javax.swing.JViewport)
protected javax.swing.JScrollBar vsb
JScrollBar
.JScrollPane.setVerticalScrollBar(javax.swing.JScrollBar)
protected javax.swing.JScrollBar hsb
JScrollBar
.JScrollPane.setHorizontalScrollBar(javax.swing.JScrollBar)
protected javax.swing.JViewport rowHead
null
.JScrollPane.setRowHeader(javax.swing.JViewport)
protected javax.swing.JViewport colHead
null
.JScrollPane.setColumnHeader(javax.swing.JViewport)
protected java.awt.Component lowerLeft
null
.JScrollPane.setCorner(java.lang.String, java.awt.Component)
protected java.awt.Component lowerRight
null
.JScrollPane.setCorner(java.lang.String, java.awt.Component)
protected java.awt.Component upperLeft
null
.JScrollPane.setCorner(java.lang.String, java.awt.Component)
protected java.awt.Component upperRight
null
.JScrollPane.setCorner(java.lang.String, java.awt.Component)
protected int vsbPolicy
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED
.
This field is obsolete, please use the JScrollPane
field instead.JScrollPane.setVerticalScrollBarPolicy(int)
protected int hsbPolicy
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED
.
This field is obsolete, please use the JScrollPane
field instead.JScrollPane.setHorizontalScrollBarPolicy(int)
public void syncWithScrollPane(javax.swing.JScrollPane sp)
JScrollPane
.
It initializes all of the internal fields that
are ordinarily set by addLayoutComponent
. For example:
ScrollPaneLayout mySPLayout = new ScrollPanelLayout() { public void layoutContainer(Container p) { super.layoutContainer(p); // do some extra work here ... } }; scrollpane.setLayout(mySPLayout):
syncWithScrollPane
in class javax.swing.ScrollPaneLayout
protected java.awt.Component addSingletonComponent(java.awt.Component oldC, java.awt.Component newC)
newC
. If oldC
is
not equal to newC
and is non-null
,
it will be removed from its parent.addSingletonComponent
in class javax.swing.ScrollPaneLayout
oldC
- the Component
to replacenewC
- the Component
to addnewC
public void addLayoutComponent(java.lang.String s, java.awt.Component c)
addLayoutComponent
in interface java.awt.LayoutManager
addLayoutComponent
in class javax.swing.ScrollPaneLayout
s
- the component identifierc
- the component to be addedjava.lang.IllegalArgumentException
- if s
is an invalid keypublic void removeLayoutComponent(java.awt.Component c)
removeLayoutComponent
in interface java.awt.LayoutManager
removeLayoutComponent
in class javax.swing.ScrollPaneLayout
c
- the component to removepublic int getVerticalScrollBarPolicy()
getVerticalScrollBarPolicy
in class javax.swing.ScrollPaneLayout
setVerticalScrollBarPolicy(int)
public void setVerticalScrollBarPolicy(int x)
JScrollPane
version
of this method. It only exists for backwards compatibility
with the Swing 1.0.2 (and earlier) versions of this class.setVerticalScrollBarPolicy
in class javax.swing.ScrollPaneLayout
x
- an integer giving the display policyjava.lang.IllegalArgumentException
- if x
is an invalid
vertical scroll bar policy, as listed abovepublic int getHorizontalScrollBarPolicy()
getHorizontalScrollBarPolicy
in class javax.swing.ScrollPaneLayout
setHorizontalScrollBarPolicy(int)
public void setHorizontalScrollBarPolicy(int x)
JScrollPane
version
of this method. It only exists for backwards compatibility
with the Swing 1.0.2 (and earlier) versions of this class.setHorizontalScrollBarPolicy
in class javax.swing.ScrollPaneLayout
x
- an int giving the display policyjava.lang.IllegalArgumentException
- if x
is not a valid
horizontal scrollbar policy, as listed abovepublic javax.swing.JViewport getViewport()
JViewport
object that displays the
scrollable contents.getViewport
in class javax.swing.ScrollPaneLayout
JViewport
object that displays the scrollable contentsJScrollPane.getViewport()
public javax.swing.JScrollBar getHorizontalScrollBar()
JScrollBar
object that handles horizontal scrolling.getHorizontalScrollBar
in class javax.swing.ScrollPaneLayout
JScrollBar
object that handles horizontal scrollingJScrollPane.getHorizontalScrollBar()
public javax.swing.JScrollBar getVerticalScrollBar()
JScrollBar
object that handles vertical scrolling.getVerticalScrollBar
in class javax.swing.ScrollPaneLayout
JScrollBar
object that handles vertical scrollingJScrollPane.getVerticalScrollBar()
public javax.swing.JViewport getRowHeader()
JViewport
object that is the row header.getRowHeader
in class javax.swing.ScrollPaneLayout
JViewport
object that is the row headerJScrollPane.getRowHeader()
public javax.swing.JViewport getColumnHeader()
JViewport
object that is the column header.getColumnHeader
in class javax.swing.ScrollPaneLayout
JViewport
object that is the column headerJScrollPane.getColumnHeader()
public java.awt.Component getCorner(java.lang.String key)
Component
at the specified corner.getCorner
in class javax.swing.ScrollPaneLayout
key
- the String
specifying the cornerComponent
at the specified corner, as defined in
ScrollPaneConstants
; if key
is not one of the
four corners, null
is returnedJScrollPane.getCorner(java.lang.String)
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
ScrollPane
is the size of the insets,
plus the 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.
Note that the rowHeader is calculated as part of the preferred width and the colHeader is calculated as part of the preferred size.
preferredLayoutSize
in interface java.awt.LayoutManager
preferredLayoutSize
in class javax.swing.ScrollPaneLayout
parent
- the Container
that will be laid outDimension
object specifying the preferred size of the
viewport and any scrollbarsViewportLayout
,
LayoutManager
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
ScrollPane
is the size of the insets
plus minimum size of the viewport, plus the scrollpane's
viewportBorder insets, plus the minimum size
of the visible headers, plus the minimum size of the
scrollbars whose displayPolicy isn't NEVER.minimumLayoutSize
in interface java.awt.LayoutManager
minimumLayoutSize
in class javax.swing.ScrollPaneLayout
parent
- the Container
that will be laid outDimension
object specifying the minimum sizepublic void layoutContainer(java.awt.Container parent)
displayPolicy
is ALWAYS, it's treated like the row header with respect to its
dimensions and is made visible.
null
viewportBorder
, then space is allocated for that.
layoutContainer
in interface java.awt.LayoutManager
layoutContainer
in class javax.swing.ScrollPaneLayout
parent
- the Container
to lay out@Deprecated public java.awt.Rectangle getViewportBorderBounds(javax.swing.JScrollPane scrollpane)
JScrollPane.getViewportBorderBounds()
.getViewportBorderBounds
in class javax.swing.ScrollPaneLayout