Packageorg.aswing
Classpublic class ViewportLayout
InheritanceViewportLayout Inheritance EmptyLayout

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.



Public Methods
 MethodDefined by
 Inherited
addLayoutComponent(comp:Component, constraints:Object):void
Do nothing Adds the specified component to the layout, using the specified constraint object.
EmptyLayout
 Inherited
return 0
EmptyLayout
 Inherited
return 0
EmptyLayout
 Inherited
do nothing
EmptyLayout
  
Called by the AWT when the specified container needs to be laid out.
ViewportLayout
 Inherited
return IntDimension.createBigDimension();
EmptyLayout
 Inherited
new IntDimension(0, 0);
EmptyLayout
  
Returns the preferred dimensions for this layout given the components in the specified target container.
ViewportLayout
 Inherited
Do nothing Removes the specified component from the layout.
EmptyLayout
Method detail
layoutContainer()method
public override function layoutContainer(parent:Container):void

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

Parameters
parent:Container — the container to lay out
preferredLayoutSize()method 
public override function preferredLayoutSize(parent:Container):IntDimension

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

Parameters
parent:Container — the component which needs to be laid out

Returns
IntDimension — a Dimension object containing the preferred dimensions

See also