Package com.ms.ui |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class UIVerticalFlowLayout extends UILayoutManager { // Fields public static final int MULTICOLUMN; public static final int FILL; // Constructors public UIVerticalFlowLayout(); public UIVerticalFlowLayout(int style); public UIVerticalFlowLayout(int style, int gap); // Methods public void layoutContainer(Container parent); public Dimension minimumLayoutSize(Container parent); public Dimension preferredLayoutSize(Container parent); public Component navigate(Container cont, Component comp, int dir, boolean keyable); public void setStyle(int style); }
A class that implements a vertical flow layout manager. UIVerticalFlowLayout defines the MULTICOLUMN style, which means components will be laid out in multiple columns (the default layout is one single column). UIList uses UIVerticalFlowLayout for its layout manager.
public UIVerticalFlowLayout();Creates a vertical flow layout manager.
Remarks:
The horizontal gap of the layout manager is defined to be 15 pixels. By default, components will be laid in one vertical column.
public UIVerticalFlowLayout(int style);Creates a vertical flow layout manager with the specified style.
Parameter Description style The style for the layout manager. You can specify any bitwise combination of MULTICOLUMN and FILL. Pass 0 for the default style of single column, no fill. Remarks:
By default, the horizontal gap is defined to be 15 pixels. Components will be laid out and accessed according to the specified style. If any undefined style bits are specified, an IllegalArgumentException is thrown.
public UIVerticalFlowLayout(int style, int gap);Creates a vertical flow layout manager with the specified style and gap.
Parameter Description style The style for the layout manager. You can specify any bitwise combination of MULTICOLUMN and FILL. Pass 0 for the default style of single column, no fill. gap The horizontal gap between components. Remarks:
If any undefined style bits are specified, an IllegalArgumentException is thrown.
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:
This method reshapes the components in order to satisfy the style settings of the layout manager.
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 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 setStyle(int style);Sets the style of the layout manager.
Return Value:
No return value.
Parameter Description style The style for the layout manager. You can specify any bitwise combination of MULTICOLUMN and FILL. Pass 0 for the default style of single column, no fill. Remarks:
If any undefined style bits are specified, an IllegalArgumentException is thrown.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.