Packages
 In this topic

*Methods

 

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

 


Interface IUILayoutManager

public interface IUILayoutManager
{
  // Methods
  public void addLayoutComponent(IUIContainer cont,
        IUIComponent comp, Object constraints);
  public Dimension adjustLayoutSize(IUIContainer parent,
        Dimension oldParentSize, IUIComponent comp,
        Dimension oldSize, Dimension newSize);
  public boolean continueInvalidate(IUIContainer cont, IUIComponent
        comp);
  public IUIComponent getComponent(IUIContainer cont, int index);
  public IUIComponent getComponent(IUIContainer cont,
        Object constraints);
  public int getComponentIndex(IUIContainer cont,
        IUIComponent comp);
  public Dimension getMinimumSize(IUIContainer cont);
  public Dimension getPreferredSize(IUIContainer cont);
  public Dimension getPreferredSize(IUIContainer cont,
        Dimension size);
  public boolean isHeightRelative();
  public boolean isOverlapping();
  public boolean isWidthRelative();
  public void layout(IUIContainer cont, Rectangle bounds);
  public IUIComponent navigate(IUIContainer cont,
        IUIComponent comp, int direction, boolean keyable);
  public void paintContainer(IUIContainer cont, FxGraphics g);
  public void removeLayoutComponent(IUIContainer cont, IUIComponent
        comp);
}

This interface defines methods associated with layout managers. UILayoutManager implements IUILayoutManager.

Methods

addLayoutComponent

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

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

Return Value:

No return value.

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

adjustLayoutSize

public Dimension adjustLayoutSize(IUIContainer parent,
        Dimension oldParentSize, IUIComponent comp, Dimension oldSize,
        Dimension newSize);

Adjusts the layout size of the specified component in the specified container.

Return Value:

Returns a Dimension object that specifies the new size of the container.

ParameterDescription
parent The container of the component.
oldParentSize The previous layout size of the container.
comp The component being sized.
oldSize The previous layout size of the component.
newSize The new layout size of the component.

continueInvalidate

public boolean continueInvalidate(IUIContainer cont, IUIComponent comp);

Currently not implemented.

getComponent

public IUIComponent getComponent(IUIContainer cont, int index);

Retrieves the component at the specified index.

Return Value:

Returns the specified component, if found; otherwise, returns null.

ParameterDescription
cont The container of the component.
index The zero-based index of the component to retrieve.

getComponent

public IUIComponent getComponent(IUIContainer cont, Object constraints);

Retrieves a component from the container according to the specified constraints.

Return Value:

Returns the specified component, if found; otherwise, returns null.

ParameterDescription
cont The container of the component.
constraints Identifies the component to be retrieved.

getComponentIndex

public int getComponentIndex(IUIContainer cont, IUIComponent comp);

Retrieves the layout index of the specified component from the container.

Return Value:

Returns the layout index of the component, or -1 if component is not in the container.

ParameterDescription
cont The container of the component.
comp The component whose layout index is being retrieved.

getMinimumSize

public Dimension getMinimumSize(IUIContainer cont);

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

Return Value:

Returns a Dimension object that specifies the minimum layout size.

ParameterDescription
cont The container of the components.

getPreferredSize

public Dimension getPreferredSize(IUIContainer cont);

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

Return Value:

Returns a Dimension object that specifies the preferred layout size.

ParameterDescription
cont The container of the components.

getPreferredSize

public Dimension getPreferredSize(IUIContainer cont, Dimension size);

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

Return Value:

Returns a Dimension object containing the preferred layout size.

ParameterDescription
cont The container of the components.
size The size of the container.

isHeightRelative

public boolean isHeightRelative();

Determines if this layout manager uses the height of the container to lay out its children.

Return Value:

Returns true if this layout manager uses the container's height to lay out the children; otherwise, returns false. (The default is true.) Returning false also means that the container's layout method doesn't need to be called on a horizontal resizing.

See Also: isWidthRelative

isOverlapping

public boolean isOverlapping();

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

Return Value:

Returns true if the children overlap; otherwise, returns false. (The default is true.) Returning false also means that only the sibling floater window, if one exists, needs to be clipped by the manager.

isWidthRelative

public boolean isWidthRelative();

Determines whether the components relative width state is set.

Return Value:

Returns true if this layout manager uses the container's width to lay out the children; otherwise, returns false. (The default is true.) Returning false also means that the container's layout method doesn't need to be called on a vertical resizing.

See Also: isHeightRelative

layout

public void layout(IUIContainer cont, Rectangle bounds);

Lays out the child components in the specified container.

Return Value:

No return value.

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

navigate

public IUIComponent navigate(IUIContainer cont, IUIComponent comp,
        int direction, 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.
direction 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.

paintContainer

public void paintContainer(IUIContainer cont, FxGraphics g);

Draws the container.

Return Value:

No return value.

ParameterDescription
cont The container.
g The graphics context of the container.

removeLayoutComponent

public void removeLayoutComponent(IUIContainer cont, IUIComponent comp);

Removes the specified component from the container.

Return Value:

No return value.

ParameterDescription
cont The container of the component.
comp The component to be removed.

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