Class AwtUISplitViewer
public class AwtUISplitViewer extends AwtUIControl
{
// Constructors
public AwtUISplitViewer();
public AwtUISplitViewer(IUIComponent nw, IUIComponent se);
public AwtUISplitViewer(IUIComponent nw, IUIComponent se,
int style);
public AwtUISplitViewer(IUIComponent nw, IUIComponent se,
int style, int size);
public AwtUISplitViewer(IUIComponent nw, IUIComponent se,
int style, int size, boolean addScroll);
public AwtUISplitViewer(Component nw, Component se);
public AwtUISplitViewer(Component nw, Component se, int style);
public AwtUISplitViewer(Component nw, Component se, int style,
int size);
// Methods
public Component add(String constraint, Component component);
public IUIComponent getBase();
public IUIComponent getComponent(String name);
public int getPos();
public int getStyle();
public void remove(IUIComponent component);
public void setPos(int pos);
}
This class implements the functionality of a UISplitViewer object in an AWT-based control. An AwtUISplitViewer control is an AwtUIHost component whose associated root container holds a UISplitViewer object. By hosting this object, an AwtUISplitViewer control integrates AFC with AWT. Although an AwtUISplitViewer control is fully compatible with AWT, a UISplitViewer control is optimized for performance and size.
Panel
|
+--AwtUIHost
|
+--AwtUIControl
|
+--AwtUISplitViewer
public AwtUISplitViewer();
Creates an AWT-based vertical split viewer control with no content.
Remarks:
To add components to the control, call the add method.
AwtUISplitViewer sv = new AwtUISplitViewer();
add(sv); // Add sv to the container.
// Add a UI component to the left pane and an
// AwtUI component to the right pane. The layout
// constraints passed to add are defined by
// UISplitLayout, the layout manager of the
// underlying UISplitViewer object.
sv.add(new UIText("Left component"), "nw");
sv.add("se", new AwtUIText("Right component"));
By default, the size of the left component is -50, and neither pane displays scroll bars. For more information about component sizes, see the UISplitViewer overview.
public AwtUISplitViewer(IUIComponent nw, IUIComponent se);
Creates an AWT-based vertical split viewer control with the specified components.
Parameter | Description |
nw
| The content component for the left (west) pane of the control.
|
se
| The content component for the right (east) pane of the control.
|
Remarks:
By default, the size of the nw component is -50, and neither pane displays scroll bars. For more information about component sizes, see the UISplitViewer overview.
public AwtUISplitViewer(IUIComponent nw, IUIComponent se, int style);
Creates an AWT-based split viewer control with the specified components and style.
Parameter | Description |
nw
| The content component for the top (north) or left (west) pane of the control.
|
se
| The content component for the bottom (south) or right (east) pane of the control.
|
style
| The style of the control. Possible values include UISplitViewer.HORIZONTAL for a horizontal split or 0 for a vertical split.
|
Remarks:
By default, the size of the nw component is -50, and neither pane displays scroll bars. For more information about component sizes, see the UISplitViewer overview.
public AwtUISplitViewer(IUIComponent nw, IUIComponent se, int style,
int size);
Creates an AWT-based split viewer control with the specified components, style, and size.
Parameter | Description |
nw
| The content component for the top (north) or left (west) pane of the control.
|
se
| The content component for the right (east) pane of the control.
|
style
| The style of the control. Possible values include UISplitViewer.HORIZONTAL for a horizontal split or 0 for a vertical split.
|
size
| The size of the nw component. A negative value means the height or width is a percentage of the split viewer's total height or width. A positive value specifies the absolute height or width in pixels. For more information, see the UISplitViewer overview.
|
Remarks:
By default, neither pane displays scroll bars.
Exceptions:
IllegalArgumentException
if the size parameter was less than -100.
public AwtUISplitViewer(IUIComponent nw, IUIComponent se, int style,
int size, boolean addScroll);
Creates an AWT-based split viewer control with the specified components, style, and size, and optional scroll bar support.
Parameter | Description |
nw
| The content component for the top (north) or left (west) pane of the control.
|
se
| The content component for the right (east) pane of the control.
|
style
| The style of the control. Possible values include HORIZONTAL for a horizontal split or 0 for a vertical split.
|
size
| The size of the nw component. A negative value means the height or width is a percentage of the split viewer's total height or width. A positive value specifies the absolute height or width in pixels. For more information, see the UISplitViewer overview.
|
addScroll
| If true, scroll bars will be added to each pane when they are needed; otherwise, neither pane will provide scroll bars.
|
Exceptions:
IllegalArgumentException
if the size parameter was less than -100.
public AwtUISplitViewer(Component nw, Component se);
Creates an AWT-based vertical split viewer control with the specified AwtUI components. Pure AWT components cannot be added.
Parameter | Description |
nw
| The AwtUI component to be displayed in the left (west) pane of the control.
|
se
| The AwtUI component to be displayed in the right (east) pane of the control.
|
Remarks:
By default, the size of the nw component is -50. For more information about component sizes, see the UISplitViewer overview.
public AwtUISplitViewer(Component nw, Component se, int style);
Creates an AWT-based split viewer control with the specified components and style.
Parameter | Description |
nw
| The content component for the top (north) or left (west) pane of the control.
|
se
| The content component for the bottom (south) or right (east) pane of the control.
|
style
| The style of the control. Possible values include UISplitViewer.HORIZONTAL for a horizontal split, or 0 for a vertical split.
|
Remarks:
By default, the size of the nw component is -50 and neither pane displays scroll bars. For more information about component sizes, see the UISplitViewer overview.
public AwtUISplitViewer(Component nw, Component se, int style, int size);
Creates an AWT-based split viewer control with the specified components, style, and size.
Parameter | Description |
nw
| The content component for the top (north) or left (west) pane of the control.
|
se
| The content component for the right (east) pane of the control.
|
style
| The style of the control. Possible values include UISplitViewer.HORIZONTAL for a horizontal split, or 0 for a vertical split.
|
size
| The size of the nw component. A negative value means the height or width is a percentage of the split viewer's total height or width. A positive value specifies the absolute height or width in pixels. For more information, see the UISplitViewer overview.
|
Remarks:
By default, neither pane displays scroll bars.
Exceptions:
IllegalArgumentException
if the size parameter was less than -100.
public Component add(String constraint, Component component);
Adds the specified AwtUI component to the control. Pure AWT components cannot be added.
Return Value:
Returns the control itself.
Parameter | Description |
constraint
| The layout constraint identifying where to add the component. You can pass one of the following values:
"nw"
|
Adds the component in the top (north) or left (west) pane.
|
"se"
|
Adds the component in the bottom (south) or right (east) pane.
|
"splitter"
|
Adds the component as the divider between the two panes.
|
|
component
| The AwtUI component to be added.
|
Remarks:
Other versions of add are inherited through AwtUIControl.
Overrides:
add(String,Component) in AwtUIControl.
See Also: remove
public IUIComponent getBase();
Retrieves the UI component that the control is based on.
Return Value:
Returns the UISplitViewer object associated with the control.
Remarks:
When the AWT-based control is first created, it is associated with a UISplitViewer object.
public IUIComponent getComponent(String name);
Retrieves the component at the specified layout position.
Return Value:
Returns the specified component.
Parameter | Description |
name
| The layout name that identifies the component to be retrieved. You can pass one of the following values:
"nw"
|
Retrieves the component in the top (north) or left (west) pane.
|
"se"
|
Retrieves the component in the bottom (south) or right (east) pane.
|
"splitter"
|
Retrieves the component that divides the two panes.
|
|
Remarks:
The name parameter is not case-sensitive.
Exceptions:
IllegalArgumentException
if an undefined name was specified.
public int getPos();
Retrieves the current split position.
Return Value:
Returns the split position of the control.
Remarks:
For more information about split positions, see the UISplitLayout overview.
See Also: setPos
public int getStyle();
Retrieves the style of the control.
Return Value:
Returns an integer that contains the current style setting. Possible style values include UISplitViewer.HORIZONTAL for a horizontal split or 0 for a vertical split.
public void remove(IUIComponent component);
Removes the specified component from the control.
Return Value:
No return value.
Parameter | Description |
component
| The component to be removed.
|
Overrides:
remove(IUIComponent) in AwtUIControl.
See Also: add
public void setPos(int pos);
Sets the current split position.
Return Value:
No return value.
Parameter | Description |
pos
| The new split position.
|
Remarks:
For more information about split positions, see the UISplitLayout overview.
Exceptions:
IllegalArgumentException
if the specified position was less than -100.
See Also: getPos