Package com.ms.ui |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class UIRowLayout extends UILayoutManager { // Constructor public UIRowLayout(int columns); // Methods public int getOrderIndex(int index) public int getWidth(int index); public void setWidth(int index, int width); public Component getComponent(Container cont, int index); public void moveColumn(int from, int to); public void layoutContainer(Container target); public Dimension minimumLayoutSize(Container parent); public Dimension preferredLayoutSize(Container parent); public Component navigate(Container cont, Component comp, int dir, boolean keyable); }
A class that implements a row layout manager.
public UIRowLayout(int columns);Creates a row layout manager with the specified number of columns.
Parameter Description columns The number of columns to create. You must specify a value greater than zero.
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:
If an invalid index is specified, an IllegalArgumentException is thrown.
public int getOrderIndex(int index);Retrieves the order of the column at the specified index.
Return Value:
Returns the order of the column's location.
Parameter Description index The zero-based index of the column. Remarks:
If an invalid index is specified, an IllegalArgumentException is thrown.
public int getWidth(int index);Retrieves the width of the column at the specified index.
Return Value:
Returns the width (in pixels) of the specified column.
Parameter Description index The zero-based index of the column. Remarks:
If an invalid index is specified, an IllegalArgumentException is thrown.
public void layoutContainer(Container target);Lays out the container and its components.
Return Value:
No return value.
Parameter Description target The container of the components to be laid out.
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:
The minimum layout size is determined from the minimum size of each component in the container.
public void moveColumn(int from, int to);Moves a column from one location to another.
Return Value:
No return value.
Parameter Description from The zero-based index identifying the column to move. to The zero-based index identifying the new location for the column.
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:
If an undefined direction is specified, an IllegalArgumentException is thrown.
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:
The preferred layout size is determined from the preferred size of each component in the container.
public void setWidth(int index, int width);Sets the width of the column at the specified index.
Return Value:
No return value.
Parameter Description index The zero-based index of the column. width The new width (in pixels) for the column. Remarks:
If an invalid index is specified, an IllegalArgumentException is thrown.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.