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

Interface IUIContainer

Methods

public interface IUIContainer
{
  // Methods
  public int countChildren();
  public void removeAllChildren();

  public int continueInvalidate();
  public boolean continueInvalidate(Component comp);
  public void fullValidate(Component comp);

  public Component navigate(Component comp, int direction, boolean keyable);
  public Component passFocus(Event e, int key);

  public Component getChild(int index);
  public Rectangle getClientRect();
  public int getCompIndex(Component comp);
  public Component getComponent(Component comp);
  public Component getComponent(String name);
  public int getEdge();
  public Component getFocusComp();
  public Component getHeader();
  public UILayoutManager getUILayout();

  public void setEdge(int flags);
  public Component setHeader(Component header);

}

Defines an interface for the extensions to the Container class.


Methods


continueInvalidate

public int continueInvalidate();

Determines whether an invalidate of any child should invalidate this container as well, continuing the propogation

Return Value:

Returns 1 for continue, -1 for don't continue, or 0 to ask for each component


continueInvalidate

public boolean continueInvalidate(Component comp);

Determines whether an invalidate of the specified child should invalidate this container as well, continuing the propogation.

Return Value:

Returns true for continue; false for don't continue.

ParameterDescription
comp The invalidated component.


countChildren

public int countChildren();

Retrieves the number of children in this object, not including the header child.

Return Value:

Returns the number of children in this object.


fullValidate

public void fullValidate(Component comp);

Performs a validation from the outermost container effected by the given component's invalidation.

Return Value:

No return value.

ParameterDescription
comp The component to be validated.


getChild

public Component getChild(int index);

Retrieves the specified child in this object.

Return Value:

Returns the child at the specified index.

ParameterDescription
index Index in the component array of the child object to retrieve.


getCompIndex

public int getCompIndex(Component comp);

Retrieves the component's index of the specified component.

Return Value:

Returns the location of the component in the container's component array.

ParameterDescription
comp The component whose index is to be retrieved.


getComponent

public Component getComponent(Component comp);

Retrieves the child component that contains the specified component in its hierarchy.

Return Value:

Returns the child of container that contains comp parameter, or null if comp parameter is not in this hierarchy.

ParameterDescription
comp The component from which to walk the ancestry chain.


getComponent

public Component getComponent(String name);

Retrieves the layout component identified by name.

Return Value:

Returns the specified component.

ParameterDescription
name The layout name that identifies the component to be retrieved.


getEdge

public int getEdge();

Retrieves the current edge flags that are used when drawing the container.

Return Value:

Returns the edge.


getFocusComp

public Component getFocusComp();

Retrieves the index of the component that has the focus.

Return Value:

Returns the focus index.


getHeader

public Component getHeader();

Retrieves the header (label) child of this object.

Return Value:

Returns the header child, or returns null if this object doesn't have one.


getUILayout

public UILayoutManager getUILayout();

Retrieves the layout manager associated with the container.

Return Value:

Returns the layout manager object.


navigate

public Component navigate(Component comp, int direction, 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
comp The component from which to navigate.
direction The direction (logically or spatially) to navigate.
keyable If true, non-keyable components will be ignored during the navigation; otherwise, all components can be navigated to.


passFocus

public Component passFocus(Event e, int key);

Passes the focus to the appropriate component in the container, given the key pressed.

Return Value:

Returns the component that the focus was passed to.

ParameterDescription
e The event that was trapped.
key The key that was pressed.


removeAllChildren

public void removeAllChildren();

Remove all child containers.

Return Value:

No return values.


setEdge

public void setEdge(int flags);

Sets the edge flags for drawing the container.

Return Value:

No return value.

ParameterDescription
edge Flags specifying the type of container edge.


setHeader

public Component setHeader(Component header);

Makes the specified component the header object.

Return Value:

Returns the component that has become the header object.

ParameterDescription
header Component to become the header.


getClientRect

public Rectangle getClientRect();

Retrieves the client rectangle for this component; the client rectangle is the rectangle that remains after the component's window rectangle is adjusted by the component's insets.

Return Value:

Returns the the bounding rectangle for the client area, in component's coordinates.



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