Packages
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.ui   Previous This
Package
Next

 


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

Constructors

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.

AwtUISplitViewer

public AwtUISplitViewer(IUIComponent nw, IUIComponent se);

Creates an AWT-based vertical split viewer control with the specified components.

ParameterDescription
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.

AwtUISplitViewer

public AwtUISplitViewer(IUIComponent nw, IUIComponent se, int style);

Creates an AWT-based split viewer control with the specified components and style.

ParameterDescription
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.

AwtUISplitViewer

public AwtUISplitViewer(IUIComponent nw, IUIComponent se, int style,
        int size);

Creates an AWT-based split viewer control with the specified components, style, and size.

ParameterDescription
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.

AwtUISplitViewer

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.

ParameterDescription
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.

AwtUISplitViewer

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.

ParameterDescription
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.

AwtUISplitViewer

public AwtUISplitViewer(Component nw, Component se, int style);

Creates an AWT-based split viewer control with the specified components and style.

ParameterDescription
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.

AwtUISplitViewer

public AwtUISplitViewer(Component nw, Component se, int style, int size);

Creates an AWT-based split viewer control with the specified components, style, and size.

ParameterDescription
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.

Methods

add

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.

ParameterDescription
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

getBase

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.

getComponent

public IUIComponent getComponent(String name);

Retrieves the component at the specified layout position.

Return Value:

Returns the specified component.

ParameterDescription
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.

getPos

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

getStyle

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.

remove

public void remove(IUIComponent component);

Removes the specified component from the control.

Return Value:

No return value.

ParameterDescription
component The component to be removed.

Overrides:

remove(IUIComponent) in AwtUIControl.

See Also: add

setPos

public void setPos(int pos);

Sets the current split position.

Return Value:

No return value.

ParameterDescription
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

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.