Class PackLayout
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class PackLayout

public class netscape.application.PackLayout
    extends java.lang.Object
    implements netscape.application.LayoutManager,
               netscape.util.Codable
{
    /* Constructors
     */
    public PackLayout();

    /* Methods
     */
    public void addSubview(View);
    public PackConstraints constraintsFor(View);
    public void decode(Decoder);
    public void describeClassInfo(ClassInfo);
    public void encode(Encoder);
    public void finishDecoding();
    public void layoutView(View, int, int);
    public void removeSubview(View);
    public void setConstraints(View, PackConstraints);
}
Object subclass implementing a LayoutManager similar to the TK Packer. See the PackConstraints class for more information about the available settings can be used.

Note: Because Views do not call layoutView() whenever subviews are added or removed, an application using a PackLayout must explicitly call the PackLayout View's layoutView() with a zero delta width and delta height. Calling layoutView() in this manner will cause the LayoutManager to properly position and size the View's subviews.

See Also:
PackConstraints

Constructors

PackLayout

  public PackLayout()
Constructs a PackLayout.

Methods

constraintsFor

  public PackConstraints constraintsFor(View aView)
Returns the PackConstraints object associated with aView.

addSubview

  public void addSubview(View aView)
Adds aView to the PackLayout with default PackConstraints.
See Also:
LayoutManager, PackConstraints

setConstraints

  public void setConstraints(View aView,
                             PackConstraints constraints)
Associates the PackConstraints constraints with aView. You usually call this method to associate non-default constraints with a particular View.

Note: This method adds a clone of constraints to its internal constraint container. You can therefore reconfigure and pass in the PackConstraints same instance on each call without no side effects.

removeSubview

  public void removeSubview(View aView)
Removes aView from the PackLayout.
See Also:
LayoutManager

layoutView

  public void layoutView(View aView,
                         int deltaWidth,
                         int deltaHeight)
Positions and sizes its View's subviews according to the constraints associated with each subview.
See Also:
LayoutManager

describeClassInfo

  public void describeClassInfo(ClassInfo info)
Describes the PackLayout class' coding information.
See Also:
describeClassInfo

decode

  public void decode(Decoder decoder) throws CodingException
Encodes the PackLayout.
See Also:
encode

encode

  public void encode(Encoder encoder) throws CodingException
Decodes the PackLayout.
See Also:
decode

finishDecoding

  public void finishDecoding() throws CodingException
Finishes the PackLayout's decoding.
See Also:
finishDecoding

All Packages  Class Hierarchy  This Package  Previous  Next  Index