JViewport.
ViewportLayout defines
a policy for layout that should be useful for most applications.
The viewport makes its view the same size as the viewport,
however it will not make the view smaller than its minimum size.
As the viewport grows the view is kept bottom justified until
the entire view is visible, subsequently the view is kept top
justified.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. As of 1.4, support for long term storage
of all JavaBeans
has been added to the java.beans package.
Please see java..
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static ViewportLayout |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addLayoutComponent(String
the name of the component name, Component the component to be added c)Implements java. Adds the specified component to the layout. |
| public void | layoutContainer(Container
the container to lay out parent)Implements java. Called by the AWT when the specified container needs to be laid out. |
| public Dimension | Returns: aDimension object containing the minimum
dimensionsthe component which needs to be laid out parent)Implements java. Returns the minimum dimensions needed to layout the components contained in the specified target container. |
| public Dimension | Returns: aDimension object containing the
preferred dimensionsthe component which needs to be laid out parent)Implements java. Returns the preferred dimensions for this layout given the components in the specified target container. |
| public void | removeLayoutComponent(Component
the component to remove c)Implements java. Removes the specified component from the layout. |
| SHARED_INSTANCE | back to summary |
|---|---|
| pack-priv static ViewportLayout SHARED_INSTANCE | |
| ViewportLayout | back to summary |
|---|---|
| public ViewportLayout() Constructs a | |
| addLayoutComponent | back to summary |
|---|---|
| public void addLayoutComponent(String name, Component c) Implements java. Adds the specified component to the layout. Not used by this class. | |
| layoutContainer | back to summary |
|---|---|
| public void layoutContainer(Container parent) Implements java. Called by the AWT when the specified container needs to be laid out. | |
| minimumLayoutSize | back to summary |
|---|---|
| public Dimension minimumLayoutSize(Container parent) Implements java. Returns the minimum dimensions needed to layout the components contained in the specified target container.
| |
| preferredLayoutSize | back to summary |
|---|---|
| public Dimension preferredLayoutSize(Container parent) Implements java. Returns the preferred dimensions for this layout given the components in the specified target container.
| |
| removeLayoutComponent | back to summary |
|---|---|
| public void removeLayoutComponent(Component c) Implements java. Removes the specified component from the layout. Not used by this class.
| |