Packages
 In this topic

*Constructors

*Methods

 

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

 


Class AwtUIScrollViewer

public class AwtUIScrollViewer extends AwtUIControl
{
  // Constructors
  public AwtUIScrollViewer();
  public AwtUIScrollViewer(IUIComponent comp);
  public AwtUIScrollViewer(IUIComponent comp, int style);
  public AwtUIScrollViewer(IUIComponent comp, int hLine, int vLine);
  public AwtUIScrollViewer(IUIComponent comp, int hLine, int vLine,
        int style);
  public AwtUIScrollViewer(IUIComponent comp, int hLine, int vLine,
        int style, int scrollStyle);
  public AwtUIScrollViewer(IUIComponent comp, int hLine, int vLine,
        int style, int hstyle, int vstyle);
  public AwtUIScrollViewer(Component comp);
  public AwtUIScrollViewer(Component comp, int style);
  public AwtUIScrollViewer(Component comp, int hLine, int vLine);
  public AwtUIScrollViewer(Component comp, int hLine, int vLine,
        int style);
  public AwtUIScrollViewer(Component comp, int hLine, int vLine,
        int style, int scrollStyle);
  public AwtUIScrollViewer(Component comp, int hLine, int vLine,
        int style, int hstyle, int vstyle);

  // Methods
  public IUIComponent getBase();
  public IUIComponent getContent();
  public int getHLine();
  public Point getLine();
  public Point getPosition();
  public int getVLine();
  public void setContent(IUIComponent content);
  public void setHLine(int line);
  public void setLine(int hLine, int vLine);
  public void setPosition(Point pt);
  public void setPosition(int x, int y);
  public void setVLine(int line);
}

This class implements the functionality of a UIScrollViewer object in an AWT-based control. An AwtUIScrollViewer control is an AwtUIHost component whose associated root container holds a UIScrollViewer object. By hosting this object, an AwtUIScrollViewer control integrates AFC with AWT. Although an AwtUIScrollViewer control is fully compatible with AWT, a UIScrollViewer control is optimized for performance and size.

Panel
  |
  +--AwtUIHost
    |
    +--AwtUIControl
      |
      +--AwtUIScrollViewer

Constructors

AwtUIScrollViewer

public AwtUIScrollViewer();

Creates an AWT-based scroll viewer control with no content.

Remarks:

To add a content component to the control, call setContent. The control displays scroll bars only when they are needed to view the content component. The content component's horizontal and vertical scroll line increments are 10 pixels each.

By default, the horizontal scroll bar is placed at the bottom of the control. The vertical scroll bar is placed at the right. The horizontal and vertical header bars are placed at the top and at the left of the control, respectively.

AwtUIScrollViewer

public AwtUIScrollViewer(IUIComponent comp);

Creates an AWT-based scroll viewer control with the specified UI component.

ParameterDescription
comp The UI component to be displayed within the control.

Remarks:

The control displays scroll bars only when they are needed to view the content component. The content component's horizontal and vertical scroll line increments are 10 pixels each. To change the content component, call setContent.

By default, the horizontal scroll bar is placed at the bottom of the control. The vertical scroll bar is placed at the right. The horizontal and vertical header bars are placed at the top and at the left of the control, respectively.

Exceptions:

IllegalArgumentException if the component is null.

AwtUIScrollViewer

public AwtUIScrollViewer(IUIComponent comp, int style);

Creates an AWT-based scroll viewer control with the specified UI component and style.

ParameterDescription
comp The UI component to be displayed within the control.
style The style of the scroll viewer control. This parameter specifies where the scroll bars and header bars will be positioned. You can pass any bitwise combination of the following values: UIScrollViewer.SCROLL_TOP, UIScrollViewer.SCROLL_LEFT, UIScrollViewer.HEADER_BOTTOM, and UIScrollViewer.HEADER_RIGHT. You can also pass 0 for the default style, which places scroll bars at the bottom and at the right of the control and places header bars at the top and at the left.

Remarks:

By default, the control displays scroll bars only when they are needed to view the content component. The content component's horizontal and vertical scroll line increments are 10 pixels each. To change the content component, call setContent.

Exceptions:

IllegalArgumentException if an undefined style was specified.

IllegalArgumentException if the component is null.

AwtUIScrollViewer

public AwtUIScrollViewer(IUIComponent comp, int hLine, int vLine);

Creates an AWT-based scroll viewer control with the specified UI component and the scroll line increments.

ParameterDescription
comp The UI component to be displayed within the control.
hLine The horizontal increment for scrolling the component (in pixels).
vLine The vertical increment for scrolling the component (in pixels).

Remarks:

By default, the control displays scroll bars only when they are needed to view the content component. The horizontal scroll bar is placed at the bottom of the control. The vertical scroll bar is placed at the right. The horizontal and vertical header bars are placed at the top and at the left of the control, respectively.

To change the content component, call setContent.

Exceptions:

IllegalArgumentException if the component is null.

AwtUIScrollViewer

public AwtUIScrollViewer(IUIComponent comp, int hLine, int vLine,
        int style);

Creates an AWT-based scroll viewer control with the specified UI component, scroll line increments, and style.

ParameterDescription
comp The UI component to be displayed within the control.
hLine The horizontal increment for scrolling the component (in pixels).
vLine The vertical increment for scrolling the component (in pixels).
style The style of the scroll viewer control. This parameter specifies where the scroll bars and header bars will be positioned. You can pass any bitwise combination of the following values: UIScrollViewer.SCROLL_TOP, UIScrollViewer.SCROLL_LEFT, UIScrollViewer.HEADER_BOTTOM, and UIScrollViewer.HEADER_RIGHT. You can also pass 0 for the default style, which places scroll bars at the bottom and at the right of the control and places header bars at the top and at the left.

Remarks:

By default, the control displays scroll bars only when they are needed to view the content component. To change the content component, call setContent.

Exceptions:

IllegalArgumentException if an undefined style was specified.

IllegalArgumentException if the component is null.

AwtUIScrollViewer

public AwtUIScrollViewer(IUIComponent comp, int hLine, int vLine,
        int style, int scrollStyle);

Creates an AWT-based scroll viewer control with the specified UI component, scroll line increments, and styles.

ParameterDescription
comp The UI component to be displayed within the control.
hLine The horizontal increment for scrolling the component (in pixels).
vLine The vertical increment for scrolling the component (in pixels).
style The style of the scroll viewer control. This parameter specifies where the scroll bars and header bars will be positioned. You can pass any bitwise combination of the following values: UIScrollViewer.SCROLL_TOP, UIScrollViewer.SCROLL_LEFT, UIScrollViewer.HEADER_BOTTOM, and UIScrollViewer.HEADER_RIGHT. You can also pass 0 for the default style, which places scroll bars at the bottom and at the right of the control, and places header bars at the top and at the left.
scrollStyle The style of both scroll bars. Possible values include UIScroll.NOHIDE, UIScroll.NOSHOW, or UIScroll.NONPROPORTIONAL.

Remarks:

To change the content component, call setContent.

Exceptions:

IllegalArgumentException if an undefined style was specified.

IllegalArgumentException if the component is null.

AwtUIScrollViewer

public AwtUIScrollViewer(IUIComponent comp, int hLine, int vLine,
        int style, int hstyle, int vstyle);

Creates an AWT-based scroll viewer control with the specified UI component, scroll line increments, and styles.

ParameterDescription
comp The UI component to be displayed within the control.
hLine The horizontal increment for scrolling the component (in pixels).
vLine The vertical increment for scrolling the component (in pixels).
style The style of the scroll viewer control. This parameter specifies where the scroll bars and header bars will be positioned. You can pass any bitwise combination of the following values: UIScrollViewer.SCROLL_TOP, UIScrollViewer.SCROLL_LEFT, UIScrollViewer.HEADER_BOTTOM, and UIScrollViewer.HEADER_RIGHT. You can also pass 0 for the default style, which places scroll bars at the bottom and at the right of the control and places header bars at the top and at the left.
hstyle The style of the horizontal scroll bar. Possible values include UIScroll.NOHIDE, UIScroll.NOSHOW, or UIScroll.NONPROPORTIONAL.
vstyle The style of the vertical scroll bar. Possible values include UIScroll.NOHIDE, UIScroll.NOSHOW, or UIScroll.NONPROPORTIONAL.

Remarks:

To change the content component, call setContent.

Exceptions:

IllegalArgumentException if an undefined style was specified.

IllegalArgumentException if the component is null.

AwtUIScrollViewer

public AwtUIScrollViewer(Component comp);

Creates an AWT-based scroll viewer control with the specified AwtUI component. Pure AWT components cannot be added.

ParameterDescription
comp The AwtUI component to be displayed within the control.

Remarks:

The control displays scroll bars only when they are needed to view the content component. The content component's horizontal and vertical scroll line increments are 10 pixels each.

By default, the horizontal scroll bar is placed at the bottom of the control. The vertical scroll bar is placed at the right. The horizontal and vertical header bars are placed at the top and at the left of the control, respectively.

AwtUIScrollViewer

public AwtUIScrollViewer(Component comp, int style);

Creates an AWT-based scroll viewer control with the specified AwtUI component and style. Pure AWT components cannot be added.

ParameterDescription
comp The AwtUI component to be displayed within the control.
style The style of the scroll viewer control. This parameter specifies where the scroll bars and header bars will be positioned. You can pass any bitwise combination of the following values: UIScrollViewer.SCROLL_TOP, UIScrollViewer.SCROLL_LEFT, UIScrollViewer.HEADER_BOTTOM, and UIScrollViewer.HEADER_RIGHT. You can also pass 0 for the default style, which places scroll bars at the bottom and at the right of the control, and places header bars at the top and at the left.

Remarks:

By default, the control displays scroll bars only when they are needed to view the content component. The content component's horizontal and vertical scroll line increments are 10 pixels each.

Exceptions:

IllegalArgumentException if an undefined style was specified.

AwtUIScrollViewer

public AwtUIScrollViewer(Component comp, int hLine, int vLine);

Creates an AWT-based scroll viewer control with the specified AwtUI component and scroll line increments. Pure AWT components cannot be added.

ParameterDescription
comp The AwtUI component to be displayed within the control.
hLine The horizontal increment for scrolling the component (in pixels).
vLine The vertical increment for scrolling the component (in pixels).

Remarks:

By default, the control displays scroll bars only when they are needed to view the content component. The horizontal scroll bar is placed at the bottom of the control. The vertical scroll bar is placed at the right. The horizontal and vertical header bars are placed at the top and at the left of the control, respectively.

AwtUIScrollViewer

public AwtUIScrollViewer(Component comp, int hLine, int vLine, int style);

Creates an AWT-based scroll viewer control with the specified AwtUI component, scroll line increments, and style. Pure AWT components cannot be added.

ParameterDescription
comp The AwtUI component to be displayed within the control
hLine The horizontal increment for scrolling the component (in pixels).
vLine The vertical increment for scrolling the component (in pixels).
style The style of the scroll viewer control. This parameter specifies where the scroll bars and header bars will be positioned. You can pass any bitwise combination of the following values: UIScrollViewer.SCROLL_TOP, UIScrollViewer.SCROLL_LEFT, UIScrollViewer.HEADER_BOTTOM, and UIScrollViewer.HEADER_RIGHT. You can also pass 0 for the default style, which places scroll bars at the bottom and at the right of the control and places header bars at the top and at the left.

Remarks:

By default, the control displays scroll bars only when they are needed to view the content component.

Exceptions:

IllegalArgumentException if an undefined style was specified.

AwtUIScrollViewer

public AwtUIScrollViewer(Component comp, int hLine, int vLine, int style,
        int scrollStyle);

Creates an AWT-based scroll viewer control with the specified AwtUI component, scroll line increments, and styles. Pure AWT components cannot be added.

ParameterDescription
comp The AwtUI component to be displayed within the control.
hLine The horizontal increment for scrolling the component (in pixels).
vLine The vertical increment for scrolling the component (in pixels).
style The style of the scroll viewer control. This parameter specifies where the scroll bars and header bars will be positioned. You can pass any bitwise combination of the following values: UIScrollViewer.SCROLL_TOP, UIScrollViewer.SCROLL_LEFT, UIScrollViewer.HEADER_BOTTOM, and UIScrollViewer.HEADER_RIGHT. You can also pass 0 for the default style, which places scroll bars at the bottom and at the right of the control and places header bars at the top and at the left.
scrollStyle The style of both scroll bars. Possible values include UIScroll.NOHIDE, UIScroll.NOSHOW, or UIScroll.NONPROPORTIONAL.

Exceptions:

IllegalArgumentException if an undefined style was specified.

AwtUIScrollViewer

public AwtUIScrollViewer(Component comp, int hLine, int vLine, int style,
        int hstyle, int vstyle);

Creates an AWT-based scroll viewer control with the specified AwtUI component, scroll line increments, and styles. Pure AWT components cannot be added.

ParameterDescription
comp The AwtUI component to be displayed within the control.
hLine The horizontal increment for scrolling the component (in pixels).
vLine The vertical increment for scrolling the component (in pixels).
style The style of the scroll viewer control. This parameter specifies where the scroll bars and header bars will be positioned. You can pass any bitwise combination of the following values: UIScrollViewer.SCROLL_TOP, UIScrollViewer.SCROLL_LEFT, UIScrollViewer.HEADER_BOTTOM, and UIScrollViewer.HEADER_RIGHT. You can also pass 0 for the default style, which places scroll bars at the bottom and at the right of the control and places header bars at the top and at the left.
hstyle The style of the horizontal scroll bar. Possible values include UIScroll.NOHIDE, UIScroll.NOSHOW, or UIScroll.NONPROPORTIONAL.
vstyle The style of the vertical scroll bar. Possible values include UIScroll.NOHIDE, UIScroll.NOSHOW, or UIScroll.NONPROPORTIONAL.

Exceptions:

IllegalArgumentException if an undefined style was specified.

Methods

getBase

public IUIComponent getBase();

Retrieves the UI component that the control is based on.

Return Value:

Returns the UIScrollViewer object associated with the control.

Remarks:

When the AWT-based control is first created, it is associated with a UIScrollViewer object.

getContent

public IUIComponent getContent();

Retrieves the control's content component.

Return Value:

Returns The component displayed within the control.

See Also: setContent

getHLine

public int getHLine();

Retrieves the number of pixels associated with a horizontal scroll position.

Return Value:

Returns the number of pixels in the horizontal scroll bar's scroll line.

See Also: getVLine, getLine, setHLine

getLine

public Point getLine();

Retrieves the number of pixels associated with the horizontal and vertical scroll positions.

Return Value:

Returns a Point object that contains the number of pixels in a scroll line. The x coordinate specifies the horizontal scroll line; the y coordinate specifies the vertical scroll line.

See Also: getHLine, getVLine, setLine

getPosition

public Point getPosition();

Retrieves the current position of the control's content.

Return Value:

Returns a Point object that contains the content component's position. The x and y coordinates specify the horizontal and vertical positions (in pixels), respectively.

See Also: setPosition

getVLine

public int getVLine();

Retrieves the number of pixels associated with a vertical scroll position.

Return Value:

Returns the number of pixels in the vertical scroll bar's scroll line.

See Also: getHLine, getLine, setVLine

setContent

public void setContent(IUIComponent content);

Sets the control's content to the specified component.

Return Value:

No return value.

ParameterDescription
content The component to be displayed within the control.

See Also: getContent

setHLine

public void setHLine(int line);

Sets the number of pixels associated with a horizontal scroll position.

Return Value:

No return value.

ParameterDescription
line The number of pixels for the horizontal scroll bar's scroll line.

See Also: setVLine, setLine, getHLine

setLine

public void setLine(int hLine, int vLine);

Sets the number of pixels associated with horizontal and vertical scroll positions.

Return Value:

No return value.

ParameterDescription
hLine The number of pixels for the horizontal scroll bar's scroll line.
vLine The number of pixels for the vertical scroll bar's scroll line.

See Also: setHLine, setVLine, getLine

setPosition

public void setPosition(Point pt);

Moves the scroll viewer's content to the scroll position given by the specified point.

Return Value:

No return value.

ParameterDescription
pt The requested position for the content component. The x and y coordinates of pt specify the horizontal and vertical positions (in pixels), respectively.

See Also: getPosition

setPosition

public void setPosition(int x, int y);

Moves the control's content to the position given by the specified values.

Return Value:

No return value.

ParameterDescription
x The requested horizontal position for the content component (in pixels).
y The requested vertical position for the content component (in pixels).

See Also: getPosition

setVLine

public void setVLine(int line);

Sets the number of pixels associated with a vertical scroll position.

Return Value:

No return value.

ParameterDescription
line The number of pixels for the vertical scroll bar's scroll line.

See Also: setHLine, setLine, getVLine

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