Class UICardLayout
public class UICardLayout extends UILayoutManager
{
// Constructors
public UICardLayout();
public UICardLayout(int h, int v);
// Methods
public void addLayoutComponent(IUIContainer parent,
IUIComponent comp, Object constraints);
public void first(IUIContainer parent);
public Dimension getMinimumSize(IUIContainer parent);
public Dimension getPreferredSize(IUIContainer parent);
public boolean isOverlapping();
public void last(IUIContainer parent);
public void layout(IUIContainer parent, Rectangle bounds);
public IUIComponent navigate(IUIContainer cont,
IUIComponent comp, int dir, boolean keyable);
public void next(IUIContainer parent);
public void previous(IUIContainer parent);
public void show(IUIContainer parent, String name);
}
This class is a layout manager used to place components on top of one another, showing only one of them at any given time (similar to cascading windows). Typically, card layouts are used for the content area below the tabs of a property sheet.
UILayoutManager
|
+--UICardLayout
public UICardLayout();
Creates a UICardLayout manager object with default horizontal and vertical gaps.
public UICardLayout(int h, int v);
Creates a UICardLayout manager object with the specified horizontal and vertical gaps.
Parameter | Description |
h
| The number of pixels used for the horizontal gap that appears to the left and right of components laid out with the manager (by default, this is 0).
|
v
| The number of pixels used for the vertical gap that appears above and below the components laid out with the manager (by default, this is 0).
|
public void addLayoutComponent(IUIContainer parent, IUIComponent comp,
Object constraints);
Adds the specified component to the container, according to the specified constraints.
Return Value:
No return value.
Parameter | Description |
parent
| The container of the component.
|
comp
| The component to be added.
|
constraints
| The layout constraints identifying where the component will be added.
|
Overrides:
addLayoutComponent(IUIContainer,IUIComponent,Object) in UILayoutManager.
public void first(IUIContainer parent);
Shows and lays out the first component in the container, hiding all other components.
Return Value:
No Return value.
Parameter | Description |
parent
| The parent of the container.
|
public Dimension getMinimumSize(IUIContainer parent);
Determines the minimum size (in pixels) of the control.
Return Value:
Returns the control's minimum size.
Parameter | Description |
parent
| The parent container.
|
Overrides:
getMinimumSize(IUIContainer) in UILayoutManager.
public Dimension getPreferredSize(IUIContainer parent);
Determines the preferred dimensions (in pixels) for displaying the control.
Return Value:
Returns a Dimension object containing the preferred size.
Parameter | Description |
parent
| The parent container.
|
Overrides:
getPreferredSize(IUIContainer) in UILayoutManager.
public boolean isOverlapping();
Determines if this layout manager lays out its children so they overlap either completely or partially.
Return Value:
Returns true. The UICardLayout layout manager always overlaps components.
Overrides:
isOverlapping() in UILayoutManager.
public void last(IUIContainer parent);
Shows and lays out the last component in the container, hiding all other components.
Return Value:
No Return value.
Parameter | Description |
parent
| The parent of the container.
|
public void layout(IUIContainer parent, Rectangle bounds);
Lays out the components in the associated root container.
Return Value:
No return value.
Parameter | Description |
parent
| The parent of the container.
|
bounds
| The size (in pixels) to set the visible component to.
|
Remarks:
The visible component is the full size of the bounds parameter, reduced on the left and right by the layout manager's horizontal gap, and above and below by the manager's vertical gap.
Overrides:
layout(IUIContainer,Rectangle) in UILayoutManager.
public IUIComponent navigate(IUIContainer cont, IUIComponent comp, int dir,
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.
Parameter | Description |
cont
| The parent container.
|
comp
| The component to navigate from.
|
dir
| 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.
|
Overrides:
navigate(IUIContainer,IUIComponent,int,boolean) in UILayoutManager.
public void next(IUIContainer parent);
Shows and lays out the next component in the container (after the currently visible component), hiding all other components.
Return Value:
No Return value.
Parameter | Description |
parent
| The parent of the container.
|
public void previous(IUIContainer parent);
Shows and lays out the previous component in the container (relative to the currently visible component), hiding all other components.
Return Value:
No Return value.
Parameter | Description |
parent
| The parent of the container.
|
public void show(IUIContainer parent, String name);
Shows and lays out the component with the specified name, hiding all other components.
Return Value:
No return value.
Parameter | Description |
parent
| The parent of the container.
|
name
| The name of the component.
|