Package com.ms.ui Previous
Previous
Contents
Contents
Index
Index
Next
Next

Class UIFixedFlowLayout

Constructors , Methods , Fields

public class UIFixedFlowLayout extends UILayoutManager
{
   // Fields
   public static final int HEADER;

   // Constructors
   public UIFixedFlowLayout();
   public UIFixedFlowLayout(int style);
   public UIFixedFlowLayout(int style, int hgap, int vgap);

   // Methods
   public void addLayoutComponent(String name, Component comp);
   public void removeLayoutComponent(Component comp);

  public void layoutContainer(Container target);
  public Dimension minimumLayoutSize(Container target);
  public Dimension preferredLayoutSize(Container target);

  public Component navigate(Container cont, Component comp, int dir, 
                             boolean keyable);
}

A class that implements a fixed-width flow layout manager.


Constructors


UIFixedFlowLayout

public UIFixedFlowLayout();

Creates a fixed-width flow layout manager with no header and with horizontal and vertical gaps set to 5 pixels each.


UIFixedFlowLayout

public UIFixedFlowLayout(int style);

Creates a fixed-width flow layout manager with the specified style and with horizontal and vertical gaps set to 5 pixels each.

ParameterDescription
style The layout style. Specify HEADER for the layout manager to use a header, or 0 for no header.


UIFixedFlowLayout

public UIFixedFlowLayout(int style, int hgap, int vgap);

Creates a fixed-width flow layout manager with the specified style and the specified horizontal and vertical gaps values.

ParameterDescription
style The layout style. Specify HEADER for the layout manager to use a header, or 0 for no header.
hgap The horizontal gap between components.
vgap The vertical gap between components.


Methods


addLayoutComponent

public void addLayoutComponent(String name, Component comp);

Adds or replaces the specified layout component with the given component.

Return Value:

No return value.

ParameterDescription
name The layout name identifying the component to be added or replaced.
comp The component to be added.

Remarks:

The default implementation does nothing.


layoutContainer

public void layoutContainer(Container target);

Lays out the components in the specified container.

Return Value:

No return value.

ParameterDescription
target The container of the components being laid out.


minimumLayoutSize

public Dimension minimumLayoutSize(Container target);

Determines the minimum dimensions (in pixels) needed to lay out the components in the specified container.

Return Value:

Returns a Dimension object containing the minimum dimensions.

ParameterDescription
target The container of the components to be laid out.

Remarks:

The minimum layout size is determined from the minimum size of each component in the container.


navigate

public Component navigate(Container cont, Component comp, int dir, 
                          boolean keyable);

Navigates to another component from the specified component in the given direction.

Return Value:

Returns the component navigated to, or null if no component in the specified direction exists.

ParameterDescription
cont The container where the navigation is occurring.
comp The component from which to navigate.
dir The direction to navigate. Specify one of the field values in IUIAccessible.
keyable If true, non-keyable components will be ignored during the navigation; otherwise, all components can be navigated to.

Remarks:

If an undefined direction is specified, an IllegalArgumentException is thrown.


preferredLayoutSize

public Dimension preferredLayoutSize(Container target);

Determines the preferred dimensions (in pixels) for laying out the components in the specified container.

Return Value:

Returns a Dimension object containing the preferred dimensions.

ParameterDescription
target The container of the components to be laid out.

Remarks:

The preferred layout size is determined from the preferred size of each component in the container.


removeLayoutComponent

public void removeLayoutComponent(Component comp)

Removes the specified component from the layout.

Return Value:

No return value.

ParameterDescription
comp The component to be removed.

Remarks:

The default implementation does nothing.


Fields

HEADER
Specifies that the layout manager uses a header when laying out the container.


Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.