Package com.ms.ui |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public abstract class UILayoutManager implements IUILayoutManager { // Methods public void addLayoutComponent(String name, Component comp); public void removeLayoutComponent(Component comp); public Component getComponent(Container cont, int index); public Component getLayoutComponent(String name); public Dimension minimumLayoutSize(Container parent); public Dimension preferredLayoutSize(Container parent); public int continueInvalidate(); public boolean continueInvalidate(Component comp); public void layoutContainer(Container parent); public void paintContainer(Container parent, Graphics g); public Component navigate(Container cont, Component comp, int dir, boolean keyable); }
An abstract class that manages an extended layout manager. The following diagram shows the classes that extend UILayoutManager.
UILayoutManager | +--UIBarLayout | +--UIFixedFlowLayout | +--UIRowLayout | +--UISplitLayout | +--UITabLayout | +--UITabListLayout | +--UITreeLayout | +--UIVerticalFlowLayout
public void addLayoutComponent(String name, Component comp);Adds or replaces the specified layout component with the given component.
Return Value:
No return value.
Parameter Description name The layout name identifying the component to be added or replaced. comp The component to be added. Remarks:
The default implementation does nothing.
public int continueInvalidate();Determines whether the container should be invalidated when a child component is invalidated.
Return Value:
Returns 1, indicating the container should be invalidated.
Remarks:
This method implements continueInvalidate in the IUILayoutManager interface.
public boolean continueInvalidate(Component comp);Determines whether the container should be invalidated when a child component is invalidated.
Return Value:
Always returns true, indicating the container should be invalidated.
Parameter Description comp The component being invalidated. Remarks:
This method implements continueInvalidate in the IUILayoutManager interface.
public Component getComponent(Container cont, int index);Retrieves the component at the specified index.
Return Value:
Returns the specified component, or null if no component is found.
Parameter Description cont The container to retrieve the component from. index The index of component to retrieve. Remarks:
This method implements getComponent in the IUILayoutManager interface.
public Component getLayoutComponent(String name);Retrieves the component identified by the specified name.
Return Value:
Returns the specified component.
Parameter Description name The layout name identifying the component to retrieve. Remarks:
This method implements getLayoutComponent in the IUILayoutManager interface, and by default, simply returns null.
public void layoutContainer(Container parent);Lays out the components in the specified container.
Return Value:
No return value.
Parameter Description parent The container of the components being laid out. Remarks:
The default implementation does nothing.
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 dimensions.
Parameter Description parent The container of the components to be laid out. Remarks:
By default, this method returns a height and width of 0.
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:
Returns the component navigated to, or null if no component in the specified direction exists.
Parameter Description cont The container where the navigation is occurring. comp The component from which to navigate. dir The direction to navigate. Specify one of the field values in IUIAccessible. keyable If true, non-keyable components will be ignored during the navigation; otherwise, all components can be navigated to. Remarks:
This method implements navigate in the IUILayoutManager interface. If an undefined direction is specified, an IllegalArgumentException is thrown.
public void paintContainer(Container parent, Graphics g);Paints into the container as needed.
Return Value:
No return value.
Parameter Description parent The container. g The graphics context of the container to be used for painting. Remarks:
This method implements paintContainer in the IUILayoutManager interface, and by default, does nothing.
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 dimensions.
Parameter Description parent The container of the components to be laid out. Remarks:
By default, this method returns a height and width of 0.
public void removeLayoutComponent(Component comp);Removes the specified component from the layout.
Return Value:
No return value.
Parameter Description comp The component to be removed. Remarks:
The default implementation does nothing.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.