|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.ScrollPaneLayout
maspack.widgets.ScrollPaneLayout
public class ScrollPaneLayout
This is an override of ScrollPaneLayout which fixes a bug that occurs when a window containing a scroll pane is repacked. When that occurs, viewport.getViewSize() returns the existing size of the client view window rather than its preferred size, which can cause problems because the existing size is not necessarily the final client size after the repack. To fix this, this class reimplements the preferredLayoutSize method to always use the preferred size of the view client.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.ScrollPaneLayout |
---|
javax.swing.ScrollPaneLayout.UIResource |
Field Summary |
---|
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 | |
---|---|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
|
Methods inherited from class javax.swing.ScrollPaneLayout |
---|
addLayoutComponent, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorderBounds, layoutContainer, minimumLayoutSize, removeLayoutComponent, setHorizontalScrollBarPolicy, setVerticalScrollBarPolicy, syncWithScrollPane |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScrollPaneLayout()
Method Detail |
---|
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize
in interface java.awt.LayoutManager
preferredLayoutSize
in class javax.swing.ScrollPaneLayout
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |