Packages
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.ui   Previous This
Package
Next

 


Class UITabLayout

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

  // Methods
  public Dimension getMinimumSize(IUIContainer parent);
  public Dimension getPreferredSize(IUIContainer parent);
  public void layout(IUIContainer parent, Rectangle bounds);
  public IUIComponent navigate(IUIContainer cont,
        IUIComponent comp, int dir, boolean keyable);
}

This class implements a layout manager for a collection of tab controls and their pages. UITabLayout is used by UITabViewer, which manages a UITabList object and a set of associated pages. The tabs contained in the UITabList object are laid out consecutively, and in a single row. Because UITabViewer only displays the page of the tab that is currently selected, UITabLayout only lays out the page that is currently visible.

UILayoutManager
  |
  +--UITabLayout

Constructors

UITabLayout

public UITabLayout();

Creates a tab layout manager.

Methods

getMinimumSize

public Dimension getMinimumSize(IUIContainer parent);

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

Return Value:

Returns a Dimension object containing the minimum layout size.

ParameterDescription
parent The container of the components.

Remarks:

Typically, the container is a UITabViewer control, which manages a UITabList object and a set of associated pages. The width of the returned Dimension object is the minimum width of the page that is currently displayed. The Dimension object's height is the sum of the minimum height of the displayed page, the minimum layout height of the UITabList object.

Overrides:

getMinimumSize(IUIContainer) in UILayoutManager.

See Also: getPreferredSize

getPreferredSize

public Dimension getPreferredSize(IUIContainer parent);

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

Return Value:

Returns a Dimension object containing the preferred layout size.

ParameterDescription
parent The container of the components.

Remarks:

Typically, the container is a UITabViewer control, which manages a UITabList object and a set of associated pages. The width of the returned Dimension object is the preferred width of the page that is currently displayed. The Dimension object's height is the sum of the preferred height of the displayed page, the preferred layout height of the UITabList object.

Overrides:

getPreferredSize(IUIContainer) in UILayoutManager.

See Also: getMinimumSize

layout

public void layout(IUIContainer parent, Rectangle bounds);

Lays out the components in the specified container.

Return Value:

No return value.

ParameterDescription
parent The container being laid out.
bounds The bounding rectangle in which to lay out the components.

Remarks:

Typically, the container is a UITabViewer control, which manages a UITabList object and a set of associated pages. layout lays out the UITabList object at the top-left corner of the UITabViewer control. The height and width of the UITabList object are set to its preferred height and the UITabViewer control's width, respectively. The tabs contained in the UITabList object are laid out consecutively, and in a single row.

Note UITabViewer only displays the page of the tab that is currently selected. As a result, layout only lays out the page component that is currently visible.

Overrides:

layout(IUIContainer,Rectangle) in UILayoutManager.

navigate

public IUIComponent navigate(IUIContainer cont, IUIComponent comp, int dir,
        boolean keyable);

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

Return Value:

Returns the component navigated to (if a component in the specified direction exists); otherwise, returns null.

ParameterDescription
cont The container where the navigation is occurring.
comp The component to navigate from.
dir The navigation direction. Specify one of the NAVDIR values defined in the IUIAccessible interface.
keyable If true, only components that are able to receive keyboard input can be navigated to; otherwise, all components can be navigated to.

Remarks:

Typically, this method is used to handle keyboard navigation in the container. However, UITabLayout does not provide this functionality.

Overrides:

navigate(IUIContainer,IUIComponent,int,boolean) in UILayoutManager.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.