Package com.ms.ui Previous
Previous
Contents
Contents
Index
Index
Next
Next

Interface IUIPosition

Methods

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

}

Defines an interface for classes exposing 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 current position.

Return Value:

Returns a Point object containing the position. The x and y coordinates of the point specify the horizontal and vertical positions, respectively.


getXPosition

public int getXPosition();

Retrieves the current horizontal position.

Return Value:

Returns the horizontal position.


getYPosition

public int getYPosition();

Retrieves the current vertical position.

Return Value:

Returns the vertical position.


setPosition

public Point setPosition(Point pt);

Sets the position based on the specified point.

Return Value:

Returns the new position.

ParameterDescription
pt The requested position. The x coordinate specifies the horizontal position; the y coordinate specifies the vertical position.

Remarks:

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


setPosition

public Point setPosition(int x, int y);

Sets the position based on the specified values.

Return Value:

Returns the the new position.

ParameterDescription
x The requested horiziontal position.
y The requested vertical position.

Remarks:

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


setXPosition

public int setXPosition(int x);

Sets the horizontal position to the specified value.

Return Value:

Returns the new horizontal position.

ParameterDescription
x The requested horiziontal position.

Remarks:

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


setYPosition

public int setYPosition(int y);

Sets the vertical position to the specified value.

Return Value:

Returns the new vertical position.

ParameterDescription
y The requested vertical position.

Remarks:

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



Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.