|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.ViewportLayout
public class ViewportLayout
The default layout for JViewport
. The viewport makes its view the
same size as itself, but not smaller than its minimum size.
If the port extends extends into space past the edge of the view,
this layout manager moves the port up or to the left, in view space, by the
amount of empty space (keep the lower and right edges lined up).
Constructor Summary | |
---|---|
ViewportLayout()
|
Method Summary | |
---|---|
void |
addLayoutComponent(String name,
Component c)
The method is not used with this manager. |
void |
layoutContainer(Container parent)
Layout the view and viewport to respect the following rules. |
Dimension |
minimumLayoutSize(Container parent)
Get the minimum layout size. |
Dimension |
preferredLayoutSize(Container parent)
Get the preferred layout size. |
void |
removeLayoutComponent(Component c)
The method is not used with this manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewportLayout()
Method Detail |
---|
public void addLayoutComponent(String name, Component c)
addLayoutComponent
in interface LayoutManager
name
- the name of the component to addc
- the component to addpublic void removeLayoutComponent(Component c)
removeLayoutComponent
in interface LayoutManager
c
- the component to removepublic Dimension preferredLayoutSize(Container parent)
Scrollable
, this method returns
Scrollable.getPreferredScrollableViewportSize()
.
Otherwise, it returns Component.getPreferredSize()
.
preferredLayoutSize
in interface LayoutManager
parent
- the parent container to lay out
LayoutManager.minimumLayoutSize(Container)
public Dimension minimumLayoutSize(Container parent)
Component.getMinimumSize()
.
If the view is not set, the zero size is returned.
minimumLayoutSize
in interface LayoutManager
parent
- the viewport
LayoutManager.preferredLayoutSize(Container)
public void layoutContainer(Container parent)
JViewport.setViewSize(Dimension)
, the view size is never
set smaller that its minimum size.
layoutContainer
in interface LayoutManager
parent
- the container to lay outJViewport.getViewSize()
,
JViewport.setViewSize(java.awt.Dimension)
,
JViewport.getViewPosition()
,
JViewport.setViewPosition(java.awt.Point)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |