Packages
 In this topic

*Constructors

*Methods

 

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

 


Class UICardLayout

public class UICardLayout extends UILayoutManager
{
  // Constructors
  public UICardLayout();
  public UICardLayout(int h, int v);

  // Methods
  public void addLayoutComponent(IUIContainer parent,
        IUIComponent comp, Object constraints);
  public void first(IUIContainer parent);
  public Dimension getMinimumSize(IUIContainer parent);
  public Dimension getPreferredSize(IUIContainer parent);
  public boolean isOverlapping();
  public void last(IUIContainer parent);
  public void layout(IUIContainer parent, Rectangle bounds);
  public IUIComponent navigate(IUIContainer cont,
        IUIComponent comp, int dir, boolean keyable);
  public void next(IUIContainer parent);
  public void previous(IUIContainer parent);
  public void show(IUIContainer parent, String name);
}

This class is a layout manager used to place components on top of one another, showing only one of them at any given time (similar to cascading windows). Typically, card layouts are used for the content area below the tabs of a property sheet.

UILayoutManager
  |
  +--UICardLayout

Constructors

UICardLayout

public UICardLayout();

Creates a UICardLayout manager object with default horizontal and vertical gaps.

UICardLayout

public UICardLayout(int h, int v);

Creates a UICardLayout manager object with the specified horizontal and vertical gaps.

ParameterDescription
h The number of pixels used for the horizontal gap that appears to the left and right of components laid out with the manager (by default, this is 0).
v The number of pixels used for the vertical gap that appears above and below the components laid out with the manager (by default, this is 0).

Methods

addLayoutComponent

public void addLayoutComponent(IUIContainer parent, IUIComponent comp,
        Object constraints);

Adds the specified component to the container, according to the specified constraints.

Return Value:

No return value.

ParameterDescription
parent The container of the component.
comp The component to be added.
constraints The layout constraints identifying where the component will be added.

Overrides:

addLayoutComponent(IUIContainer,IUIComponent,Object) in UILayoutManager.

first

public void first(IUIContainer parent);

Shows and lays out the first component in the container, hiding all other components.

Return Value:

No Return value.

ParameterDescription
parent The parent of the container.

getMinimumSize

public Dimension getMinimumSize(IUIContainer parent);

Determines the minimum size (in pixels) of the control.

Return Value:

Returns the control's minimum size.

ParameterDescription
parent The parent container.

Overrides:

getMinimumSize(IUIContainer) in UILayoutManager.

getPreferredSize

public Dimension getPreferredSize(IUIContainer parent);

Determines the preferred dimensions (in pixels) for displaying the control.

Return Value:

Returns a Dimension object containing the preferred size.

ParameterDescription
parent The parent container.

Overrides:

getPreferredSize(IUIContainer) in UILayoutManager.

isOverlapping

public boolean isOverlapping();

Determines if this layout manager lays out its children so they overlap either completely or partially.

Return Value:

Returns true. The UICardLayout layout manager always overlaps components.

Overrides:

isOverlapping() in UILayoutManager.

last

public void last(IUIContainer parent);

Shows and lays out the last component in the container, hiding all other components.

Return Value:

No Return value.

ParameterDescription
parent The parent of the container.

layout

public void layout(IUIContainer parent, Rectangle bounds);

Lays out the components in the associated root container.

Return Value:

No return value.

ParameterDescription
parent The parent of the container.
bounds The size (in pixels) to set the visible component to.

Remarks:

The visible component is the full size of the bounds parameter, reduced on the left and right by the layout manager's horizontal gap, and above and below by the manager's vertical gap.

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

Overrides:

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

next

public void next(IUIContainer parent);

Shows and lays out the next component in the container (after the currently visible component), hiding all other components.

Return Value:

No Return value.

ParameterDescription
parent The parent of the container.

previous

public void previous(IUIContainer parent);

Shows and lays out the previous component in the container (relative to the currently visible component), hiding all other components.

Return Value:

No Return value.

ParameterDescription
parent The parent of the container.

show

public void show(IUIContainer parent, String name);

Shows and lays out the component with the specified name, hiding all other components.

Return Value:

No return value.

ParameterDescription
parent The parent of the container.
name The name of the component.

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