This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing
class ViewportLayout

java.lang.Object extended by javax.swing.ViewportLayout
All Implemented Interfaces:
LayoutManager, Serializable

public class ViewportLayout
extends Object
implements LayoutManager, Serializable

The default layout manager for 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 JavaBeansTM has been added to the java.beans package. Please see {@link java.beans.XMLEncoder}.


Constructor Summary

          
 
Method Summary
 void

          Adds the specified component to the layout.
 void

          Called by the AWT when the specified container needs to be laid out.
 Dimension

          Returns the minimum dimensions needed to layout the components contained in the specified target container.
 Dimension

          Returns the preferred dimensions for this layout given the components in the specified target container.
 void

          Removes the specified component from the layout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewportLayout

public ViewportLayout()
Method Detail

addLayoutComponent

public void addLayoutComponent(String name,
                               Component c)
Adds the specified component to the layout. Not used by this class.

Parameters:
name - the name of the component
c - the the component to be added

layoutContainer

public void layoutContainer(Container parent)
Called by the AWT when the specified container needs to be laid out.

Parameters:
parent - the container to lay out

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Returns the minimum dimensions needed to layout the components contained in the specified target container.

Parameters:
parent - the component which needs to be laid out
Returns:
a Dimension object containing the minimum dimensions

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Returns the preferred dimensions for this layout given the components in the specified target container.

Parameters:
parent - the component which needs to be laid out
Returns:
a Dimension object containing the preferred dimensions

removeLayoutComponent

public void removeLayoutComponent(Component c)
Removes the specified component from the layout. Not used by this class.

Parameters:
c - the component to remove


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.