|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.java.swing.ScrollPaneLayout
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.
JScrollPane
,
JViewport
, Serialized FormInner Class Summary | |
static class |
ScrollPaneLayout.UIResource
|
Field Summary | |
protected JViewport |
colHead
The column header child. |
protected JScrollBar |
hsb
The scrollpanes horizontal scrollbar child. |
protected int |
hsbPolicy
The display policy for the horizontal scrollbar. |
protected Component |
lowerLeft
The component to display in the lower left corner. |
protected Component |
lowerRight
The component to display in the lower right corner. |
protected JViewport |
rowHead
The row header child. |
protected Component |
upperLeft
The component to display in the upper left corner. |
protected Component |
upperRight
The component to display in the upper right corner. |
protected JViewport |
viewport
The scrollpanes viewport child. |
protected JScrollBar |
vsb
The scrollpanes vertical scrollbar child. |
protected int |
vsbPolicy
The display policy for the vertical scrollbar. |
Constructor Summary | |
ScrollPaneLayout()
|
Method Summary | |
void |
addLayoutComponent(String s,
Component c)
Adds the specified component to the layout, identifying it as one of: JScrollPane. |
protected Component |
addSingletonComponent(Component oldC,
Component newC)
The method used to replace an existing component (if any) with a new one. |
JViewport |
getColumnHeader()
|
Component |
getCorner(String key)
|
JScrollBar |
getHorizontalScrollBar()
|
int |
getHorizontalScrollBarPolicy()
Returns the horizontal scrollbar-display policy. |
JViewport |
getRowHeader()
|
JScrollBar |
getVerticalScrollBar()
|
int |
getVerticalScrollBarPolicy()
Returns the vertical scrollbar-display policy. |
JViewport |
getViewport()
|
Rectangle |
getViewportBorderBounds(JScrollPane scrollpane)
Deprecated. As of JDK version Swing1.1 replaced by JScrollPane.getViewportBorderBounds() . |
void |
layoutContainer(Container parent)
Layout the scrollpane. |
Dimension |
minimumLayoutSize(Container parent)
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. |
Dimension |
preferredLayoutSize(Container parent)
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(Component c)
Removes the specified component from the layout. |
void |
setHorizontalScrollBarPolicy(int x)
Returns the horizontal scrollbar-display policy, where the options are: JScrollPane. |
void |
setVerticalScrollBarPolicy(int x)
Returns the vertical scrollbar-display policy, where the options are: JScrollPane. |
void |
syncWithScrollPane(JScrollPane sp)
This method can be called should be after setting a JScrollPanes layout manager. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected JViewport viewport
JScrollPane.setViewport(com.sun.java.swing.JViewport)
protected JScrollBar vsb
JScrollPane#setVerticalScrollbar
protected JScrollBar hsb
JScrollPane#setHorizontalScrollbar
protected JViewport rowHead
JScrollPane.setRowHeader(com.sun.java.swing.JViewport)
protected JViewport colHead
JScrollPane.setColumnHeader(com.sun.java.swing.JViewport)
protected Component lowerLeft
JScrollPane.setCorner(java.lang.String, java.awt.Component)
protected Component lowerRight
JScrollPane.setCorner(java.lang.String, java.awt.Component)
protected Component upperLeft
JScrollPane.setCorner(java.lang.String, java.awt.Component)
protected Component upperRight
JScrollPane.setCorner(java.lang.String, java.awt.Component)
protected int vsbPolicy
JScrollPane.setVerticalScrollBarPolicy(int)
protected int hsbPolicy
JScrollPane.setHorizontalScrollBarPolicy(int)
Constructor Detail |
public ScrollPaneLayout()
Method Detail |
public void syncWithScrollPane(JScrollPane sp)
ScrollPaneLayout mySPLayout = new ScrollPanelLayout() { public void layoutContainer(Container p) { super.layoutContainer(p); // do some extra work here ... } }; scrollpane.setLayout(mySPLayout): mySPLayout.syncWithScrollPane(scrollpane);
protected Component addSingletonComponent(Component oldC, Component newC)
oldC
- the Component to replacenewC
- the Component to addpublic void addLayoutComponent(String s, Component c)
s
- the component identifiercomp
- the the component to be addedpublic void removeLayoutComponent(Component c)
c
- the component to removepublic int getVerticalScrollBarPolicy()
setVerticalScrollBarPolicy(int)
public void setVerticalScrollBarPolicy(int x)
x
- an int giving the display policypublic int getHorizontalScrollBarPolicy()
setHorizontalScrollBarPolicy(int)
public void setHorizontalScrollBarPolicy(int x)
x
- an int giving the display policypublic JViewport getViewport()
JScrollPane.getViewport()
public JScrollBar getHorizontalScrollBar()
JScrollPane.getHorizontalScrollBar()
public JScrollBar getVerticalScrollBar()
JScrollPane.getVerticalScrollBar()
public JViewport getRowHeader()
JScrollPane.getRowHeader()
public JViewport getColumnHeader()
JScrollPane.getColumnHeader()
public Component getCorner(String key)
JScrollPane.getCorner(java.lang.String)
public Dimension preferredLayoutSize(Container parent)
parent
- the Container that will be laid outViewportLayout
,
LayoutManager
public Dimension minimumLayoutSize(Container parent)
parent
- the Container that will be laid outpublic void layoutContainer(Container parent)
parent
- the Container to lay outpublic Rectangle getViewportBorderBounds(JScrollPane scrollpane)
JScrollPane.getViewportBorderBounds()
.
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |