Packages
 In this topic

*Methods

 

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

 


Interface IUIPosition

public interface IUIPosition
{
  // Methods
  public Point getPosition();
  public int getXPosition();
  public int getYPosition();
  public void setPosition(Point pt);
  public void setPosition(int x, int y);
  public void setXPosition(int x);
  public void setYPosition(int y);
}

This interface is used to expose a spatial position. For example, UIViewer and UIScrollViewer implement IUIPosition to expose their content's position. UIScroll implements this interface to expose the position of the scroll track control.

Methods

getPosition

public Point getPosition();

Retrieves the position of the object.

Return Value:

Returns a Point object containing the current position. The x and y coordinates specify the horizontal and vertical positions (in pixels), respectively.

getXPosition

public int getXPosition();

Retrieves the horizontal position of the object.

Return Value:

Returns the horizontal position (in pixels).

getYPosition

public int getYPosition();

Retrieves the vertical position of the object.

Return Value:

Returns the vertical position (in pixels).

setPosition

public void setPosition(Point pt);

Sets the position of the object according to the specified Point.

Return Value:

No return value.

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

Remarks:

Depending on the object's range checking, the returned position may differ from the requested position.

setPosition

public void setPosition(int x, int y);

Sets the position of the object according to the specified values.

Return Value:

No return value.

ParameterDescription
x The requested horizontal position (in pixels).
y The requested vertical position (in pixels).

Remarks:

Depending on the object's range checking, the returned position may differ from the requested position.

setXPosition

public void setXPosition(int x);

Sets the horizontal position of the object.

Return Value:

No return value.

ParameterDescription
x The requested horizontal position.

Remarks:

Depending on the object's range checking, the returned position may differ from the requested position.

setYPosition

public void setYPosition(int y);

Sets the vertical position of the object.

Return Value:

No return value.

ParameterDescription
y The requested vertical position.

Remarks:

Depending on the object's range checking, the returned position may differ from the requested position.

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