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

Class UITabLayout

Constructors , Methods

public class UITabLayout extends UILayoutManager
{
  // Constructors
  public UITabLayout();	

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

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

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

A class that implements a tab layout manager.


Constructors


UITabLayout

public UITabLayout();	

Creates a tab layout manager.


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 parent);

Lays out the components in the specified container.

Return Value:

No return value.

ParameterDescription
parent The container of the components being laid out.


minimumLayoutSize

public Dimension minimumLayoutSize(Container parent);

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 size.

ParameterDescription
parent 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:

Always returns null, indicating no component can be navigated to.

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


preferredLayoutSize

public Dimension preferredLayoutSize(Container parent);

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

Return Value:

Returns a Dimension object containing the preferred size.

ParameterDescription
parent 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.

Return Value:

No return value.

ParameterDescription
comp The component to be removed.

Remarks:

The default implementation does nothing.



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