Spec-Zone .ru
спецификации, руководства, описания, API
|
|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.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 applications running the same version of Swing. A future release of Swing will provide support for long term persistence.
JScrollPane
,
JViewport
, Serialized FormInner Class Summary | |
static class |
ScrollPaneLayout.UIResource
The UI resource version of ScrollPaneLayout. |
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. |
protected Component |
addSingletonComponent(Component oldC,
Component newC)
The method used to replace an existing component (if any) with a new one. |
JViewport |
getColumnHeader()
Returns the JViewport object that is the column header. |
Component |
getCorner(String key)
Returns the Component at the specified corner. |
JScrollBar |
getHorizontalScrollBar()
Returns the JScrollbar object that handles horizontal scrolling. |
int |
getHorizontalScrollBarPolicy()
Returns the horizontal scrollbar-display policy. |
JViewport |
getRowHeader()
Returns the JViewport object that is the row header. |
JScrollBar |
getVerticalScrollBar()
Returns the JScrollbar object that handles vertical scrolling. |
int |
getVerticalScrollBarPolicy()
Returns the vertical scrollbar-display policy. |
JViewport |
getViewport()
Returns the JViewport object that displays the scrollable contents. |
Rectangle |
getViewportBorderBounds(JScrollPane scrollpane)
Deprecated. As of JDK version Swing1.1 replaced by JScrollPane.getViewportBorderBounds() . |
void |
layoutContainer(Container parent)
Lay out 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)
Sets the horizontal scrollbar-display policy. |
void |
setVerticalScrollBarPolicy(int x)
Sets the vertical scrollbar-display policy. |
void |
syncWithScrollPane(JScrollPane sp)
This method must be called 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(javax.swing.JViewport)
protected JScrollBar vsb
JScrollPane#setVerticalScrollbar
protected JScrollBar hsb
JScrollPane#setHorizontalScrollbar
protected JViewport rowHead
JScrollPane.setRowHeader(javax.swing.JViewport)
protected JViewport colHead
JScrollPane.setColumnHeader(javax.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
This field is obsolete, please use the JScrollPane field instead.
JScrollPane.setVerticalScrollBarPolicy(int)
protected int hsbPolicy
This field is obsolete, please use the JScrollPane field instead.
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)
key
- the String specifying the cornerScrollPaneConstants
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()
.
|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |